- From: Israel Hilerio <israelh@microsoft.com>
- Date: Tue, 17 May 2011 01:04:12 +0000
- To: "public-webapps@w3.org" <public-webapps@w3.org>
Pablo explained to me that the main issue with allowing transactions
from being created inside a SetVersion handler is identifying which
objectstores the new transaction is binding to. That is bug# 11401 [1].
Using Jeremy's example:
db.setVersion('1').onsuccess(function () {
db.createObjectStore('a'); //objectstore a
trans = db.transaction('a');
db.removeObjectStore('a');
db.createObjectStore('a'); //objecstore a'
trans.objectStore('a').put('foo', 'bar'); });
It is unclear which of the two objectstores a or a' is associated with
the newly created READ_ONLY transaction inside the setVersion handler.
To echo Jeremy's proposal, would it be okay if we were not to support
this scenario and just throw and exception.
We would like to modify the spec to say something like:
IDBDatabase.transaction:
Throws an IDBDatabaseException of NOT_ALLOWED_ERR when the
transaction() method is called within the onsuccess handler of a
setVersion request.
Israel
[1] http://www.w3.org/Bugs/Public/show_bug.cgi?id=11401
Received on Tuesday, 17 May 2011 01:04:40 UTC