[IndexedDB] Bug#11401 -We should disallow .transaction() from within setVersion transactions

We expect async operations to be queue up and executed in the order in which they were created.  Thus, the request to create a second transaction inside the onsuccess handler of a setVersion request using a .transaction() method would fail as long as we were inside a VERSION_CHANGE transaction.  The reason being that the VERSION_CHANGE transaction locks the complete db.

It seems we wouldn't want to allow this type of scenario.  Do we expect this to be a realistic scenario?  Is there a reason why we wouldn't just throw a NOT_ALLOWED_ERR.  Could we modify the transaction method information to say something like:

-->Throws an IDBDatabaseException of NOT_ALLOWED_ERR when the transaction() method is called within the onsuccess handler of a setVersion request.

This would simply the Async model and keep it consistent with the Sync model.

Israel

[1] http://www.w3.org/Bugs/Public/show_bug.cgi?id=11401

Received on Tuesday, 3 May 2011 19:11:00 UTC