Diff
Modified: trunk/LayoutTests/ChangeLog (200520 => 200521)
--- trunk/LayoutTests/ChangeLog 2016-05-06 21:01:32 UTC (rev 200520)
+++ trunk/LayoutTests/ChangeLog 2016-05-06 21:04:25 UTC (rev 200521)
@@ -1,3 +1,49 @@
+2016-05-06 Brady Eidson <[email protected]>
+
+ Modern IDB (Workers): Start running a lot of the workers tests.
+ https://bugs.webkit.org/show_bug.cgi?id=157424
+
+ Reviewed by Sam Weinig.
+
+ Many tests that obviously pass need updated expectations for the details of error messages.
+
+ Others just work right out of the box.
+
+ * TestExpectations: Enable some tests, and categorize remaining failures.
+
+ * http/tests/security/cross-origin-worker-indexeddb-allowed-expected.txt:
+ * http/tests/security/cross-origin-worker-indexeddb-allowed.html:
+ * http/tests/security/cross-origin-worker-indexeddb-expected.txt:
+ * http/tests/security/cross-origin-worker-indexeddb.html:
+ * http/tests/security/resources/cross-origin-iframe-for-worker-indexeddb.html:
+ * http/tests/security/resources/document-for-cross-origin-worker-indexeddb.html:
+ * http/tests/security/resources/worker-for-indexeddb.js:
+ * storage/indexeddb/basics-workers.html:
+ * storage/indexeddb/cursor-advance-workers-expected.txt:
+ * storage/indexeddb/cursor-advance-workers.html:
+ * storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange-workers.html:
+ * storage/indexeddb/dont-commit-on-blocked-private.html:
+ * storage/indexeddb/dont-commit-on-blocked.html:
+ * storage/indexeddb/factory-basics-workers.html:
+ * storage/indexeddb/index-basics-workers-expected.txt:
+ * storage/indexeddb/index-basics-workers.html:
+ * storage/indexeddb/modern/workers-disabled.html:
+ * storage/indexeddb/objectstore-basics-workers-expected.txt:
+ * storage/indexeddb/objectstore-basics-workers.html:
+ * storage/indexeddb/open-twice-workers.html:
+ * storage/indexeddb/pending-activity-workers.html:
+ * storage/indexeddb/pending-version-change-on-exit-private.html:
+ * storage/indexeddb/pending-version-change-on-exit.html:
+ * storage/indexeddb/pending-version-change-stuck-private.html:
+ * storage/indexeddb/pending-version-change-stuck-works-with-terminate-private.html:
+ * storage/indexeddb/pending-version-change-stuck-works-with-terminate.html:
+ * storage/indexeddb/pending-version-change-stuck.html:
+ * storage/indexeddb/transaction-complete-workers-expected.txt:
+ * storage/indexeddb/transaction-complete-workers-private-expected.txt:
+ * storage/indexeddb/transaction-complete-workers-private.html:
+ * storage/indexeddb/transaction-complete-workers.html:
+ * storage/indexeddb/unprefix-workers.html:
+
2016-05-06 Ryosuke Niwa <[email protected]>
FKA: No way to get focus from DOM to shadow DOM components (Was: HTML5 media controls not keyboard accessible)
Modified: trunk/LayoutTests/TestExpectations (200520 => 200521)
--- trunk/LayoutTests/TestExpectations 2016-05-06 21:01:32 UTC (rev 200520)
+++ trunk/LayoutTests/TestExpectations 2016-05-06 21:04:25 UTC (rev 200521)
@@ -908,28 +908,19 @@
webkit.org/b/154619 storage/indexeddb/odd-strings.html [ Skip ]
-# No workers support in Modern IDB yet
-http/tests/security/cross-origin-worker-indexeddb-allowed.html
-http/tests/security/cross-origin-worker-indexeddb.html
-storage/indexeddb/basics-workers.html
-storage/indexeddb/cursor-advance-workers.html
-storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange-workers.html
-storage/indexeddb/dont-commit-on-blocked-private.html
-storage/indexeddb/dont-commit-on-blocked.html
-storage/indexeddb/factory-basics-workers.html
-storage/indexeddb/index-basics-workers.html
-storage/indexeddb/objectstore-basics-workers.html
-storage/indexeddb/open-twice-workers.html
-storage/indexeddb/pending-activity-workers.html
-storage/indexeddb/pending-version-change-on-exit-private.html
-storage/indexeddb/pending-version-change-on-exit.html
+# IDB workers tests that fail
+storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange-workers.html [ Failure ]
+storage/indexeddb/dont-commit-on-blocked-private.html [ Failure ]
+storage/indexeddb/dont-commit-on-blocked.html [ Failure ]
+storage/indexeddb/factory-basics-workers.html [ Failure ]
+storage/indexeddb/pending-activity-workers.html [ Failure ]
+storage/indexeddb/unprefix-workers.html [ Failure ]
+
+# IDB workers tests that timeout
+storage/indexeddb/pending-version-change-stuck.html
storage/indexeddb/pending-version-change-stuck-private.html
-storage/indexeddb/pending-version-change-stuck-works-with-terminate-private.html
storage/indexeddb/pending-version-change-stuck-works-with-terminate.html
-storage/indexeddb/pending-version-change-stuck.html
-storage/indexeddb/transaction-complete-workers-private.html
-storage/indexeddb/transaction-complete-workers.html
-storage/indexeddb/unprefix-workers.html
+storage/indexeddb/pending-version-change-stuck-works-with-terminate-private.html
# Test's behavior specific to Legacy IDB with LevelDB backend
# Modern IDB is spec-compliant without supporting this behavior
Modified: trunk/LayoutTests/http/tests/security/cross-origin-worker-indexeddb-allowed-expected.txt (200520 => 200521)
--- trunk/LayoutTests/http/tests/security/cross-origin-worker-indexeddb-allowed-expected.txt 2016-05-06 21:01:32 UTC (rev 200520)
+++ trunk/LayoutTests/http/tests/security/cross-origin-worker-indexeddb-allowed-expected.txt 2016-05-06 21:04:25 UTC (rev 200521)
@@ -5,15 +5,13 @@
--------
Frame: '<!--framePath //<!--frame0-->-->'
--------
-Successfully called self.webkitIndexedDB.deleteDatabase().
-Successfully called self.webkitIndexedDB.open().
-Successfully called self.webkitIndexedDB.webkitGetDatabaseNames().
+Successfully called self.indexedDB.deleteDatabase().
+Successfully called self.indexedDB.open().
--------
Frame: '<!--framePath //<!--frame1-->-->'
--------
-Successfully called self.webkitIndexedDB.deleteDatabase().
-Successfully called self.webkitIndexedDB.open().
-Successfully called self.webkitIndexedDB.webkitGetDatabaseNames().
+Successfully called self.indexedDB.deleteDatabase().
+Successfully called self.indexedDB.open().
Modified: trunk/LayoutTests/http/tests/security/cross-origin-worker-indexeddb-allowed.html (200520 => 200521)
--- trunk/LayoutTests/http/tests/security/cross-origin-worker-indexeddb-allowed.html 2016-05-06 21:01:32 UTC (rev 200520)
+++ trunk/LayoutTests/http/tests/security/cross-origin-worker-indexeddb-allowed.html 2016-05-06 21:04:25 UTC (rev 200521)
@@ -1,22 +1,25 @@
<!DOCTYPE html>
<html>
<head>
- <script>
- var frames = 2;
- if (window.testRunner) {
- testRunner.dumpAsText();
- testRunner.dumpChildFramesAsText();
- testRunner.waitUntilDone();
- }
+<script>
+if (window.internals)
+ window.internals.settings.setIndexedDBWorkersEnabled(true);
- function decrement() {
- --frames;
- if (!frames && window.testRunner)
- testRunner.notifyDone();
- }
+var frames = 2;
+if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.dumpChildFramesAsText();
+ testRunner.waitUntilDone();
+}
- window._onmessage_ = decrement;
- </script>
+function decrement() {
+ --frames;
+ if (!frames && window.testRunner)
+ testRunner.notifyDone();
+}
+
+window._onmessage_ = decrement;
+</script>
</head>
<body>
<p>Both of these frames should successfully open the database:</p>
Modified: trunk/LayoutTests/http/tests/security/cross-origin-worker-indexeddb-expected.txt (200520 => 200521)
--- trunk/LayoutTests/http/tests/security/cross-origin-worker-indexeddb-expected.txt 2016-05-06 21:01:32 UTC (rev 200520)
+++ trunk/LayoutTests/http/tests/security/cross-origin-worker-indexeddb-expected.txt 2016-05-06 21:04:25 UTC (rev 200521)
@@ -5,15 +5,13 @@
--------
Frame: '<!--framePath //<!--frame0-->-->'
--------
-self.webkitIndexedDB.deleteDatabase() threw an exception: SecurityError
-self.webkitIndexedDB.open() threw an exception: SecurityError
-self.webkitIndexedDB.webkitGetDatabaseNames() threw an exception: SecurityError
+self.indexedDB.deleteDatabase() threw an exception: SecurityError
+self.indexedDB.open() threw an exception: SecurityError
--------
Frame: '<!--framePath //<!--frame1-->-->'
--------
-Successfully called self.webkitIndexedDB.deleteDatabase().
-Successfully called self.webkitIndexedDB.open().
-Successfully called self.webkitIndexedDB.webkitGetDatabaseNames().
+Successfully called self.indexedDB.deleteDatabase().
+Successfully called self.indexedDB.open().
Modified: trunk/LayoutTests/http/tests/security/cross-origin-worker-indexeddb.html (200520 => 200521)
--- trunk/LayoutTests/http/tests/security/cross-origin-worker-indexeddb.html 2016-05-06 21:01:32 UTC (rev 200520)
+++ trunk/LayoutTests/http/tests/security/cross-origin-worker-indexeddb.html 2016-05-06 21:04:25 UTC (rev 200521)
@@ -3,17 +3,20 @@
<head>
</head>
<body>
- <script>
- if (window.testRunner) {
- testRunner.dumpAsText();
- testRunner.dumpChildFramesAsText();
- testRunner.waitUntilDone();
- testRunner.setCanOpenWindows(true);
- testRunner.setCloseRemainingWindowsWhenComplete(true);
- internals.settings.setStorageBlockingPolicy('BlockThirdParty');
- }
+<script>
+if (window.internals)
+ window.internals.settings.setIndexedDBWorkersEnabled(true);
- document.location = "resources/document-for-cross-origin-worker-indexeddb.html"
- </script>
+if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.dumpChildFramesAsText();
+ testRunner.waitUntilDone();
+ testRunner.setCanOpenWindows(true);
+ testRunner.setCloseRemainingWindowsWhenComplete(true);
+ internals.settings.setStorageBlockingPolicy('BlockThirdParty');
+}
+
+document.location = "resources/document-for-cross-origin-worker-indexeddb.html"
+</script>
</body>
</html>
Modified: trunk/LayoutTests/http/tests/security/resources/cross-origin-iframe-for-worker-indexeddb.html (200520 => 200521)
--- trunk/LayoutTests/http/tests/security/resources/cross-origin-iframe-for-worker-indexeddb.html 2016-05-06 21:01:32 UTC (rev 200520)
+++ trunk/LayoutTests/http/tests/security/resources/cross-origin-iframe-for-worker-indexeddb.html 2016-05-06 21:04:25 UTC (rev 200521)
@@ -1,17 +1,20 @@
<!DOCTYPE html>
<html>
<head>
- <script>
- window._onload_ = function() {
- var worker = new Worker('worker-for-indexeddb.js');
- worker.postMessage(true);
- worker._onmessage_ = function(event) {
- for (var i = 0; i < event.data.result.length; i++)
- document.write(event.data.result[i]);
- window.parent.postMessage('DONE', '*');
- };
- };
- </script>
+<script>
+if (window.internals)
+ window.internals.settings.setIndexedDBWorkersEnabled(true);
+
+window._onload_ = function() {
+ var worker = new Worker('worker-for-indexeddb.js');
+ worker.postMessage(true);
+ worker._onmessage_ = function(event) {
+ for (var i = 0; i < event.data.result.length; i++)
+ document.write(event.data.result[i]);
+ window.parent.postMessage('DONE', '*');
+ };
+};
+</script>
</head>
<body>
</body>
Modified: trunk/LayoutTests/http/tests/security/resources/document-for-cross-origin-worker-indexeddb.html (200520 => 200521)
--- trunk/LayoutTests/http/tests/security/resources/document-for-cross-origin-worker-indexeddb.html 2016-05-06 21:01:32 UTC (rev 200520)
+++ trunk/LayoutTests/http/tests/security/resources/document-for-cross-origin-worker-indexeddb.html 2016-05-06 21:04:25 UTC (rev 200521)
@@ -1,19 +1,22 @@
<!DOCTYPE html>
<html>
<head>
- <script>
- var frames = 2;
+<script>
+if (window.internals)
+ window.internals.settings.setIndexedDBWorkersEnabled(true);
+
+var frames = 2;
- function decrement() {
- --frames;
- if (!frames && window.testRunner) {
- internals.settings.setStorageBlockingPolicy('AllowAll');
- testRunner.notifyDone();
- }
- }
+function decrement() {
+ --frames;
+ if (!frames && window.testRunner) {
+ internals.settings.setStorageBlockingPolicy('AllowAll');
+ testRunner.notifyDone();
+ }
+}
- window._onmessage_ = decrement;
- </script>
+window._onmessage_ = decrement;
+</script>
</head>
<body>
<p>The first iframe below should return a security error, and the second should successfully open the database.</p>
Modified: trunk/LayoutTests/http/tests/security/resources/worker-for-indexeddb.js (200520 => 200521)
--- trunk/LayoutTests/http/tests/security/resources/worker-for-indexeddb.js 2016-05-06 21:01:32 UTC (rev 200520)
+++ trunk/LayoutTests/http/tests/security/resources/worker-for-indexeddb.js 2016-05-06 21:04:25 UTC (rev 200521)
@@ -1,17 +1,16 @@
self._onmessage_ = function() {
function test(method, args) {
try {
- var request = self.webkitIndexedDB[method].call(self.webkitIndexedDB, args);
- return 'Successfully called self.webkitIndexedDB.' + method + '().<br>';
+ var request = self.indexedDB[method].call(self.indexedDB, args);
+ return 'Successfully called self.indexedDB.' + method + '().<br>';
} catch (exception) {
- return 'self.webkitIndexedDB.' + method + '() threw an exception: ' + exception.name + '<br>';
+ return 'self.indexedDB.' + method + '() threw an exception: ' + exception.name + '<br>';
}
}
self.postMessage({
'result': [
test('deleteDatabase', 'testDBName'),
test('open', 'testDBName'),
- test('webkitGetDatabaseNames')
]
});
};
Modified: trunk/LayoutTests/storage/indexeddb/basics-workers.html (200520 => 200521)
--- trunk/LayoutTests/storage/indexeddb/basics-workers.html 2016-05-06 21:01:32 UTC (rev 200520)
+++ trunk/LayoutTests/storage/indexeddb/basics-workers.html 2016-05-06 21:04:25 UTC (rev 200521)
@@ -4,6 +4,10 @@
<script src=""
</head>
<body>
-<script>worker = startWorker('resources/basics.js');</script>
+<script>
+if (window.internals)
+ window.internals.settings.setIndexedDBWorkersEnabled(true);
+worker = startWorker('resources/basics.js');
+</script>
</body>
</html>
Modified: trunk/LayoutTests/storage/indexeddb/cursor-advance-workers-expected.txt (200520 => 200521)
--- trunk/LayoutTests/storage/indexeddb/cursor-advance-workers-expected.txt 2016-05-06 21:01:32 UTC (rev 200520)
+++ trunk/LayoutTests/storage/indexeddb/cursor-advance-workers-expected.txt 2016-05-06 21:04:25 UTC (rev 200521)
@@ -6,7 +6,6 @@
Starting worker: resources/cursor-advance.js
[Worker] indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
[Worker]
-[Worker] dbname = "cursor-advance.js"
[Worker] indexedDB.deleteDatabase(dbname)
[Worker] indexedDB.open(dbname)
[Worker]
@@ -182,13 +181,13 @@
PASS [Worker] cursor.advance(0) threw TypeError: Failed to execute 'advance' on 'IDBCursor': A count argument with value 0 (zero) was supplied, must be greater than 0.
[Worker] Expecting TypeError exception from cursor.advance(-1)
PASS [Worker] Exception was thrown.
-PASS [Worker] cursor.advance(-1) threw TypeError: Failed to execute 'advance' on 'IDBCursor': Value is outside the 'unsigned long' value range.
+PASS [Worker] cursor.advance(-1) threw TypeError: Value -1 is outside the range [0, 4294967295]
[Worker] Expecting TypeError exception from cursor.advance(0x100000000)
PASS [Worker] Exception was thrown.
-PASS [Worker] cursor.advance(0x100000000) threw TypeError: Failed to execute 'advance' on 'IDBCursor': Value is outside the 'unsigned long' value range.
+PASS [Worker] cursor.advance(0x100000000) threw TypeError: Value 4294967296 is outside the range [0, 4294967295]
[Worker] Expecting TypeError exception from cursor.advance(0x20000000000000)
PASS [Worker] Exception was thrown.
-PASS [Worker] cursor.advance(0x20000000000000) threw TypeError: Failed to execute 'advance' on 'IDBCursor': Value is outside the 'unsigned long' value range.
+PASS [Worker] cursor.advance(0x20000000000000) threw TypeError: Value 9007199254740992 is outside the range [0, 4294967295]
[Worker]
[Worker] testEdges():
[Worker] trans = db.transaction(objectStoreName, 'readonly')
Modified: trunk/LayoutTests/storage/indexeddb/cursor-advance-workers.html (200520 => 200521)
--- trunk/LayoutTests/storage/indexeddb/cursor-advance-workers.html 2016-05-06 21:01:32 UTC (rev 200520)
+++ trunk/LayoutTests/storage/indexeddb/cursor-advance-workers.html 2016-05-06 21:04:25 UTC (rev 200521)
@@ -4,6 +4,10 @@
<script src=""
</head>
<body>
-<script>worker = startWorker('resources/cursor-advance.js');</script>
+<script>
+if (window.internals)
+ window.internals.settings.setIndexedDBWorkersEnabled(true);
+worker = startWorker('resources/cursor-advance.js');
+</script>
</body>
</html>
Modified: trunk/LayoutTests/storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange-workers.html (200520 => 200521)
--- trunk/LayoutTests/storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange-workers.html 2016-05-06 21:01:32 UTC (rev 200520)
+++ trunk/LayoutTests/storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange-workers.html 2016-05-06 21:04:25 UTC (rev 200521)
@@ -4,6 +4,10 @@
<script src=""
</head>
<body>
-<script>worker = startWorker('resources/deletedatabase-delayed-by-open-and-versionchange.js');</script>
+<script>
+if (window.internals)
+ window.internals.settings.setIndexedDBWorkersEnabled(true);
+worker = startWorker('resources/deletedatabase-delayed-by-open-and-versionchange.js');
+</script>
</body>
</html>
Modified: trunk/LayoutTests/storage/indexeddb/dont-commit-on-blocked-private.html (200520 => 200521)
--- trunk/LayoutTests/storage/indexeddb/dont-commit-on-blocked-private.html 2016-05-06 21:01:32 UTC (rev 200520)
+++ trunk/LayoutTests/storage/indexeddb/dont-commit-on-blocked-private.html 2016-05-06 21:04:25 UTC (rev 200521)
@@ -5,6 +5,8 @@
</head>
<body>
<script>
+if (window.internals)
+ window.internals.settings.setIndexedDBWorkersEnabled(true);
description("Regression test for WK82678 - don't commit after a blocked event");
Modified: trunk/LayoutTests/storage/indexeddb/dont-commit-on-blocked.html (200520 => 200521)
--- trunk/LayoutTests/storage/indexeddb/dont-commit-on-blocked.html 2016-05-06 21:01:32 UTC (rev 200520)
+++ trunk/LayoutTests/storage/indexeddb/dont-commit-on-blocked.html 2016-05-06 21:04:25 UTC (rev 200521)
@@ -5,7 +5,9 @@
</head>
<body>
<script>
-
+if (window.internals)
+ window.internals.settings.setIndexedDBWorkersEnabled(true);
+
description("Regression test for WK82678 - don't commit after a blocked event");
indexedDBTest(prepareDatabase, holdConnection);
Modified: trunk/LayoutTests/storage/indexeddb/factory-basics-workers.html (200520 => 200521)
--- trunk/LayoutTests/storage/indexeddb/factory-basics-workers.html 2016-05-06 21:01:32 UTC (rev 200520)
+++ trunk/LayoutTests/storage/indexeddb/factory-basics-workers.html 2016-05-06 21:04:25 UTC (rev 200521)
@@ -4,6 +4,10 @@
<script src=""
</head>
<body>
-<script>worker = startWorker('resources/factory-basics.js');</script>
+<script>
+if (window.internals)
+ window.internals.settings.setIndexedDBWorkersEnabled(true);
+worker = startWorker('resources/factory-basics.js');
+</script>
</body>
</html>
Modified: trunk/LayoutTests/storage/indexeddb/index-basics-workers-expected.txt (200520 => 200521)
--- trunk/LayoutTests/storage/indexeddb/index-basics-workers-expected.txt 2016-05-06 21:01:32 UTC (rev 200520)
+++ trunk/LayoutTests/storage/indexeddb/index-basics-workers-expected.txt 2016-05-06 21:04:25 UTC (rev 200521)
@@ -6,7 +6,6 @@
Starting worker: resources/index-basics.js
[Worker] indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
[Worker]
-[Worker] dbname = "index-basics.js"
[Worker] indexedDB.deleteDatabase(dbname)
[Worker] indexedDB.open(dbname)
[Worker]
Modified: trunk/LayoutTests/storage/indexeddb/index-basics-workers.html (200520 => 200521)
--- trunk/LayoutTests/storage/indexeddb/index-basics-workers.html 2016-05-06 21:01:32 UTC (rev 200520)
+++ trunk/LayoutTests/storage/indexeddb/index-basics-workers.html 2016-05-06 21:04:25 UTC (rev 200521)
@@ -4,6 +4,10 @@
<script src=""
</head>
<body>
-<script>worker = startWorker('resources/index-basics.js');</script>
+<script>
+if (window.internals)
+ window.internals.settings.setIndexedDBWorkersEnabled(true);
+worker = startWorker('resources/index-basics.js');
+</script>
</body>
</html>
Modified: trunk/LayoutTests/storage/indexeddb/modern/workers-disabled.html (200520 => 200521)
--- trunk/LayoutTests/storage/indexeddb/modern/workers-disabled.html 2016-05-06 21:01:32 UTC (rev 200520)
+++ trunk/LayoutTests/storage/indexeddb/modern/workers-disabled.html 2016-05-06 21:04:25 UTC (rev 200521)
@@ -5,13 +5,9 @@
</head>
<body>
<script>
-
-/*
-IndexedDB for workers is currently disabled by default.
-Once that changes, we'll need the following code to keep this test passing.
if (window.internals)
window.internals.settings.setIndexedDBWorkersEnabled(false);
-*/
+
worker = startWorker('resources/workers-disabled.js');</script>
</body>
</html>
Modified: trunk/LayoutTests/storage/indexeddb/objectstore-basics-workers-expected.txt (200520 => 200521)
--- trunk/LayoutTests/storage/indexeddb/objectstore-basics-workers-expected.txt 2016-05-06 21:01:32 UTC (rev 200520)
+++ trunk/LayoutTests/storage/indexeddb/objectstore-basics-workers-expected.txt 2016-05-06 21:04:25 UTC (rev 200521)
@@ -6,7 +6,6 @@
Starting worker: resources/objectstore-basics.js
[Worker] indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
[Worker]
-[Worker] dbname = "objectstore-basics.js"
[Worker] indexedDB.deleteDatabase(dbname)
[Worker] indexedDB.open(dbname)
[Worker]
@@ -30,8 +29,6 @@
PASS [Worker] typeof store.clear is "function"
PASS [Worker] 'openCursor' in store is true
PASS [Worker] typeof store.openCursor is "function"
-PASS [Worker] 'openKeyCursor' in store is true
-PASS [Worker] typeof store.openKeyCursor is "function"
PASS [Worker] 'createIndex' in store is true
PASS [Worker] typeof store.createIndex is "function"
PASS [Worker] 'index' in store is true
@@ -98,7 +95,7 @@
[Worker] Expecting exception from store.add({x: 'bar', y: self}, 'bar')
PASS [Worker] Exception was thrown.
PASS [Worker] code is DOMException.DATA_CLONE_ERR
-[Worker] Exception message: Failed to execute 'add' on 'IDBObjectStore': An object could not be cloned.
+[Worker] Exception message: Failed to store record in an IDBObjectStore: An object could not be cloned.
[Worker] Try to insert data where key path yields a Date key:
[Worker] store.add({x: testDateB, y: 'value'}, 'key')
[Worker] addSuccess():
@@ -114,7 +111,7 @@
PASS [Worker] Exception was thrown.
PASS [Worker] code is 0
PASS [Worker] ename is 'DataError'
-[Worker] Exception message: Failed to execute 'add' on 'IDBObjectStore': The parameter is not a valid key.
+[Worker] Exception message: Failed to store record in an IDBObjectStore: The parameter is not a valid key.
[Worker] db.transaction(['storeName'], 'readwrite')
[Worker] store = transaction.objectStore('storeName')
[Worker] Ensure invalid key pointed at by index keyPath is ignored
@@ -152,13 +149,13 @@
PASS [Worker] Exception was thrown.
PASS [Worker] code is 0
PASS [Worker] ename is 'DataError'
-[Worker] Exception message: Failed to execute 'add' on 'IDBObjectStore': The parameter is not a valid key.
+[Worker] Exception message: Failed to store record in an IDBObjectStore: The parameter is not a valid key.
[Worker] Passing an invalid key into store.put().
[Worker] Expecting exception from store.put(null, {})
PASS [Worker] Exception was thrown.
PASS [Worker] code is 0
PASS [Worker] ename is 'DataError'
-[Worker] Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is not a valid key.
+[Worker] Exception message: Failed to store record in an IDBObjectStore: The parameter is not a valid key.
[Worker]
[Worker] testPreConditions():
[Worker] indexedDB.open(dbname, 3)
@@ -175,31 +172,31 @@
PASS [Worker] Exception was thrown.
PASS [Worker] code is 0
PASS [Worker] ename is 'DataError'
-[Worker] Exception message: Failed to execute 'put' on 'IDBObjectStore': The object store uses in-line keys and the key parameter was provided.
+[Worker] Exception message: Failed to store record in an IDBObjectStore: The object store uses in-line keys and the key parameter was provided.
[Worker] The object store uses out-of-line keys and has no key generator and the key parameter was not provided.
[Worker] Expecting exception from storeWithOutOfLineKeys.put({})
PASS [Worker] Exception was thrown.
PASS [Worker] code is 0
PASS [Worker] ename is 'DataError'
-[Worker] Exception message: Failed to execute 'put' on 'IDBObjectStore': The object store uses out-of-line keys and has no key generator and the key parameter was not provided.
+[Worker] Exception message: Failed to store record in an IDBObjectStore: The object store uses out-of-line keys and has no key generator and the key parameter was not provided.
[Worker] The object store uses in-line keys and the result of evaluating the object store's key path yields a value and that value is not a valid key.
[Worker] Expecting exception from storeWithInLineKeys.put({key: null})
PASS [Worker] Exception was thrown.
PASS [Worker] code is 0
PASS [Worker] ename is 'DataError'
-[Worker] Exception message: Failed to execute 'put' on 'IDBObjectStore': Evaluating the object store's key path yielded a value that is not a valid key.
+[Worker] Exception message: Failed to store record in an IDBObjectStore: Evaluating the object store's key path yielded a value that is not a valid key.
[Worker] The object store uses in-line keys but no key generator and the result of evaluating the object store's key path does not yield a value.
[Worker] Expecting exception from storeWithInLineKeys.put({})
PASS [Worker] Exception was thrown.
PASS [Worker] code is 0
PASS [Worker] ename is 'DataError'
-[Worker] Exception message: Failed to execute 'put' on 'IDBObjectStore': Evaluating the object store's key path did not yield a value.
+[Worker] Exception message: Failed to store record in an IDBObjectStore: Evaluating the object store's key path did not yield a value.
[Worker] The key parameter was provided but does not contain a valid key.
[Worker] Expecting exception from storeWithOutOfLineKeys.put({}, null)
PASS [Worker] Exception was thrown.
PASS [Worker] code is 0
PASS [Worker] ename is 'DataError'
-[Worker] Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is not a valid key.
+[Worker] Exception message: Failed to store record in an IDBObjectStore: The parameter is not a valid key.
[Worker]
[Worker] IDBObjectStore.add()
[Worker] The object store uses in-line keys and the key parameter was provided.
@@ -207,31 +204,31 @@
PASS [Worker] Exception was thrown.
PASS [Worker] code is 0
PASS [Worker] ename is 'DataError'
-[Worker] Exception message: Failed to execute 'add' on 'IDBObjectStore': The object store uses in-line keys and the key parameter was provided.
+[Worker] Exception message: Failed to store record in an IDBObjectStore: The object store uses in-line keys and the key parameter was provided.
[Worker] The object store uses out-of-line keys and has no key generator and the key parameter was not provided.
[Worker] Expecting exception from storeWithOutOfLineKeys.add({})
PASS [Worker] Exception was thrown.
PASS [Worker] code is 0
PASS [Worker] ename is 'DataError'
-[Worker] Exception message: Failed to execute 'add' on 'IDBObjectStore': The object store uses out-of-line keys and has no key generator and the key parameter was not provided.
+[Worker] Exception message: Failed to store record in an IDBObjectStore: The object store uses out-of-line keys and has no key generator and the key parameter was not provided.
[Worker] The object store uses in-line keys and the result of evaluating the object store's key path yields a value and that value is not a valid key.
[Worker] Expecting exception from storeWithInLineKeys.add({key: null})
PASS [Worker] Exception was thrown.
PASS [Worker] code is 0
PASS [Worker] ename is 'DataError'
-[Worker] Exception message: Failed to execute 'add' on 'IDBObjectStore': Evaluating the object store's key path yielded a value that is not a valid key.
+[Worker] Exception message: Failed to store record in an IDBObjectStore: Evaluating the object store's key path yielded a value that is not a valid key.
[Worker] The object store uses in-line keys but no key generator and the result of evaluating the object store's key path does not yield a value.
[Worker] Expecting exception from storeWithInLineKeys.add({})
PASS [Worker] Exception was thrown.
PASS [Worker] code is 0
PASS [Worker] ename is 'DataError'
-[Worker] Exception message: Failed to execute 'add' on 'IDBObjectStore': Evaluating the object store's key path did not yield a value.
+[Worker] Exception message: Failed to store record in an IDBObjectStore: Evaluating the object store's key path did not yield a value.
[Worker] The key parameter was provided but does not contain a valid key.
[Worker] Expecting exception from storeWithOutOfLineKeys.add({}, null)
PASS [Worker] Exception was thrown.
PASS [Worker] code is 0
PASS [Worker] ename is 'DataError'
-[Worker] Exception message: Failed to execute 'add' on 'IDBObjectStore': The parameter is not a valid key.
+[Worker] Exception message: Failed to store record in an IDBObjectStore: The parameter is not a valid key.
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/storage/indexeddb/objectstore-basics-workers.html (200520 => 200521)
--- trunk/LayoutTests/storage/indexeddb/objectstore-basics-workers.html 2016-05-06 21:01:32 UTC (rev 200520)
+++ trunk/LayoutTests/storage/indexeddb/objectstore-basics-workers.html 2016-05-06 21:04:25 UTC (rev 200521)
@@ -4,6 +4,10 @@
<script src=""
</head>
<body>
-<script>worker = startWorker('resources/objectstore-basics.js');</script>
+<script>
+if (window.internals)
+ window.internals.settings.setIndexedDBWorkersEnabled(true);
+worker = startWorker('resources/objectstore-basics.js');
+</script>
</body>
</html>
Modified: trunk/LayoutTests/storage/indexeddb/open-twice-workers.html (200520 => 200521)
--- trunk/LayoutTests/storage/indexeddb/open-twice-workers.html 2016-05-06 21:01:32 UTC (rev 200520)
+++ trunk/LayoutTests/storage/indexeddb/open-twice-workers.html 2016-05-06 21:04:25 UTC (rev 200521)
@@ -4,6 +4,10 @@
<script src=""
</head>
<body>
-<script>worker = startWorker('resources/open-twice.js');</script>
+<script>
+if (window.internals)
+ window.internals.settings.setIndexedDBWorkersEnabled(true);
+worker = startWorker('resources/open-twice.js');
+</script>
</body>
</html>
Modified: trunk/LayoutTests/storage/indexeddb/pending-activity-workers.html (200520 => 200521)
--- trunk/LayoutTests/storage/indexeddb/pending-activity-workers.html 2016-05-06 21:01:32 UTC (rev 200520)
+++ trunk/LayoutTests/storage/indexeddb/pending-activity-workers.html 2016-05-06 21:04:25 UTC (rev 200521)
@@ -2,5 +2,9 @@
<script src=""
<script src=""
<body>
-<script>worker = startWorker('resources/pending-activity.js');</script>
+<script>
+if (window.internals)
+ window.internals.settings.setIndexedDBWorkersEnabled(true);
+worker = startWorker('resources/pending-activity.js');
+</script>
</body>
Modified: trunk/LayoutTests/storage/indexeddb/pending-version-change-on-exit-private.html (200520 => 200521)
--- trunk/LayoutTests/storage/indexeddb/pending-version-change-on-exit-private.html 2016-05-06 21:01:32 UTC (rev 200520)
+++ trunk/LayoutTests/storage/indexeddb/pending-version-change-on-exit-private.html 2016-05-06 21:04:25 UTC (rev 200521)
@@ -5,6 +5,8 @@
</head>
<body>
<script>
+if (window.internals)
+ window.internals.settings.setIndexedDBWorkersEnabled(true);
description("No crashes when there are event listeners in a worker on shutdown");
Modified: trunk/LayoutTests/storage/indexeddb/pending-version-change-on-exit.html (200520 => 200521)
--- trunk/LayoutTests/storage/indexeddb/pending-version-change-on-exit.html 2016-05-06 21:01:32 UTC (rev 200520)
+++ trunk/LayoutTests/storage/indexeddb/pending-version-change-on-exit.html 2016-05-06 21:04:25 UTC (rev 200521)
@@ -5,6 +5,8 @@
</head>
<body>
<script>
+if (window.internals)
+ window.internals.settings.setIndexedDBWorkersEnabled(true);
description("No crashes when there are event listeners in a worker on shutdown");
Modified: trunk/LayoutTests/storage/indexeddb/pending-version-change-stuck-private.html (200520 => 200521)
--- trunk/LayoutTests/storage/indexeddb/pending-version-change-stuck-private.html 2016-05-06 21:01:32 UTC (rev 200520)
+++ trunk/LayoutTests/storage/indexeddb/pending-version-change-stuck-private.html 2016-05-06 21:04:25 UTC (rev 200521)
@@ -5,6 +5,8 @@
</head>
<body>
<script>
+if (window.internals)
+ window.internals.settings.setIndexedDBWorkersEnabled(true);
description("Implicitly terminating worker with blocked setVersion call should allow later open calls to proceed");
Modified: trunk/LayoutTests/storage/indexeddb/pending-version-change-stuck-works-with-terminate-private.html (200520 => 200521)
--- trunk/LayoutTests/storage/indexeddb/pending-version-change-stuck-works-with-terminate-private.html 2016-05-06 21:01:32 UTC (rev 200520)
+++ trunk/LayoutTests/storage/indexeddb/pending-version-change-stuck-works-with-terminate-private.html 2016-05-06 21:04:25 UTC (rev 200521)
@@ -5,6 +5,8 @@
</head>
<body>
<script>
+if (window.internals)
+ window.internals.settings.setIndexedDBWorkersEnabled(true);
description("Explicitly terminating worker with blocked call should allow later open calls to proceed");
Modified: trunk/LayoutTests/storage/indexeddb/pending-version-change-stuck-works-with-terminate.html (200520 => 200521)
--- trunk/LayoutTests/storage/indexeddb/pending-version-change-stuck-works-with-terminate.html 2016-05-06 21:01:32 UTC (rev 200520)
+++ trunk/LayoutTests/storage/indexeddb/pending-version-change-stuck-works-with-terminate.html 2016-05-06 21:04:25 UTC (rev 200521)
@@ -5,6 +5,8 @@
</head>
<body>
<script>
+if (window.internals)
+ window.internals.settings.setIndexedDBWorkersEnabled(true);
description("Explicitly terminating worker with blocked call should allow later open calls to proceed");
Modified: trunk/LayoutTests/storage/indexeddb/pending-version-change-stuck.html (200520 => 200521)
--- trunk/LayoutTests/storage/indexeddb/pending-version-change-stuck.html 2016-05-06 21:01:32 UTC (rev 200520)
+++ trunk/LayoutTests/storage/indexeddb/pending-version-change-stuck.html 2016-05-06 21:04:25 UTC (rev 200521)
@@ -5,6 +5,8 @@
</head>
<body>
<script>
+if (window.internals)
+ window.internals.settings.setIndexedDBWorkersEnabled(true);
description("Implicitly terminating worker with blocked setVersion call should allow later open calls to proceed");
Modified: trunk/LayoutTests/storage/indexeddb/transaction-complete-workers-expected.txt (200520 => 200521)
--- trunk/LayoutTests/storage/indexeddb/transaction-complete-workers-expected.txt 2016-05-06 21:01:32 UTC (rev 200520)
+++ trunk/LayoutTests/storage/indexeddb/transaction-complete-workers-expected.txt 2016-05-06 21:04:25 UTC (rev 200521)
@@ -6,7 +6,6 @@
Starting worker: resources/transaction-complete-workers.js
[Worker] indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
[Worker]
-[Worker] dbname = "transaction-complete-workers.js"
[Worker] indexedDB.deleteDatabase(dbname)
[Worker] indexedDB.open(dbname)
[Worker]
@@ -21,7 +20,7 @@
PASS [Worker] Exception was thrown.
PASS [Worker] code is 0
PASS [Worker] ename is 'TransactionInactiveError'
-[Worker] Exception message: Failed to execute 'get' on 'IDBObjectStore': The transaction has finished.
+[Worker] Exception message: Failed to execute 'get' on 'IDBObjectStore': The transaction is inactive or finished.
[Worker]
[Worker] recursionTest():
[Worker] transaction = db.transaction('store')
@@ -51,7 +50,7 @@
PASS [Worker] Exception was thrown.
PASS [Worker] code is 0
PASS [Worker] ename is 'TransactionInactiveError'
-[Worker] Exception message: Failed to execute 'get' on 'IDBObjectStore': The transaction has finished.
+[Worker] Exception message: Failed to execute 'get' on 'IDBObjectStore': The transaction is inactive or finished.
[Worker]
[Worker] trying a timeout callback:
[Worker] setTimeout(timeoutTest, 0)
@@ -64,7 +63,7 @@
PASS [Worker] Exception was thrown.
PASS [Worker] code is 0
PASS [Worker] ename is 'TransactionInactiveError'
-[Worker] Exception message: Failed to execute 'get' on 'IDBObjectStore': The transaction has finished.
+[Worker] Exception message: Failed to execute 'get' on 'IDBObjectStore': The transaction is inactive or finished.
[Worker]
[Worker] errorTest():
[Worker] self.old_onerror = self.onerror
@@ -81,7 +80,7 @@
PASS [Worker] Exception was thrown.
PASS [Worker] code is 0
PASS [Worker] ename is 'TransactionInactiveError'
-[Worker] Exception message: Failed to execute 'get' on 'IDBObjectStore': The transaction has finished.
+[Worker] Exception message: Failed to execute 'get' on 'IDBObjectStore': The transaction is inactive or finished.
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/storage/indexeddb/transaction-complete-workers-private-expected.txt (200520 => 200521)
--- trunk/LayoutTests/storage/indexeddb/transaction-complete-workers-private-expected.txt 2016-05-06 21:01:32 UTC (rev 200520)
+++ trunk/LayoutTests/storage/indexeddb/transaction-complete-workers-private-expected.txt 2016-05-06 21:04:25 UTC (rev 200521)
@@ -20,7 +20,7 @@
PASS [Worker] Exception was thrown.
PASS [Worker] code is 0
PASS [Worker] ename is 'TransactionInactiveError'
-[Worker] Exception message: Failed to execute 'get' on 'IDBObjectStore': The transaction has finished.
+[Worker] Exception message: Failed to execute 'get' on 'IDBObjectStore': The transaction is inactive or finished.
[Worker]
[Worker] recursionTest():
[Worker] transaction = db.transaction('store')
@@ -50,7 +50,7 @@
PASS [Worker] Exception was thrown.
PASS [Worker] code is 0
PASS [Worker] ename is 'TransactionInactiveError'
-[Worker] Exception message: Failed to execute 'get' on 'IDBObjectStore': The transaction has finished.
+[Worker] Exception message: Failed to execute 'get' on 'IDBObjectStore': The transaction is inactive or finished.
[Worker]
[Worker] trying a timeout callback:
[Worker] setTimeout(timeoutTest, 0)
@@ -63,7 +63,7 @@
PASS [Worker] Exception was thrown.
PASS [Worker] code is 0
PASS [Worker] ename is 'TransactionInactiveError'
-[Worker] Exception message: Failed to execute 'get' on 'IDBObjectStore': The transaction has finished.
+[Worker] Exception message: Failed to execute 'get' on 'IDBObjectStore': The transaction is inactive or finished.
[Worker]
[Worker] errorTest():
[Worker] self.old_onerror = self.onerror
@@ -80,7 +80,7 @@
PASS [Worker] Exception was thrown.
PASS [Worker] code is 0
PASS [Worker] ename is 'TransactionInactiveError'
-[Worker] Exception message: Failed to execute 'get' on 'IDBObjectStore': The transaction has finished.
+[Worker] Exception message: Failed to execute 'get' on 'IDBObjectStore': The transaction is inactive or finished.
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/storage/indexeddb/transaction-complete-workers-private.html (200520 => 200521)
--- trunk/LayoutTests/storage/indexeddb/transaction-complete-workers-private.html 2016-05-06 21:01:32 UTC (rev 200520)
+++ trunk/LayoutTests/storage/indexeddb/transaction-complete-workers-private.html 2016-05-06 21:04:25 UTC (rev 200521)
@@ -5,6 +5,8 @@
</head>
<body>
<script>
+if (window.internals)
+ window.internals.settings.setIndexedDBWorkersEnabled(true);
worker = startWorker('resources/transaction-complete-workers.js');
Modified: trunk/LayoutTests/storage/indexeddb/transaction-complete-workers.html (200520 => 200521)
--- trunk/LayoutTests/storage/indexeddb/transaction-complete-workers.html 2016-05-06 21:01:32 UTC (rev 200520)
+++ trunk/LayoutTests/storage/indexeddb/transaction-complete-workers.html 2016-05-06 21:04:25 UTC (rev 200521)
@@ -5,6 +5,8 @@
</head>
<body>
<script>
+if (window.internals)
+ window.internals.settings.setIndexedDBWorkersEnabled(true);
worker = startWorker('resources/transaction-complete-workers.js');
Modified: trunk/LayoutTests/storage/indexeddb/unprefix-workers.html (200520 => 200521)
--- trunk/LayoutTests/storage/indexeddb/unprefix-workers.html 2016-05-06 21:01:32 UTC (rev 200520)
+++ trunk/LayoutTests/storage/indexeddb/unprefix-workers.html 2016-05-06 21:04:25 UTC (rev 200521)
@@ -5,6 +5,10 @@
<script src=""
</head>
<body>
-<script>worker = startWorker('resources/unprefix.js');</script>
+<script>
+if (window.internals)
+ window.internals.settings.setIndexedDBWorkersEnabled(true);
+worker = startWorker('resources/unprefix.js');
+</script>
</body>
</html>
Modified: trunk/Source/WebCore/ChangeLog (200520 => 200521)
--- trunk/Source/WebCore/ChangeLog 2016-05-06 21:01:32 UTC (rev 200520)
+++ trunk/Source/WebCore/ChangeLog 2016-05-06 21:04:25 UTC (rev 200521)
@@ -1,3 +1,41 @@
+2016-05-06 Brady Eidson <[email protected]>
+
+ Modern IDB (Workers): Start running a lot of the workers tests.
+ https://bugs.webkit.org/show_bug.cgi?id=157424
+
+ Reviewed by Sam Weinig.
+
+ No new tests (Covered by enabling a whole bunch of existing tests).
+
+ * Modules/indexeddb/IDBDatabase.cpp:
+ (WebCore::IDBDatabase::stop): Call removeAllEventListeners() to clean up the Worker VM
+ before it shuts down.
+
+ * Modules/indexeddb/IDBRequest.cpp:
+ (WebCore::IDBRequest::stop): Call removeAllEventListeners()
+
+ * Modules/indexeddb/IDBTransaction.cpp:
+ (WebCore::IDBTransaction::IDBTransaction): Initialize with the correct VM.
+ (WebCore::IDBTransaction::stop): Call removeAllEventListeners()
+ (WebCore::IDBTransaction::operationDidComplete):
+
+ * Modules/indexeddb/client/IDBConnectionProxy.cpp:
+ (WebCore::IDBClient::IDBConnectionProxy::takeIDBOpenDBRequest):
+ (WebCore::IDBClient::IDBConnectionProxy::completeOpenDBRequest): Don't take the request from
+ the map, but rather let the request take itself from its appropriate thread.
+ * Modules/indexeddb/client/IDBConnectionProxy.h:
+
+ * Modules/indexeddb/client/TransactionOperation.h:
+ (WebCore::IDBClient::TransactionOperation::completed): Rework clearing out the completion
+ handler, as the handler itself might hold the last reference to `this`.
+
+ * page/SecurityOrigin.h:
+ (WebCore::SecurityOrigin::hasUniversalAccess):
+
+ * workers/WorkerGlobalScope.cpp:
+ (WebCore::WorkerGlobalScope::WorkerGlobalScope): If the parent context's SecurityOrigin had
+ universal access, grant it to this one.
+
2016-05-06 Ryosuke Niwa <[email protected]>
FKA: No way to get focus from DOM to shadow DOM components (Was: HTML5 media controls not keyboard accessible)
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp (200520 => 200521)
--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp 2016-05-06 21:01:32 UTC (rev 200520)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp 2016-05-06 21:04:25 UTC (rev 200521)
@@ -285,6 +285,8 @@
ASSERT(currentThread() == m_originThreadID);
+ removeAllEventListeners();
+
Vector<IDBResourceIdentifier> transactionIdentifiers;
transactionIdentifiers.reserveInitialCapacity(m_activeTransactions.size());
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp (200520 => 200521)
--- trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp 2016-05-06 21:01:32 UTC (rev 200520)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp 2016-05-06 21:04:25 UTC (rev 200521)
@@ -241,6 +241,9 @@
{
ASSERT(currentThread() == m_originThreadID);
ASSERT(!m_contextStopped);
+
+ removeAllEventListeners();
+
m_contextStopped = true;
}
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp (200520 => 200521)
--- trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp 2016-05-06 21:01:32 UTC (rev 200520)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp 2016-05-06 21:04:25 UTC (rev 200521)
@@ -140,8 +140,11 @@
} else {
activate();
+ auto* context = scriptExecutionContext();
+ ASSERT(context);
+
RefPtr<IDBTransaction> self;
- JSC::VM& vm = JSDOMWindowBase::commonVM();
+ JSC::VM& vm = context->vm();
vm.whenIdle([self, this]() {
deactivate();
});
@@ -333,6 +336,8 @@
if (m_contextStopped)
return;
+ removeAllEventListeners();
+
m_contextStopped = true;
if (isFinishedOrFinishing())
@@ -1030,6 +1035,7 @@
{
ASSERT(m_transactionOperationMap.get(operation.identifier()) == &operation);
ASSERT(currentThread() == m_database->originThreadID());
+ ASSERT(currentThread() == operation.originThreadID());
m_transactionOperationMap.remove(operation.identifier());
Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.cpp (200520 => 200521)
--- trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.cpp 2016-05-06 21:01:32 UTC (rev 200520)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.cpp 2016-05-06 21:04:25 UTC (rev 200521)
@@ -117,14 +117,26 @@
completeOpenDBRequest(resultData);
}
+RefPtr<IDBOpenDBRequest> IDBConnectionProxy::takeIDBOpenDBRequest(IDBOpenDBRequest& request)
+{
+ ASSERT(request.originThreadID() == currentThread());
+
+ Locker<Lock> locker(m_openDBRequestMapLock);
+
+ auto mappedRequest = m_openDBRequestMap.take(request.resourceIdentifier());
+ ASSERT(mappedRequest.get() == &request);
+
+ return mappedRequest;
+}
+
void IDBConnectionProxy::completeOpenDBRequest(const IDBResultData& resultData)
{
ASSERT(isMainThread());
- RefPtr<IDBOpenDBRequest> request;
+ IDBOpenDBRequest* request;
{
Locker<Lock> locker(m_openDBRequestMapLock);
- request = m_openDBRequestMap.take(resultData.requestIdentifier());
+ request = m_openDBRequestMap.get(resultData.requestIdentifier());
ASSERT(request);
}
Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.h (200520 => 200521)
--- trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.h 2016-05-06 21:01:32 UTC (rev 200520)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.h 2016-05-06 21:04:25 UTC (rev 200521)
@@ -106,6 +106,8 @@
void registerDatabaseConnection(IDBDatabase&);
void unregisterDatabaseConnection(IDBDatabase&);
+ RefPtr<IDBOpenDBRequest> takeIDBOpenDBRequest(IDBOpenDBRequest&);
+
private:
void completeOpenDBRequest(const IDBResultData&);
bool hasRecordOfTransaction(const IDBTransaction&) const;
Modified: trunk/Source/WebCore/Modules/indexeddb/client/TransactionOperation.h (200520 => 200521)
--- trunk/Source/WebCore/Modules/indexeddb/client/TransactionOperation.h 2016-05-06 21:01:32 UTC (rev 200520)
+++ trunk/Source/WebCore/Modules/indexeddb/client/TransactionOperation.h 2016-05-06 21:04:25 UTC (rev 200521)
@@ -66,7 +66,11 @@
ASSERT(m_completeFunction);
m_completeFunction(data);
m_transaction->operationDidComplete(*this);
- m_completeFunction = { };
+
+ // m_completeFunction might be holding the last ref to this TransactionOperation,
+ // so we need to do this trick to null it out without first destroying it.
+ std::function<void (const IDBResultData&)> oldCompleteFunction;
+ std::swap(m_completeFunction, oldCompleteFunction);
}
const IDBResourceIdentifier& identifier() const { return m_identifier; }
Modified: trunk/Source/WebCore/page/SecurityOrigin.h (200520 => 200521)
--- trunk/Source/WebCore/page/SecurityOrigin.h 2016-05-06 21:01:32 UTC (rev 200520)
+++ trunk/Source/WebCore/page/SecurityOrigin.h 2016-05-06 21:04:25 UTC (rev 200521)
@@ -143,6 +143,7 @@
//
// WARNING: This is an extremely powerful ability. Use with caution!
void grantUniversalAccess();
+ bool hasUniversalAccess() const { return m_universalAccess; }
void setStorageBlockingPolicy(StorageBlockingPolicy policy) { m_storageBlockingPolicy = policy; }
Modified: trunk/Source/WebCore/workers/WorkerGlobalScope.cpp (200520 => 200521)
--- trunk/Source/WebCore/workers/WorkerGlobalScope.cpp 2016-05-06 21:01:32 UTC (rev 200520)
+++ trunk/Source/WebCore/workers/WorkerGlobalScope.cpp 2016-05-06 21:04:25 UTC (rev 200521)
@@ -76,7 +76,11 @@
, m_connectionProxy(connectionProxy)
#endif
{
- setSecurityOriginPolicy(SecurityOriginPolicy::create(SecurityOrigin::create(url)));
+ auto origin = SecurityOrigin::create(url);
+ if (m_topOrigin->hasUniversalAccess())
+ origin->grantUniversalAccess();
+
+ setSecurityOriginPolicy(SecurityOriginPolicy::create(WTFMove(origin)));
setContentSecurityPolicy(std::make_unique<ContentSecurityPolicy>(*this));
}