Title: [267758] trunk
Revision
267758
Author
wei...@apple.com
Date
2020-09-29 13:40:27 -0700 (Tue, 29 Sep 2020)

Log Message

Remove IndexedDBWorkers runtime setting now since it is always true
https://bugs.webkit.org/show_bug.cgi?id=217090

Reviewed by Darin Adler.

Source/WebCore:

Removes IndexedDBWorkers runtime setting, allowing us to remove a bunch
of special cases for WorkerGlobalScope constructors. Now instead of explicitly
adding the IndexedDB constructors to WorkerGlobalScope, we use the Exposed
mechanism to have the generators do this for us. While going through each of
the IndexedDB IDLs, I also re-alligned with the current spec, adding comments
for missing functionality as necessary.

* Modules/indexeddb/IDBCursor.idl:
* Modules/indexeddb/IDBCursorWithValue.idl:
* Modules/indexeddb/IDBDatabase.idl:
* Modules/indexeddb/IDBFactory.idl:
* Modules/indexeddb/IDBIndex.idl:
* Modules/indexeddb/IDBKeyRange.idl:
* Modules/indexeddb/IDBObjectStore.idl:
* Modules/indexeddb/IDBOpenDBRequest.idl:
* Modules/indexeddb/IDBRequest.idl:
* Modules/indexeddb/IDBTransaction.idl:
* Modules/indexeddb/IDBVersionChangeEvent.idl:
* Modules/indexeddb/WorkerGlobalScope+IndexedDatabase.idl:
* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setIndexedDBWorkersEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::indexedDBWorkersEnabled const): Deleted.
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setIndexedDBWorkersEnabled): Deleted.
* testing/InternalSettings.h:
* testing/InternalSettings.idl:
* workers/WorkerGlobalScope.idl:

LayoutTests:

Removes calls to setIndexedDBWorkersEnabled, which hasn't been required in quite some time,
and removes workers-disabled.html test, as it is no longer possible nor desirable to do this.

* http/tests/security/cross-origin-worker-indexeddb-allowed.html:
* 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:
* platform/wincairo/TestExpectations:
* 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/index-basics-workers.html:
* storage/indexeddb/modern/workers-disabled-expected.txt: Removed.
* storage/indexeddb/modern/workers-disabled.html: Removed.
* 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-private.html:
* storage/indexeddb/transaction-complete-workers.html:
* storage/indexeddb/unprefix-workers.html:

Modified Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (267757 => 267758)


--- trunk/LayoutTests/ChangeLog	2020-09-29 20:13:28 UTC (rev 267757)
+++ trunk/LayoutTests/ChangeLog	2020-09-29 20:40:27 UTC (rev 267758)
@@ -1,3 +1,39 @@
+2020-09-29  Sam Weinig  <wei...@apple.com>
+
+        Remove IndexedDBWorkers runtime setting now since it is always true
+        https://bugs.webkit.org/show_bug.cgi?id=217090
+
+        Reviewed by Darin Adler.
+
+        Removes calls to setIndexedDBWorkersEnabled, which hasn't been required in quite some time,
+        and removes workers-disabled.html test, as it is no longer possible nor desirable to do this.
+
+        * http/tests/security/cross-origin-worker-indexeddb-allowed.html:
+        * 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:
+        * platform/wincairo/TestExpectations:
+        * 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/index-basics-workers.html:
+        * storage/indexeddb/modern/workers-disabled-expected.txt: Removed.
+        * storage/indexeddb/modern/workers-disabled.html: Removed.
+        * 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-private.html:
+        * storage/indexeddb/transaction-complete-workers.html:
+        * storage/indexeddb/unprefix-workers.html:
+
 2020-09-29  Alex Christensen  <achristen...@webkit.org>
 
         Remove plist-based ResourceLoadStatistics storage, which has been replaced by database-based storage

Modified: trunk/LayoutTests/http/tests/security/cross-origin-worker-indexeddb-allowed.html (267757 => 267758)


--- trunk/LayoutTests/http/tests/security/cross-origin-worker-indexeddb-allowed.html	2020-09-29 20:13:28 UTC (rev 267757)
+++ trunk/LayoutTests/http/tests/security/cross-origin-worker-indexeddb-allowed.html	2020-09-29 20:40:27 UTC (rev 267758)
@@ -2,9 +2,6 @@
 <html>
 <head>
 <script>
-if (window.internals)
-    window.internals.settings.setIndexedDBWorkersEnabled(true);
-
 var frames = 2;
 if (window.testRunner) {
     testRunner.dumpAsText();

Modified: trunk/LayoutTests/http/tests/security/cross-origin-worker-indexeddb.html (267757 => 267758)


--- trunk/LayoutTests/http/tests/security/cross-origin-worker-indexeddb.html	2020-09-29 20:13:28 UTC (rev 267757)
+++ trunk/LayoutTests/http/tests/security/cross-origin-worker-indexeddb.html	2020-09-29 20:40:27 UTC (rev 267758)
@@ -4,9 +4,6 @@
 </head>
 <body>
 <script>
-if (window.internals)
-    window.internals.settings.setIndexedDBWorkersEnabled(true);
-
 if (window.testRunner) {
     testRunner.dumpAsText();
     testRunner.dumpChildFramesAsText();

Modified: trunk/LayoutTests/http/tests/security/resources/cross-origin-iframe-for-worker-indexeddb.html (267757 => 267758)


--- trunk/LayoutTests/http/tests/security/resources/cross-origin-iframe-for-worker-indexeddb.html	2020-09-29 20:13:28 UTC (rev 267757)
+++ trunk/LayoutTests/http/tests/security/resources/cross-origin-iframe-for-worker-indexeddb.html	2020-09-29 20:40:27 UTC (rev 267758)
@@ -2,9 +2,6 @@
 <html>
 <head>
 <script>
-if (window.internals)
-    window.internals.settings.setIndexedDBWorkersEnabled(true);
-
 window._onload_ = function() {
     var worker = new Worker('worker-for-indexeddb.js');
     worker.postMessage(true);

Modified: trunk/LayoutTests/http/tests/security/resources/document-for-cross-origin-worker-indexeddb.html (267757 => 267758)


--- trunk/LayoutTests/http/tests/security/resources/document-for-cross-origin-worker-indexeddb.html	2020-09-29 20:13:28 UTC (rev 267757)
+++ trunk/LayoutTests/http/tests/security/resources/document-for-cross-origin-worker-indexeddb.html	2020-09-29 20:40:27 UTC (rev 267758)
@@ -2,9 +2,6 @@
 <html>
 <head>
 <script>
-if (window.internals)
-    window.internals.settings.setIndexedDBWorkersEnabled(true);
-    
 var frames = 2;
 
 function decrement() {

Modified: trunk/LayoutTests/platform/wincairo/TestExpectations (267757 => 267758)


--- trunk/LayoutTests/platform/wincairo/TestExpectations	2020-09-29 20:13:28 UTC (rev 267757)
+++ trunk/LayoutTests/platform/wincairo/TestExpectations	2020-09-29 20:40:27 UTC (rev 267758)
@@ -1697,7 +1697,6 @@
 storage/indexeddb/modern/idbobjectstore-get-failures.html [ Crash Pass ]
 storage/indexeddb/modern/multiple-objectstore-index-cursor-collision.html [ Crash Pass ]
 storage/indexeddb/modern/objectstore-cursor-advance-failures-private.html [ Crash Pass ]
-storage/indexeddb/modern/workers-disabled.html [ Crash Pass ]
 storage/indexeddb/modern/workers-enable.html [ Crash Pass ]
 
 # Flaky timeouts

Modified: trunk/LayoutTests/storage/indexeddb/basics-workers.html (267757 => 267758)


--- trunk/LayoutTests/storage/indexeddb/basics-workers.html	2020-09-29 20:13:28 UTC (rev 267757)
+++ trunk/LayoutTests/storage/indexeddb/basics-workers.html	2020-09-29 20:40:27 UTC (rev 267758)
@@ -5,8 +5,6 @@
 </head>
 <body>
 <script>
-if (window.internals)
-    window.internals.settings.setIndexedDBWorkersEnabled(true);
 worker = startWorker('resources/basics.js');
 </script>
 </body>

Modified: trunk/LayoutTests/storage/indexeddb/cursor-advance-workers.html (267757 => 267758)


--- trunk/LayoutTests/storage/indexeddb/cursor-advance-workers.html	2020-09-29 20:13:28 UTC (rev 267757)
+++ trunk/LayoutTests/storage/indexeddb/cursor-advance-workers.html	2020-09-29 20:40:27 UTC (rev 267758)
@@ -5,8 +5,6 @@
 </head>
 <body>
 <script>
-if (window.internals)
-    window.internals.settings.setIndexedDBWorkersEnabled(true);
 worker = startWorker('resources/cursor-advance.js');
 </script>
 </body>

Modified: trunk/LayoutTests/storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange-workers.html (267757 => 267758)


--- trunk/LayoutTests/storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange-workers.html	2020-09-29 20:13:28 UTC (rev 267757)
+++ trunk/LayoutTests/storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange-workers.html	2020-09-29 20:40:27 UTC (rev 267758)
@@ -5,8 +5,6 @@
 </head>
 <body>
 <script>
-if (window.internals)
-    window.internals.settings.setIndexedDBWorkersEnabled(true);
 worker = startWorker('resources/deletedatabase-delayed-by-open-and-versionchange.js');
 </script>
 </body>

Modified: trunk/LayoutTests/storage/indexeddb/dont-commit-on-blocked-private.html (267757 => 267758)


--- trunk/LayoutTests/storage/indexeddb/dont-commit-on-blocked-private.html	2020-09-29 20:13:28 UTC (rev 267757)
+++ trunk/LayoutTests/storage/indexeddb/dont-commit-on-blocked-private.html	2020-09-29 20:40:27 UTC (rev 267758)
@@ -6,9 +6,6 @@
 </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/dont-commit-on-blocked.html (267757 => 267758)


--- trunk/LayoutTests/storage/indexeddb/dont-commit-on-blocked.html	2020-09-29 20:13:28 UTC (rev 267757)
+++ trunk/LayoutTests/storage/indexeddb/dont-commit-on-blocked.html	2020-09-29 20:40:27 UTC (rev 267758)
@@ -5,9 +5,6 @@
 </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/index-basics-workers.html (267757 => 267758)


--- trunk/LayoutTests/storage/indexeddb/index-basics-workers.html	2020-09-29 20:13:28 UTC (rev 267757)
+++ trunk/LayoutTests/storage/indexeddb/index-basics-workers.html	2020-09-29 20:40:27 UTC (rev 267758)
@@ -5,8 +5,6 @@
 </head>
 <body>
 <script>
-if (window.internals)
-    window.internals.settings.setIndexedDBWorkersEnabled(true);
 worker = startWorker('resources/index-basics.js');
 </script>
 </body>

Modified: trunk/LayoutTests/storage/indexeddb/modern/blob-simple-workers.html (267757 => 267758)


--- trunk/LayoutTests/storage/indexeddb/modern/blob-simple-workers.html	2020-09-29 20:13:28 UTC (rev 267757)
+++ trunk/LayoutTests/storage/indexeddb/modern/blob-simple-workers.html	2020-09-29 20:40:27 UTC (rev 267758)
@@ -5,8 +5,6 @@
 </head>
 <body>
 <script>
-if (window.internals)
-    window.internals.settings.setIndexedDBWorkersEnabled(true);
 worker = startWorker('resources/blob-simple-workers.js');</script>
 </body>
 </html>

Deleted: trunk/LayoutTests/storage/indexeddb/modern/workers-disabled-expected.txt (267757 => 267758)


--- trunk/LayoutTests/storage/indexeddb/modern/workers-disabled-expected.txt	2020-09-29 20:13:28 UTC (rev 267757)
+++ trunk/LayoutTests/storage/indexeddb/modern/workers-disabled-expected.txt	2020-09-29 20:40:27 UTC (rev 267758)
@@ -1,34 +0,0 @@
-[Worker] Check to make sure IndexedDB in workers can be disabled at runtime
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-Starting worker: resources/workers-disabled.js
-PASS [Worker] self.indexedDB is undefined.
-PASS [Worker] 'indexedDB' in self is false
-PASS [Worker] self.IDBCursor is undefined.
-PASS [Worker] 'IDBCursor' in self is false
-PASS [Worker] self.IDBCursorWithValue is undefined.
-PASS [Worker] 'IDBCursorWithValue' in self is false
-PASS [Worker] self.IDBDatabase is undefined.
-PASS [Worker] 'IDBDatabase' in self is false
-PASS [Worker] self.IDBFactory is undefined.
-PASS [Worker] 'IDBFactory' in self is false
-PASS [Worker] self.IDBIndex is undefined.
-PASS [Worker] 'IDBIndex' in self is false
-PASS [Worker] self.IDBKeyRange is undefined.
-PASS [Worker] 'IDBKeyRange' in self is false
-PASS [Worker] self.IDBObjectStore is undefined.
-PASS [Worker] 'IDBObjectStore' in self is false
-PASS [Worker] self.IDBOpenDBRequest is undefined.
-PASS [Worker] 'IDBOpenDBRequest' in self is false
-PASS [Worker] self.IDBRequest is undefined.
-PASS [Worker] 'IDBRequest' in self is false
-PASS [Worker] self.IDBTransaction is undefined.
-PASS [Worker] 'IDBTransaction' in self is false
-PASS [Worker] self.IDBVersionChangeEvent is undefined.
-PASS [Worker] 'IDBVersionChangeEvent' in self is false
-PASS successfullyParsed is true
-
-TEST COMPLETE
-

Deleted: trunk/LayoutTests/storage/indexeddb/modern/workers-disabled.html (267757 => 267758)


--- trunk/LayoutTests/storage/indexeddb/modern/workers-disabled.html	2020-09-29 20:13:28 UTC (rev 267757)
+++ trunk/LayoutTests/storage/indexeddb/modern/workers-disabled.html	2020-09-29 20:40:27 UTC (rev 267758)
@@ -1,13 +0,0 @@
-<html>
-<head>
-<script src=""
-<script src=""
-</head>
-<body>
-<script>
-if (window.internals)
-    window.internals.settings.setIndexedDBWorkersEnabled(false);
-
-worker = startWorker('resources/workers-disabled.js');</script>
-</body>
-</html>

Modified: trunk/LayoutTests/storage/indexeddb/modern/workers-enable.html (267757 => 267758)


--- trunk/LayoutTests/storage/indexeddb/modern/workers-enable.html	2020-09-29 20:13:28 UTC (rev 267757)
+++ trunk/LayoutTests/storage/indexeddb/modern/workers-enable.html	2020-09-29 20:40:27 UTC (rev 267758)
@@ -5,8 +5,6 @@
 </head>
 <body>
 <script>
-if (window.internals)
-    window.internals.settings.setIndexedDBWorkersEnabled(true);
 worker = startWorker('resources/workers-enable.js');</script>
 </body>
 </html>

Modified: trunk/LayoutTests/storage/indexeddb/objectstore-basics-workers.html (267757 => 267758)


--- trunk/LayoutTests/storage/indexeddb/objectstore-basics-workers.html	2020-09-29 20:13:28 UTC (rev 267757)
+++ trunk/LayoutTests/storage/indexeddb/objectstore-basics-workers.html	2020-09-29 20:40:27 UTC (rev 267758)
@@ -5,8 +5,6 @@
 </head>
 <body>
 <script>
-if (window.internals)
-    window.internals.settings.setIndexedDBWorkersEnabled(true);
 worker = startWorker('resources/objectstore-basics.js');
 </script>
 </body>

Modified: trunk/LayoutTests/storage/indexeddb/open-twice-workers.html (267757 => 267758)


--- trunk/LayoutTests/storage/indexeddb/open-twice-workers.html	2020-09-29 20:13:28 UTC (rev 267757)
+++ trunk/LayoutTests/storage/indexeddb/open-twice-workers.html	2020-09-29 20:40:27 UTC (rev 267758)
@@ -5,8 +5,6 @@
 </head>
 <body>
 <script>
-if (window.internals)
-    window.internals.settings.setIndexedDBWorkersEnabled(true);
 worker = startWorker('resources/open-twice.js');
 </script>
 </body>

Modified: trunk/LayoutTests/storage/indexeddb/pending-activity-workers.html (267757 => 267758)


--- trunk/LayoutTests/storage/indexeddb/pending-activity-workers.html	2020-09-29 20:13:28 UTC (rev 267757)
+++ trunk/LayoutTests/storage/indexeddb/pending-activity-workers.html	2020-09-29 20:40:27 UTC (rev 267758)
@@ -3,8 +3,6 @@
 <script src=""
 <body>
 <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 (267757 => 267758)


--- trunk/LayoutTests/storage/indexeddb/pending-version-change-on-exit-private.html	2020-09-29 20:13:28 UTC (rev 267757)
+++ trunk/LayoutTests/storage/indexeddb/pending-version-change-on-exit-private.html	2020-09-29 20:40:27 UTC (rev 267758)
@@ -6,9 +6,6 @@
 </head>
 <body>
 <script>
-if (window.internals)
-    window.internals.settings.setIndexedDBWorkersEnabled(true);
-
 description("No crashes when there are event listeners in a worker on shutdown");
 
 if (self.location.search == "?second") {

Modified: trunk/LayoutTests/storage/indexeddb/pending-version-change-on-exit.html (267757 => 267758)


--- trunk/LayoutTests/storage/indexeddb/pending-version-change-on-exit.html	2020-09-29 20:13:28 UTC (rev 267757)
+++ trunk/LayoutTests/storage/indexeddb/pending-version-change-on-exit.html	2020-09-29 20:40:27 UTC (rev 267758)
@@ -5,9 +5,6 @@
 </head>
 <body>
 <script>
-if (window.internals)
-    window.internals.settings.setIndexedDBWorkersEnabled(true);
-
 description("No crashes when there are event listeners in a worker on shutdown");
 
 if (self.location.search == "?second") {

Modified: trunk/LayoutTests/storage/indexeddb/pending-version-change-stuck-private.html (267757 => 267758)


--- trunk/LayoutTests/storage/indexeddb/pending-version-change-stuck-private.html	2020-09-29 20:13:28 UTC (rev 267757)
+++ trunk/LayoutTests/storage/indexeddb/pending-version-change-stuck-private.html	2020-09-29 20:40:27 UTC (rev 267758)
@@ -6,9 +6,6 @@
 </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");
 
 function test()

Modified: trunk/LayoutTests/storage/indexeddb/pending-version-change-stuck-works-with-terminate-private.html (267757 => 267758)


--- trunk/LayoutTests/storage/indexeddb/pending-version-change-stuck-works-with-terminate-private.html	2020-09-29 20:13:28 UTC (rev 267757)
+++ trunk/LayoutTests/storage/indexeddb/pending-version-change-stuck-works-with-terminate-private.html	2020-09-29 20:40:27 UTC (rev 267758)
@@ -6,9 +6,6 @@
 </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");
 
 function test()

Modified: trunk/LayoutTests/storage/indexeddb/pending-version-change-stuck-works-with-terminate.html (267757 => 267758)


--- trunk/LayoutTests/storage/indexeddb/pending-version-change-stuck-works-with-terminate.html	2020-09-29 20:13:28 UTC (rev 267757)
+++ trunk/LayoutTests/storage/indexeddb/pending-version-change-stuck-works-with-terminate.html	2020-09-29 20:40:27 UTC (rev 267758)
@@ -5,9 +5,6 @@
 </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");
 
 function test()

Modified: trunk/LayoutTests/storage/indexeddb/pending-version-change-stuck.html (267757 => 267758)


--- trunk/LayoutTests/storage/indexeddb/pending-version-change-stuck.html	2020-09-29 20:13:28 UTC (rev 267757)
+++ trunk/LayoutTests/storage/indexeddb/pending-version-change-stuck.html	2020-09-29 20:40:27 UTC (rev 267758)
@@ -5,9 +5,6 @@
 </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");
 
 function test()

Modified: trunk/LayoutTests/storage/indexeddb/transaction-complete-workers-private.html (267757 => 267758)


--- trunk/LayoutTests/storage/indexeddb/transaction-complete-workers-private.html	2020-09-29 20:13:28 UTC (rev 267757)
+++ trunk/LayoutTests/storage/indexeddb/transaction-complete-workers-private.html	2020-09-29 20:40:27 UTC (rev 267758)
@@ -6,9 +6,6 @@
 </head>
 <body>
 <script>
-if (window.internals)
-    window.internals.settings.setIndexedDBWorkersEnabled(true);
-
 worker = startWorker('resources/transaction-complete-workers.js');
 
 // FIXME: It should be possible for the worker to set self.onerror to catch the event

Modified: trunk/LayoutTests/storage/indexeddb/transaction-complete-workers.html (267757 => 267758)


--- trunk/LayoutTests/storage/indexeddb/transaction-complete-workers.html	2020-09-29 20:13:28 UTC (rev 267757)
+++ trunk/LayoutTests/storage/indexeddb/transaction-complete-workers.html	2020-09-29 20:40:27 UTC (rev 267758)
@@ -5,9 +5,6 @@
 </head>
 <body>
 <script>
-if (window.internals)
-    window.internals.settings.setIndexedDBWorkersEnabled(true);
-
 worker = startWorker('resources/transaction-complete-workers.js');
 
 // FIXME: It should be possible for the worker to set self.onerror to catch the event

Modified: trunk/LayoutTests/storage/indexeddb/unprefix-workers.html (267757 => 267758)


--- trunk/LayoutTests/storage/indexeddb/unprefix-workers.html	2020-09-29 20:13:28 UTC (rev 267757)
+++ trunk/LayoutTests/storage/indexeddb/unprefix-workers.html	2020-09-29 20:40:27 UTC (rev 267758)
@@ -6,8 +6,6 @@
 </head>
 <body>
 <script>
-if (window.internals)
-    window.internals.settings.setIndexedDBWorkersEnabled(true);
 worker = startWorker('resources/unprefix.js');
 </script>
 </body>

Modified: trunk/Source/WebCore/ChangeLog (267757 => 267758)


--- trunk/Source/WebCore/ChangeLog	2020-09-29 20:13:28 UTC (rev 267757)
+++ trunk/Source/WebCore/ChangeLog	2020-09-29 20:40:27 UTC (rev 267758)
@@ -1,3 +1,40 @@
+2020-09-29  Sam Weinig  <wei...@apple.com>
+
+        Remove IndexedDBWorkers runtime setting now since it is always true
+        https://bugs.webkit.org/show_bug.cgi?id=217090
+
+        Reviewed by Darin Adler.
+
+        Removes IndexedDBWorkers runtime setting, allowing us to remove a bunch
+        of special cases for WorkerGlobalScope constructors. Now instead of explicitly
+        adding the IndexedDB constructors to WorkerGlobalScope, we use the Exposed
+        mechanism to have the generators do this for us. While going through each of
+        the IndexedDB IDLs, I also re-alligned with the current spec, adding comments
+        for missing functionality as necessary.
+
+        * Modules/indexeddb/IDBCursor.idl:
+        * Modules/indexeddb/IDBCursorWithValue.idl:
+        * Modules/indexeddb/IDBDatabase.idl:
+        * Modules/indexeddb/IDBFactory.idl:
+        * Modules/indexeddb/IDBIndex.idl:
+        * Modules/indexeddb/IDBKeyRange.idl:
+        * Modules/indexeddb/IDBObjectStore.idl:
+        * Modules/indexeddb/IDBOpenDBRequest.idl:
+        * Modules/indexeddb/IDBRequest.idl:
+        * Modules/indexeddb/IDBTransaction.idl:
+        * Modules/indexeddb/IDBVersionChangeEvent.idl:
+        * Modules/indexeddb/WorkerGlobalScope+IndexedDatabase.idl:
+        * page/RuntimeEnabledFeatures.h:
+        (WebCore::RuntimeEnabledFeatures::setIndexedDBWorkersEnabled): Deleted.
+        (WebCore::RuntimeEnabledFeatures::indexedDBWorkersEnabled const): Deleted.
+        * testing/InternalSettings.cpp:
+        (WebCore::InternalSettings::Backup::Backup):
+        (WebCore::InternalSettings::Backup::restoreTo):
+        (WebCore::InternalSettings::setIndexedDBWorkersEnabled): Deleted.
+        * testing/InternalSettings.h:
+        * testing/InternalSettings.idl:
+        * workers/WorkerGlobalScope.idl:
+
 2020-09-29  Sihui Liu  <sihui_...@apple.com>
 
         IndexedDB Index Corruption after upgrade from iOS 13 to iOS 14

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBCursor.idl (267757 => 267758)


--- trunk/Source/WebCore/Modules/indexeddb/IDBCursor.idl	2020-09-29 20:13:28 UTC (rev 267757)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursor.idl	2020-09-29 20:40:27 UTC (rev 267758)
@@ -28,15 +28,19 @@
     CustomToJSObject,
     JSCustomMarkFunction,
     SkipVTableValidation,
+    Exposed=(Window,Worker)
 ] interface IDBCursor {
     readonly attribute (IDBObjectStore or IDBIndex) source;
     readonly attribute IDBCursorDirection direction;
     [CustomGetter] readonly attribute any key;
     [CustomGetter] readonly attribute any primaryKey;
+    // FIXME: Implement 'request'
+    // [SameObject] readonly attribute IDBRequest request;
 
-    [CallWith=GlobalObject, MayThrowException] IDBRequest update(any value);
     [MayThrowException] undefined advance([EnforceRange] unsigned long count);
     [CallWith=GlobalObject, ImplementedAs=continueFunction, MayThrowException] undefined continue(optional any key);
     [CallWith=GlobalObject, MayThrowException] undefined continuePrimaryKey(any key, any primaryKey);
-    [CallWith=GlobalObject, ImplementedAs=deleteFunction, MayThrowException] IDBRequest delete();
+
+    [NewObject, CallWith=GlobalObject, MayThrowException] IDBRequest update(any value);
+    [NewObject, CallWith=GlobalObject, ImplementedAs=deleteFunction, MayThrowException] IDBRequest delete();
 };

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBCursorWithValue.idl (267757 => 267758)


--- trunk/Source/WebCore/Modules/indexeddb/IDBCursorWithValue.idl	2020-09-29 20:13:28 UTC (rev 267757)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursorWithValue.idl	2020-09-29 20:40:27 UTC (rev 267758)
@@ -27,6 +27,7 @@
     Conditional=INDEXED_DATABASE,
     SkipVTableValidation,
     JSCustomMarkFunction,
+    Exposed=(Window,Worker)
 ] interface IDBCursorWithValue : IDBCursor {
     [CustomGetter] readonly attribute any value;
 };

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.idl (267757 => 267758)


--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.idl	2020-09-29 20:13:28 UTC (rev 267757)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.idl	2020-09-29 20:40:27 UTC (rev 267758)
@@ -28,25 +28,28 @@
     Conditional=INDEXED_DATABASE,
     ActiveDOMObject,
     SkipVTableValidation,
+    Exposed=(Window,Worker)
 ] interface IDBDatabase : EventTarget {
     readonly attribute DOMString name;
     readonly attribute unsigned long long version;
     readonly attribute DOMStringList objectStoreNames;
 
-    [MayThrowException] IDBObjectStore createObjectStore(DOMString name, optional IDBObjectStoreParameters parameters);
+    // FIXME: 'transaction' should also take an optional 'IDBTransactionOptions' argument.
+    [NewObject, MayThrowException] IDBTransaction transaction((DOMString or sequence<DOMString>) storeNames, optional IDBTransactionMode mode = "readonly");
+    undefined close();
+
+    [NewObject, MayThrowException] IDBObjectStore createObjectStore(DOMString name, optional IDBObjectStoreParameters parameters);
     [MayThrowException] undefined deleteObjectStore(DOMString name);
 
-    [MayThrowException] IDBTransaction transaction((DOMString or sequence<DOMString>) storeNames, optional IDBTransactionMode mode = "readonly");
-
-    // FIXME: This is not part of the spec, but is needed for compatibility.
-    // See https://github.com/w3c/IndexedDB/issues/85
-    [MayThrowException] IDBTransaction transaction(DOMStringList storeNames, optional IDBTransactionMode mode = "readonly");
-    undefined close();
-
+    // Event handlers:
     attribute EventHandler onabort;
     attribute EventHandler onclose;
     attribute EventHandler onerror;
     attribute EventHandler onversionchange;
+
+    // Non-standard: This is not part of the spec, but is needed for compatibility.
+    // See https://github.com/w3c/IndexedDB/issues/85
+    [MayThrowException] IDBTransaction transaction(DOMStringList storeNames, optional IDBTransactionMode mode = "readonly");
 };
 
 dictionary IDBObjectStoreParameters {

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBFactory.idl (267757 => 267758)


--- trunk/Source/WebCore/Modules/indexeddb/IDBFactory.idl	2020-09-29 20:13:28 UTC (rev 267757)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBFactory.idl	2020-09-29 20:40:27 UTC (rev 267758)
@@ -26,10 +26,13 @@
 [
     Conditional=INDEXED_DATABASE,
     SkipVTableValidation,
+    Exposed=(Window,Worker)
 ] interface IDBFactory {
-    [CallWith=ScriptExecutionContext, MayThrowException] IDBOpenDBRequest open(DOMString name, optional [EnforceRange] unsigned long long version);
-    [CallWith=ScriptExecutionContext, MayThrowException] IDBOpenDBRequest deleteDatabase(DOMString name);
+    [NewObject, CallWith=ScriptExecutionContext, MayThrowException] IDBOpenDBRequest open(DOMString name, optional [EnforceRange] unsigned long long version);
+    [NewObject, CallWith=ScriptExecutionContext, MayThrowException] IDBOpenDBRequest deleteDatabase(DOMString name);
+    
     [CallWith=ScriptExecutionContext] Promise<sequence<IDBDatabaseInfo>> databases();
+    
     [CallWith=GlobalObject, MayThrowException] short cmp(any first, any second);
 };
 

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBIndex.idl (267757 => 267758)


--- trunk/Source/WebCore/Modules/indexeddb/IDBIndex.idl	2020-09-29 20:13:28 UTC (rev 267757)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBIndex.idl	2020-09-29 20:40:27 UTC (rev 267758)
@@ -33,27 +33,27 @@
     GenerateIsReachable=Impl,
     JSCustomMarkFunction,
     SkipVTableValidation,
+    Exposed=(Window,Worker)
 ] interface IDBIndex {
     attribute DOMString name;
-    readonly attribute IDBObjectStore objectStore;
+    [SameObject] readonly attribute IDBObjectStore objectStore;
     readonly attribute IDBKeyPath? keyPath;
     readonly attribute boolean multiEntry;
     readonly attribute boolean unique;
 
-    [CallWith=GlobalObject, MayThrowException] IDBRequest openCursor(optional IDBKeyRange? range = null, optional IDBCursorDirection direction = "next");
-    [CallWith=GlobalObject, MayThrowException] IDBRequest openCursor(any key, optional IDBCursorDirection direction = "next");
+    [NewObject, CallWith=GlobalObject, MayThrowException] IDBRequest get(IDBKeyRange? key);
+    [NewObject, CallWith=GlobalObject, MayThrowException] IDBRequest get(any key);
+    [NewObject, CallWith=GlobalObject, MayThrowException] IDBRequest getKey(IDBKeyRange? key);
+    [NewObject, CallWith=GlobalObject, MayThrowException] IDBRequest getKey(any key);
+    [NewObject, CallWith=GlobalObject, MayThrowException] IDBRequest getAll(optional IDBKeyRange? range = null, optional [EnforceRange] unsigned long count);
+    [NewObject, CallWith=GlobalObject, MayThrowException] IDBRequest getAll(any key, optional [EnforceRange] unsigned long count);
+    [NewObject, CallWith=GlobalObject, MayThrowException] IDBRequest getAllKeys(optional IDBKeyRange? range = null, optional [EnforceRange] unsigned long count);
+    [NewObject, CallWith=GlobalObject, MayThrowException] IDBRequest getAllKeys(any key, optional [EnforceRange] unsigned long count);
+    [NewObject, CallWith=GlobalObject, MayThrowException] IDBRequest count(optional IDBKeyRange? range = null);
+    [NewObject, CallWith=GlobalObject, MayThrowException] IDBRequest count(any key);
 
-    [CallWith=GlobalObject, MayThrowException] IDBRequest openKeyCursor(optional IDBKeyRange? range = null, optional IDBCursorDirection direction = "next");
-    [CallWith=GlobalObject, MayThrowException] IDBRequest openKeyCursor(any key, optional IDBCursorDirection direction = "next");
-
-    [CallWith=GlobalObject, MayThrowException] IDBRequest get(IDBKeyRange? key);
-    [CallWith=GlobalObject, MayThrowException] IDBRequest get(any key);
-    [CallWith=GlobalObject, MayThrowException] IDBRequest getKey(IDBKeyRange? key);
-    [CallWith=GlobalObject, MayThrowException] IDBRequest getKey(any key);
-    [CallWith=GlobalObject, MayThrowException] IDBRequest getAll(optional IDBKeyRange? range = null, optional [EnforceRange] unsigned long count);
-    [CallWith=GlobalObject, MayThrowException] IDBRequest getAll(any key, optional [EnforceRange] unsigned long count);
-    [CallWith=GlobalObject, MayThrowException] IDBRequest getAllKeys(optional IDBKeyRange? range = null, optional [EnforceRange] unsigned long count);
-    [CallWith=GlobalObject, MayThrowException] IDBRequest getAllKeys(any key, optional [EnforceRange] unsigned long count);
-    [CallWith=GlobalObject, MayThrowException] IDBRequest count(optional IDBKeyRange? range = null);
-    [CallWith=GlobalObject, MayThrowException] IDBRequest count(any key);
+    [NewObject, CallWith=GlobalObject, MayThrowException] IDBRequest openCursor(optional IDBKeyRange? range = null, optional IDBCursorDirection direction = "next");
+    [NewObject, CallWith=GlobalObject, MayThrowException] IDBRequest openCursor(any key, optional IDBCursorDirection direction = "next");
+    [NewObject, CallWith=GlobalObject, MayThrowException] IDBRequest openKeyCursor(optional IDBKeyRange? range = null, optional IDBCursorDirection direction = "next");
+    [NewObject, CallWith=GlobalObject, MayThrowException] IDBRequest openKeyCursor(any key, optional IDBCursorDirection direction = "next");
 };

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.idl (267757 => 267758)


--- trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.idl	2020-09-29 20:13:28 UTC (rev 267757)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.idl	2020-09-29 20:40:27 UTC (rev 267758)
@@ -26,6 +26,7 @@
 [
     Conditional=INDEXED_DATABASE,
     ImplementationLacksVTable,
+    Exposed=(Window,Worker)
 ] interface IDBKeyRange {
     readonly attribute [OverrideIDLType=IDLIDBKey] any lower;
     readonly attribute [OverrideIDLType=IDLIDBKey] any upper;
@@ -32,10 +33,10 @@
     readonly attribute boolean lowerOpen;
     readonly attribute boolean upperOpen;
 
-    [CallWith=GlobalObject, MayThrowException] static IDBKeyRange only(any value);
-    [CallWith=GlobalObject, MayThrowException] static IDBKeyRange lowerBound(any lower, optional boolean open = false);
-    [CallWith=GlobalObject, MayThrowException] static IDBKeyRange upperBound(any upper, optional boolean open = false);
-    [CallWith=GlobalObject, MayThrowException] static IDBKeyRange bound(any lower, any upper, optional boolean lowerOpen = false, optional boolean upperOpen = false);
+    [NewObject, CallWith=GlobalObject, MayThrowException] static IDBKeyRange only(any value);
+    [NewObject, CallWith=GlobalObject, MayThrowException] static IDBKeyRange lowerBound(any lower, optional boolean open = false);
+    [NewObject, CallWith=GlobalObject, MayThrowException] static IDBKeyRange upperBound(any upper, optional boolean open = false);
+    [NewObject, CallWith=GlobalObject, MayThrowException] static IDBKeyRange bound(any lower, any upper, optional boolean lowerOpen = false, optional boolean upperOpen = false);
 
     [CallWith=GlobalObject, MayThrowException] boolean includes(any key);
 };

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl (267757 => 267758)


--- trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl	2020-09-29 20:13:28 UTC (rev 267757)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl	2020-09-29 20:40:27 UTC (rev 267758)
@@ -33,35 +33,39 @@
     GenerateIsReachable=Impl,
     JSCustomMarkFunction,
     SkipVTableValidation,
+    Exposed=(Window,Worker)
 ] interface IDBObjectStore {
     attribute DOMString name;
     readonly attribute IDBKeyPath? keyPath;
     readonly attribute DOMStringList indexNames;
-    readonly attribute IDBTransaction transaction;
+    [SameObject] readonly attribute IDBTransaction transaction;
     readonly attribute boolean autoIncrement;
 
-    [CallWith=GlobalObject, MayThrowException] IDBRequest put(any value, optional any key);
-    [CallWith=GlobalObject, MayThrowException] IDBRequest add(any value, optional any key);
-    [CallWith=GlobalObject, ImplementedAs=deleteFunction, MayThrowException] IDBRequest delete(IDBKeyRange? keyRange);
-    [CallWith=GlobalObject, ImplementedAs=deleteFunction, MayThrowException] IDBRequest delete(any key);
-    [CallWith=GlobalObject, MayThrowException] IDBRequest get(IDBKeyRange? key);
-    [CallWith=GlobalObject, MayThrowException] IDBRequest get(any key);
-    [CallWith=GlobalObject, MayThrowException] IDBRequest getKey(IDBKeyRange? key);
-    [CallWith=GlobalObject, MayThrowException] IDBRequest getKey(any key);
-    [CallWith=GlobalObject, MayThrowException] IDBRequest clear();
-    [CallWith=GlobalObject, MayThrowException] IDBRequest openCursor(optional IDBKeyRange? range = null, optional IDBCursorDirection direction = "next");
-    [CallWith=GlobalObject, MayThrowException] IDBRequest openCursor(any key, optional IDBCursorDirection direction = "next");
-    [CallWith=GlobalObject, MayThrowException] IDBRequest openKeyCursor(optional IDBKeyRange? range = null, optional IDBCursorDirection direction = "next");
-    [CallWith=GlobalObject, MayThrowException] IDBRequest openKeyCursor(any key, optional IDBCursorDirection direction = "next");
-    [CallWith=GlobalObject, MayThrowException] IDBRequest getAll(optional IDBKeyRange? range = null, optional [EnforceRange] unsigned long count);
-    [CallWith=GlobalObject, MayThrowException] IDBRequest getAll(any key, optional [EnforceRange] unsigned long count);
-    [CallWith=GlobalObject, MayThrowException] IDBRequest getAllKeys(optional IDBKeyRange? range = null, optional [EnforceRange] unsigned long count);
-    [CallWith=GlobalObject, MayThrowException] IDBRequest getAllKeys(any key, optional [EnforceRange] unsigned long count);
-    [CallWith=GlobalObject, MayThrowException] IDBIndex createIndex(DOMString name, (DOMString or sequence<DOMString>) keyPath, optional IDBIndexParameters options);
+    [NewObject, CallWith=GlobalObject, MayThrowException] IDBRequest put(any value, optional any key);
+    [NewObject, CallWith=GlobalObject, MayThrowException] IDBRequest add(any value, optional any key);
+    [NewObject, CallWith=GlobalObject, ImplementedAs=deleteFunction, MayThrowException] IDBRequest delete(IDBKeyRange? keyRange);
+    [NewObject, CallWith=GlobalObject, ImplementedAs=deleteFunction, MayThrowException] IDBRequest delete(any key);
+    [NewObject, CallWith=GlobalObject, MayThrowException] IDBRequest clear();
+    [NewObject, CallWith=GlobalObject, MayThrowException] IDBRequest get(IDBKeyRange? key);
+    [NewObject, CallWith=GlobalObject, MayThrowException] IDBRequest get(any key);
+    [NewObject, CallWith=GlobalObject, MayThrowException] IDBRequest getKey(IDBKeyRange? key);
+    [NewObject, CallWith=GlobalObject, MayThrowException] IDBRequest getKey(any key);
+    [NewObject, CallWith=GlobalObject, MayThrowException] IDBRequest getAll(optional IDBKeyRange? range = null, optional [EnforceRange] unsigned long count);
+    [NewObject, CallWith=GlobalObject, MayThrowException] IDBRequest getAll(any key, optional [EnforceRange] unsigned long count);
+    [NewObject, CallWith=GlobalObject, MayThrowException] IDBRequest getAllKeys(optional IDBKeyRange? range = null, optional [EnforceRange] unsigned long count);
+    [NewObject, CallWith=GlobalObject, MayThrowException] IDBRequest getAllKeys(any key, optional [EnforceRange] unsigned long count);
+    [NewObject, CallWith=GlobalObject, MayThrowException] IDBRequest count(optional IDBKeyRange? range = null);
+    [NewObject, CallWith=GlobalObject, MayThrowException] IDBRequest count(any key);
+
+    [NewObject, CallWith=GlobalObject, MayThrowException] IDBRequest openCursor(optional IDBKeyRange? range = null, optional IDBCursorDirection direction = "next");
+    [NewObject, CallWith=GlobalObject, MayThrowException] IDBRequest openCursor(any key, optional IDBCursorDirection direction = "next");
+    [NewObject, CallWith=GlobalObject, MayThrowException] IDBRequest openKeyCursor(optional IDBKeyRange? range = null, optional IDBCursorDirection direction = "next");
+    [NewObject, CallWith=GlobalObject, MayThrowException] IDBRequest openKeyCursor(any key, optional IDBCursorDirection direction = "next");
+
     [MayThrowException] IDBIndex index(DOMString name);
+
+    [NewObject, CallWith=GlobalObject, MayThrowException] IDBIndex createIndex(DOMString name, (DOMString or sequence<DOMString>) keyPath, optional IDBIndexParameters options);
     [MayThrowException] undefined deleteIndex(DOMString name);
-    [CallWith=GlobalObject, MayThrowException] IDBRequest count(optional IDBKeyRange? range = null);
-    [CallWith=GlobalObject, MayThrowException] IDBRequest count(any key);
 };
 
 dictionary IDBIndexParameters {

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.idl (267757 => 267758)


--- trunk/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.idl	2020-09-29 20:13:28 UTC (rev 267757)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.idl	2020-09-29 20:40:27 UTC (rev 267758)
@@ -28,7 +28,9 @@
     JSGenerateToJSObject,
     JSGenerateToNativeObject,
     SkipVTableValidation,
+    Exposed=(Window,Worker)
 ] interface IDBOpenDBRequest : IDBRequest {
+    // Event handlers:
     attribute EventHandler onblocked;
     attribute EventHandler onupgradeneeded;
 };

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBRequest.idl (267757 => 267758)


--- trunk/Source/WebCore/Modules/indexeddb/IDBRequest.idl	2020-09-29 20:13:28 UTC (rev 267757)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBRequest.idl	2020-09-29 20:40:27 UTC (rev 267758)
@@ -33,6 +33,7 @@
     GenerateIsReachable=Impl,
     JSCustomMarkFunction,
     SkipVTableValidation,
+    Exposed=(Window,Worker)
 ] interface IDBRequest : EventTarget {
     [CustomGetter] readonly attribute (IDBCursor or IDBDatabase or any) result;
     readonly attribute DOMException? error;
@@ -40,6 +41,7 @@
     readonly attribute IDBTransaction transaction;
     readonly attribute IDBRequestReadyState readyState;
 
+    // Event handlers:
     attribute EventHandler onsuccess;
     attribute EventHandler onerror;
 };

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.idl (267757 => 267758)


--- trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.idl	2020-09-29 20:13:28 UTC (rev 267757)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.idl	2020-09-29 20:40:27 UTC (rev 267758)
@@ -29,15 +29,21 @@
     Conditional=INDEXED_DATABASE,
     JSCustomMarkFunction,
     SkipVTableValidation,
+    Exposed=(Window,Worker)
 ] interface IDBTransaction : EventTarget {
     readonly attribute DOMStringList objectStoreNames;
     readonly attribute IDBTransactionMode mode;
-    readonly attribute IDBDatabase db;
-    readonly attribute DOMException error;
+    // Implement 'durability'.
+    // readonly attribute IDBTransactionDurability durability;
+    [SameObject] readonly attribute IDBDatabase db;
+    readonly attribute DOMException? error;
 
     [MayThrowException] IDBObjectStore objectStore(DOMString name);
+    // FIXME: Implement 'commit'.
+    // undefined commit();
     [MayThrowException] undefined abort();
 
+    // Event handlers:
     attribute EventHandler onabort;
     attribute EventHandler oncomplete;
     attribute EventHandler onerror;

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.idl (267757 => 267758)


--- trunk/Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.idl	2020-09-29 20:13:28 UTC (rev 267757)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.idl	2020-09-29 20:40:27 UTC (rev 267758)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2011 Google Inc. All rights reserved.
+ * Copyright (C) 2020 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -23,12 +24,11 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-// FIXME: This should be exposed to workers as well.
 [
     Conditional=INDEXED_DATABASE,
+    Exposed=(Window,Worker)
 ] interface IDBVersionChangeEvent : Event {
     constructor(DOMString type, optional IDBVersionChangeEventInit eventInitDict);
-
     readonly attribute unsigned long long oldVersion;
     readonly attribute unsigned long long? newVersion;
 };

Modified: trunk/Source/WebCore/Modules/indexeddb/WorkerGlobalScope+IndexedDatabase.idl (267757 => 267758)


--- trunk/Source/WebCore/Modules/indexeddb/WorkerGlobalScope+IndexedDatabase.idl	2020-09-29 20:13:28 UTC (rev 267757)
+++ trunk/Source/WebCore/Modules/indexeddb/WorkerGlobalScope+IndexedDatabase.idl	2020-09-29 20:40:27 UTC (rev 267758)
@@ -30,5 +30,5 @@
     Conditional=INDEXED_DATABASE_IN_WORKERS,
     ImplementedBy=WorkerGlobalScopeIndexedDatabase
 ] partial interface WorkerGlobalScope {
-    [EnabledAtRuntime=IndexedDBWorkers] readonly attribute IDBFactory indexedDB;
+    [SameObject] readonly attribute IDBFactory indexedDB;
 };

Modified: trunk/Source/WebCore/page/RuntimeEnabledFeatures.h (267757 => 267758)


--- trunk/Source/WebCore/page/RuntimeEnabledFeatures.h	2020-09-29 20:13:28 UTC (rev 267757)
+++ trunk/Source/WebCore/page/RuntimeEnabledFeatures.h	2020-09-29 20:40:27 UTC (rev 267758)
@@ -149,11 +149,6 @@
     bool attachmentElementEnabled() const { return m_isAttachmentElementEnabled; }
 #endif
 
-#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
-    void setIndexedDBWorkersEnabled(bool isEnabled) { m_isIndexedDBWorkersEnabled = isEnabled; }
-    bool indexedDBWorkersEnabled() const { return m_isIndexedDBWorkersEnabled; }
-#endif
-
     bool userGesturePromisePropagationEnabled() const { return m_userGesturePromisePropagationEnabled; }
     void setUserGesturePromisePropagationEnabled(bool isEnabled) { m_userGesturePromisePropagationEnabled = isEnabled; }
 
@@ -316,10 +311,6 @@
     bool m_isAttachmentElementEnabled { false };
 #endif
 
-#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
-    bool m_isIndexedDBWorkersEnabled { true };
-#endif
-
     bool m_userGesturePromisePropagationEnabled { true };
 
 #if ENABLE(WEB_RTC)

Modified: trunk/Source/WebCore/testing/InternalSettings.cpp (267757 => 267758)


--- trunk/Source/WebCore/testing/InternalSettings.cpp	2020-09-29 20:13:28 UTC (rev 267757)
+++ trunk/Source/WebCore/testing/InternalSettings.cpp	2020-09-29 20:40:27 UTC (rev 267758)
@@ -110,9 +110,6 @@
     , m_forcedPrefersReducedMotionAccessibilityValue(settings.forcedPrefersReducedMotionAccessibilityValue())
     , m_fontLoadTimingOverride(settings.fontLoadTimingOverride())
     , m_frameFlattening(settings.frameFlattening())
-#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
-    , m_indexedDBWorkersEnabled(RuntimeEnabledFeatures::sharedFeatures().indexedDBWorkersEnabled())
-#endif
 #if ENABLE(WEBGL2)
     , m_webGL2Enabled(RuntimeEnabledFeatures::sharedFeatures().webGL2Enabled())
 #endif
@@ -214,9 +211,6 @@
 #endif
     settings.setAnimatedImageDebugCanvasDrawingEnabled(m_animatedImageDebugCanvasDrawingEnabled);
 
-#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
-    RuntimeEnabledFeatures::sharedFeatures().setIndexedDBWorkersEnabled(m_indexedDBWorkersEnabled);
-#endif
 #if ENABLE(WEBGL2)
     RuntimeEnabledFeatures::sharedFeatures().setWebGL2Enabled(m_webGL2Enabled);
 #endif
@@ -793,15 +787,6 @@
     return { };
 }
 
-void InternalSettings::setIndexedDBWorkersEnabled(bool enabled)
-{
-#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
-    RuntimeEnabledFeatures::sharedFeatures().setIndexedDBWorkersEnabled(enabled);
-#else
-    UNUSED_PARAM(enabled);
-#endif
-}
-
 void InternalSettings::setWebGL2Enabled(bool enabled)
 {
 #if ENABLE(WEBGL2)

Modified: trunk/Source/WebCore/testing/InternalSettings.h (267757 => 267758)


--- trunk/Source/WebCore/testing/InternalSettings.h	2020-09-29 20:13:28 UTC (rev 267757)
+++ trunk/Source/WebCore/testing/InternalSettings.h	2020-09-29 20:40:27 UTC (rev 267758)
@@ -129,7 +129,6 @@
     void setForcedSupportsHighDynamicRangeValue(ForcedAccessibilityValue);
 
     // RuntimeEnabledFeatures.
-    static void setIndexedDBWorkersEnabled(bool);
     static void setWebGL2Enabled(bool);
     static void setWebGPUEnabled(bool);
     static void setPictureInPictureAPIEnabled(bool);
@@ -220,7 +219,6 @@
         FrameFlattening m_frameFlattening;
 
         // Runtime enabled settings.
-        bool m_indexedDBWorkersEnabled;
         bool m_webGL2Enabled;
         bool m_fetchAPIKeepAliveAPIEnabled;
         

Modified: trunk/Source/WebCore/testing/InternalSettings.idl (267757 => 267758)


--- trunk/Source/WebCore/testing/InternalSettings.idl	2020-09-29 20:13:28 UTC (rev 267757)
+++ trunk/Source/WebCore/testing/InternalSettings.idl	2020-09-29 20:40:27 UTC (rev 267758)
@@ -94,7 +94,6 @@
     [MayThrowException] undefined setShouldDispatchSyntheticMouseOutAfterSyntheticClick(boolean shouldDispatch);
 
     // RuntimeEnabledFeatures.
-    undefined setIndexedDBWorkersEnabled(boolean enabled);
     undefined setWebGL2Enabled(boolean enabled);
     undefined setWebGPUEnabled(boolean enabled);
     undefined setFetchAPIKeepAliveEnabled(boolean enabled);

Modified: trunk/Source/WebCore/workers/WorkerGlobalScope.idl (267757 => 267758)


--- trunk/Source/WebCore/workers/WorkerGlobalScope.idl	2020-09-29 20:13:28 UTC (rev 267757)
+++ trunk/Source/WebCore/workers/WorkerGlobalScope.idl	2020-09-29 20:40:27 UTC (rev 267758)
@@ -46,21 +46,6 @@
 
     [MayThrowException] undefined importScripts(USVString... urls);
     readonly attribute WorkerNavigator navigator;
-
-    // Additional constructors
-
-    // FIXME: Automatically generate these once we can drop the IndexedDBWorkers runtime flag.
-    [Conditional=INDEXED_DATABASE_IN_WORKERS, EnabledAtRuntime=IndexedDBWorkers] attribute IDBCursorConstructor IDBCursor;
-    [Conditional=INDEXED_DATABASE_IN_WORKERS, EnabledAtRuntime=IndexedDBWorkers] attribute IDBCursorWithValueConstructor IDBCursorWithValue;
-    [Conditional=INDEXED_DATABASE_IN_WORKERS, EnabledAtRuntime=IndexedDBWorkers] attribute IDBDatabaseConstructor IDBDatabase;
-    [Conditional=INDEXED_DATABASE_IN_WORKERS, EnabledAtRuntime=IndexedDBWorkers] attribute IDBFactoryConstructor IDBFactory;
-    [Conditional=INDEXED_DATABASE_IN_WORKERS, EnabledAtRuntime=IndexedDBWorkers] attribute IDBIndexConstructor IDBIndex;
-    [Conditional=INDEXED_DATABASE_IN_WORKERS, EnabledAtRuntime=IndexedDBWorkers] attribute IDBKeyRangeConstructor IDBKeyRange;
-    [Conditional=INDEXED_DATABASE_IN_WORKERS, EnabledAtRuntime=IndexedDBWorkers] attribute IDBObjectStoreConstructor IDBObjectStore;
-    [Conditional=INDEXED_DATABASE_IN_WORKERS, EnabledAtRuntime=IndexedDBWorkers] attribute IDBOpenDBRequestConstructor IDBOpenDBRequest;
-    [Conditional=INDEXED_DATABASE_IN_WORKERS, EnabledAtRuntime=IndexedDBWorkers] attribute IDBRequestConstructor IDBRequest;
-    [Conditional=INDEXED_DATABASE_IN_WORKERS, EnabledAtRuntime=IndexedDBWorkers] attribute IDBTransactionConstructor IDBTransaction;
-    [Conditional=INDEXED_DATABASE_IN_WORKERS, EnabledAtRuntime=IndexedDBWorkers] attribute IDBVersionChangeEventConstructor IDBVersionChangeEvent;
 };
 
 WorkerGlobalScope includes GlobalCrypto;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to