W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2011

Re: [IndexedDB] More questions about IDBRequests always firing (WAS: Reason for aborting transactions)

From: Jonas Sicking <jonas@sicking.cc>
Date: Wed, 16 Feb 2011 23:38:34 -0800
Message-ID: <AANLkTimzat6hmJV6t5wayOmpF3e+8KJW1ZoeOkz5BqiL@mail.gmail.com>
To: Jeremy Orlow <jorlow@chromium.org>
Cc: Ben Turner <bent@mozilla.com>, public-webapps WG <public-webapps@w3.org>
On Wed, Feb 16, 2011 at 8:40 PM, Jeremy Orlow <jorlow@chromium.org> wrote:
> On Wed, Feb 9, 2011 at 4:30 PM, Jonas Sicking <jonas@sicking.cc> wrote:
>> On Wed, Feb 9, 2011 at 4:03 PM, Jeremy Orlow <jorlow@chromium.org> wrote:
>> > Gotcha.  Does this mean that _every_ async request will fire an onerror
>> > or
>> > onsuccess?  I guess I had forgotten about that (and assumed it was that
>> > it'd
>> > fire either 0 or 1 times.)
>> Yes. That's the idea. It's always nice to be able to rely on that
>> you'll *always* get one of the two callbacks. That way you can put
>> cleanup code in there and be sure that it always runs.
> Will the IDBRequest always fire before the IDBTransaction's abort/complete
> event fires?  (It seems like it should.)

I agree.

> Also, what should we do when you enqueue a setVersion transaction and then
> close the database handle?  Maybe an ABORT_ERR there too?

Yeah, that'd make sense to me. Just like if you enque any other
transaction and then close the db handle.

/ Jonas
Received on Thursday, 17 February 2011 07:39:39 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:30 UTC