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

Re: [indexeddb] Creating transactions inside the oncomplete handler of a VERSION_CHANGE transaction

From: Jonas Sicking <jonas@sicking.cc>
Date: Wed, 25 Jan 2012 16:25:40 -0800
Message-ID: <CA+c2ei9u17XiN2mr4JgNFH_c8B_-yAg1MPWUWh_Ru56GoybJgg@mail.gmail.com>
To: Israel Hilerio <israelh@microsoft.com>
Cc: "public-webapps@w3.org" <public-webapps@w3.org>, Victor Ngo <vicngo@microsoft.com>
On Wed, Jan 25, 2012 at 3:40 PM, Israel Hilerio <israelh@microsoft.com> wrote:
> Should we allow the creation of READ_ONLY or READ_WRITE transactions inside the oncomplete event handler of a VERSION_CHANGE transaction?
> IE allows this behavior today.  However, we noticed that FF's nightly doesn't.

Yeah, it'd make sense to me to allow this.

> In either case, we should define this behavior in the spec.

Agreed. I can't even find anything in the spec that says that calling
the transaction() function should fail if you call it while the
VERSION_CHANGE transaction is still running.

I think we should spec that if transaction() is called before either
the VERSION_CHANGE transaction is committed (i.e. the "complete" event
has *started* firing), or the "success" event has *started* firing on
the IDBRequest returned from .open, we should throw a
InvalidStateError.

Does this sound good?

/ Jonas
Received on Thursday, 26 January 2012 00:26:38 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:50 GMT