- From: <bugzilla@jessica.w3.org>
- Date: Wed, 24 Nov 2010 21:16:53 +0000
- To: public-webapps@w3.org
http://www.w3.org/Bugs/Public/show_bug.cgi?id=11401
Summary: [IndexedDB] We should disallow .transaction() from
within setVersion transactions
Product: WebAppsWG
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Indexed Database API
AssignedTo: dave.null@w3.org
ReportedBy: jorlow@chromium.org
QAContact: member-webapi-cvs@w3.org
CC: mike@w3.org, public-webapps@w3.org
We should disallow .transaction() from within setVersion transactions.
Otherwise things like this can become confusing:
db.setVersion('1').onsuccess(function () {
db.createObjectStore('a');
trans = db.transaction('a');
db.removeObjectStore('a');
db.createObjectStore('a');
trans.objectStore('a').put('foo', 'bar');
});
or
db.setVersion('1').onsuccess(function () {
thisTrans = event.result;
db.createObjectStore('a');
trans = db.transaction('a');
thisTrans.abort();
trans.objectStore('a').put('foo', 'bar');
});
We could specify a bunch of complicated semantics, but it's much easier to just
say that .transaction() throws if called within a setVersion transaction. Any
use case that needs to create a transaction within should be satisfied by doing
the work in an oncomplete handler for the setVersion transaction.
--
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
Received on Wednesday, 24 November 2010 21:16:55 UTC