Summary: | IndexedDB: Transactions can be started between versionchange oncomplete and openrequest onsuccess | ||
---|---|---|---|
Product: | WebKit | Reporter: | Joshua Bell <jsbell> |
Component: | WebCore Misc. | Assignee: | Michael Pruett <michael> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | CC: | beidson, bfulgham, michael, sihui_liu |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Bug Depends on: | 111643 | ||
Bug Blocks: |
Description
Joshua Bell
2013-03-06 16:37:41 PST
Actually, the above repro should be fine, since the database's object store metadata is updated. However, if an index is created in a store, the database's metadata for the store is NOT updated. So the repro needs to be. var req = indexedDB.open("db", 1); req.onupgradeneeded = function() { var db = req.result; db.createObjectStore('store').createIndex('index', 'keyPath'); req.transaction.oncomplete = function() { db.transaction('store').objectStore('store').index('index'); // <---- HERE }; }; ... and from reviewing the spec, it seems like creating the transaction should be allowed; the previous "versionchange" transaction has concluded. So just propagating the metadata update from createIndex() to the IDBDatabase object is the easiest fix. I've copied this to blink. The issue is still valid for WebKit. I'm pinging possible new owners. I posted a patch for Blink over at: https://codereview.chromium.org/14232020/ This could be relevant for multiprocess WebKit ports in the future. *** This bug has been marked as a duplicate of bug 163963 *** |