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

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

From: Jeremy Orlow <jorlow@chromium.org>
Date: Wed, 16 Feb 2011 20:40:18 -0800
Message-ID: <AANLkTinKer0n497_=_B4GW17gvvWv-9QOGFcorA5oFzc@mail.gmail.com>
To: Jonas Sicking <jonas@sicking.cc>, Ben Turner <bent@mozilla.com>
Cc: public-webapps WG <public-webapps@w3.org>
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.)

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

J
Received on Thursday, 17 February 2011 04:41:09 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:16 UTC