RESOLVED FIXED 86127
IndexedDB: IDBDatabase properties not snapshotted on connection close
https://bugs.webkit.org/show_bug.cgi?id=86127
Summary IndexedDB: IDBDatabase properties not snapshotted on connection close
Joshua Bell
Reported 2012-05-10 12:29:13 PDT
The spec sayeth: http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBDatabase IDBDatabase.objectStoreNames: "Once the closePending flag is set on the connection, this function must return a snapshot of the list of names of the object stores taken at the time when the close method was called." ... "Even if another connection is later used to modify the version, that attribute on closed instances are not changed." IDBDatabase.version; "On getting, this attribute must return the version of the database when this IDBDatabase instance was created. When a IDBDatabase instance is created, this is always the number passed as the version argument passed to the open call used to create the IDBDatabase instance. This value remains constant for the lifetime of the IDBDatabase object. If the connection is closed, this attribute represents a snapshot of the version that the database had when the connection was closed. Even if another connection is later used to modify the version, that attribute on closed instances are not changed." WebKit currently always queries the back end, even for closed connections. For example, running the attached script yields: open - expecting 1: 1 open - expecting 1: 1 open - expecting 2: 2 open - expecting 2: 2 closed - expecting 1: 2 closed - expecting 1: 2 closed - expecting 2: 2 closed - expecting 2: 2 Note the "closed - expecting 1: 2" lines that show the value was not snapshotted
Attachments
Repro case (1.36 KB, text/html)
2012-05-10 12:29 PDT, Joshua Bell
no flags
Joshua Bell
Comment 1 2012-05-10 12:29:35 PDT
Created attachment 141225 [details] Repro case
Joshua Bell
Comment 2 2012-05-23 16:18:44 PDT
Implementing http://crbug.com/129470 would make this relatively easy.
Joshua Bell
Comment 3 2012-06-22 15:23:32 PDT
Note You need to log in before you can comment on or make changes to this bug.