Title: [264661] trunk
Revision
264661
Author
commit-qu...@webkit.org
Date
2020-07-21 10:28:21 -0700 (Tue, 21 Jul 2020)

Log Message

REGRESSION(r264486): ASSERTION FAILED: ASSERT_NOT_REACHED() in NetworkProcessPlatformStrategies::createBlobRegistry
https://bugs.webkit.org/show_bug.cgi?id=214425

Patch by Sihui Liu <sihui_...@appe.com> on 2020-07-21
Reviewed by Youenn Fablet.

Source/WebCore:

In SerializedScriptValue.cpp, some kind of wrappers will not be created when global object is not
JSDOMGlobalObject, so they would not be created for IDB before r264486. After r264486, IDB uses
JSIDBSerializationGlobalObject, which is JSDOMGlobalObject, so those wrappers start to be created. To restore
the old behavior, adding checks for JSIDBSerializationGlobalObject in SerializedScriptValue.cpp.

Modify and re-enable test: LayoutTests/storage/indexeddb/structured-clone.html

* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneDeserializer::CloneDeserializer):
(WebCore::CloneDeserializer::readFile):
(WebCore::CloneDeserializer::readRTCCertificate):
(WebCore::CloneDeserializer::readTerminal):

LayoutTests:

Remove storage/indexeddb/structured-clone-private.html as blob is not supported in IDB for private browsing.
Also storage/indexeddb/structured-clone.html already covers the code paths for structured clone in IDB.

* platform/mac-wk1/TestExpectations:
* platform/mac-wk2/TestExpectations:
* platform/win/TestExpectations:
* storage/indexeddb/resources/structured-clone.js:
(testFile):
* storage/indexeddb/structured-clone-expected.txt:
* storage/indexeddb/structured-clone-private-expected.txt: Removed.
* storage/indexeddb/structured-clone-private.html: Removed.

Modified Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (264660 => 264661)


--- trunk/LayoutTests/ChangeLog	2020-07-21 17:18:56 UTC (rev 264660)
+++ trunk/LayoutTests/ChangeLog	2020-07-21 17:28:21 UTC (rev 264661)
@@ -1,3 +1,22 @@
+2020-07-21  Sihui Liu  <sihui_...@appe.com>
+
+        REGRESSION(r264486): ASSERTION FAILED: ASSERT_NOT_REACHED() in NetworkProcessPlatformStrategies::createBlobRegistry
+        https://bugs.webkit.org/show_bug.cgi?id=214425
+
+        Reviewed by Youenn Fablet.
+
+        Remove storage/indexeddb/structured-clone-private.html as blob is not supported in IDB for private browsing. 
+        Also storage/indexeddb/structured-clone.html already covers the code paths for structured clone in IDB.
+
+        * platform/mac-wk1/TestExpectations:
+        * platform/mac-wk2/TestExpectations:
+        * platform/win/TestExpectations:
+        * storage/indexeddb/resources/structured-clone.js:
+        (testFile):
+        * storage/indexeddb/structured-clone-expected.txt:
+        * storage/indexeddb/structured-clone-private-expected.txt: Removed.
+        * storage/indexeddb/structured-clone-private.html: Removed.
+
 2020-07-21  Hector Lopez  <hector_i_lo...@apple.com>
 
         [ iOS WK2 ] fast/scrolling/ios/autoscroll-input-when-very-zoomed.html is a flaky failure

Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (264660 => 264661)


--- trunk/LayoutTests/platform/mac-wk1/TestExpectations	2020-07-21 17:18:56 UTC (rev 264660)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations	2020-07-21 17:28:21 UTC (rev 264661)
@@ -984,9 +984,6 @@
 
 webkit.org/b/214388 [ Mojave ] compositing/repaint/iframes/composited-iframe-with-fixed-background-doc-repaint.html [ Pass Failure ]
 
-webkit.org/b/214478 [ Debug ] storage/indexeddb/structured-clone-private.html [ Skip ]
-webkit.org/b/214478 [ Debug ] storage/indexeddb/structured-clone.html [ Skip ]
-
 webkit.org/b/214469 imported/w3c/web-platform-tests/css/css-animations/animation-opacity-pause-and-set-time.html [ ImageOnlyFailure ]
 webkit.org/b/214469 imported/w3c/web-platform-tests/css/css-animations/animation-transform-pause-and-set-time.html [ ImageOnlyFailure ]
 webkit.org/b/214469 imported/w3c/web-platform-tests/css/css-overflow/overflow-ellipsis-dynamic-001.html [ ImageOnlyFailure ]

Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (264660 => 264661)


--- trunk/LayoutTests/platform/mac-wk2/TestExpectations	2020-07-21 17:18:56 UTC (rev 264660)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations	2020-07-21 17:28:21 UTC (rev 264661)
@@ -1072,10 +1072,6 @@
 webkit.org/b/214478 [ Debug ] imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-generateCertificate.html [ Skip ]
 webkit.org/b/214478 [ Debug ] imported/w3c/web-platform-tests/webrtc/RTCSctpTransport-constructor.html [ Skip ]
 webkit.org/b/214478 [ Debug ] imported/w3c/web-platform-tests/webrtc/idlharness.https.window.html [ Skip ]
-webkit.org/b/214478 [ Debug ] storage/indexeddb/modern/blob-simple-workers.html [ Skip ]
-webkit.org/b/214478 [ Debug ] storage/indexeddb/modern/blob-simple.html [ Skip ]
-webkit.org/b/214478 [ Debug ] storage/indexeddb/structured-clone-private.html [ Skip ]
-webkit.org/b/214478 [ Debug ] storage/indexeddb/structured-clone.html [ Skip ]
 webkit.org/b/214478 [ Debug ] tiled-drawing/scrolling/fast-scroll-iframe-latched-select.html [ Skip ]
 webkit.org/b/214478 [ Debug ] webrtc/simulcast-h264.html [ Skip ]
 

Modified: trunk/LayoutTests/platform/win/TestExpectations (264660 => 264661)


--- trunk/LayoutTests/platform/win/TestExpectations	2020-07-21 17:18:56 UTC (rev 264660)
+++ trunk/LayoutTests/platform/win/TestExpectations	2020-07-21 17:28:21 UTC (rev 264661)
@@ -4525,4 +4525,3 @@
 webkit.org/b/214428 imported/mozilla/svg/blend-saturation.svg [ Failure ]
 
 storage/indexeddb/structured-clone.html [ Skip ]
-storage/indexeddb/structured-clone-private.html [ Skip ]

Modified: trunk/LayoutTests/storage/indexeddb/resources/structured-clone.js (264660 => 264661)


--- trunk/LayoutTests/storage/indexeddb/resources/structured-clone.js	2020-07-21 17:18:56 UTC (rev 264660)
+++ trunk/LayoutTests/storage/indexeddb/resources/structured-clone.js	2020-07-21 17:28:21 UTC (rev 264661)
@@ -3,18 +3,8 @@
     importScripts('shared.js');
 }
 
-description("Test structured clone permutations in IndexedDB. File/FileList tests require DumpRenderTree.");
+description("Test structured clone permutations in IndexedDB.");
 
-if (self.eventSender && eventSender.beginDragWithFiles) {
-    var fileInput = document.getElementById("fileInput");
-    var fileRect = fileInput.getClientRects()[0];
-    var targetX = fileRect.left + fileRect.width / 2;
-    var targetY = fileRect.top + fileRect.height / 2;
-    eventSender.beginDragWithFiles(['resources/test-data.html', 'resources/test-data.txt']);
-    eventSender.mouseMoveTo(targetX, targetY);
-    eventSender.mouseUp();
-}
-
 indexedDBTest(prepareDatabase, startTests);
 function prepareDatabase()
 {
@@ -385,12 +375,6 @@
 function testBlob(callback)
 {
     debug("Testing Blob");
-
-    // FIXME: https://bugs.webkit.org/show_bug.cgi?id=214425
-    debug("Skipping test");
-    callback();
-    return;
-
     shouldBeTrue("FileReader != null");
     evalAndLog("test_content = 'This is a test. This is only a test.'");
     evalAndLog("test_data = new Blob([test_content])");
@@ -411,11 +395,6 @@
     shouldBeTrue("file1 !== file2");
     shouldBeEqualToString("Object.prototype.toString.call(file1)", "[object File]");
     shouldBeEqualToString("Object.prototype.toString.call(file2)", "[object File]");
-    debug("file1.size: " + file1.size);
-    shouldBe("file1.size", "file2.size");
-    debug("file1.type: " + file1.type);
-    shouldBe("file1.type", "file2.type");
-    debug("file1.name: " + file1.name);
     shouldBe("file1.name", "file2.name");
     shouldBe("String(file1.lastModifiedDate)", "String(file2.lastModifiedDate)");
     if (callback) {
@@ -426,15 +405,9 @@
 function testFile(callback)
 {
     debug("Testing File");
-
-    // FIXME: eventSender.beginDragWithFiles is not supported.
-    debug("Skipping test");
-    callback();
-    return;
-
-    evalAndLog("test_content = fileInput.files[0]");
-
-    self.test_data = test_content;
+    evalAndLog("test_content = 'This is a test. This is only a test.'");
+    evalAndLog("blob = new Blob([test_content])");
+    evalAndLog("test_data = new File([blob], 'fileName')");
     testValue(test_data, function(result) {
         self.result = result;
         compareFiles(result, test_data, callback);
@@ -445,15 +418,7 @@
 function testFileList(callback)
 {
     debug("Testing FileList");
-
-    // FIXME: eventSender.beginDragWithFiles is not supported.
-    debug("Skipping test");
-    callback();
-    return;
-
-    evalAndLog("test_content = fileInput.files");
-
-    self.test_data = test_content;
+    evalAndLog("test_data = document.getElementById('fileInput').files;");
     testValue(test_data, function(result) {
         self.result = result;
         shouldBeTrue("test_data !== result");

Modified: trunk/LayoutTests/storage/indexeddb/structured-clone-expected.txt (264660 => 264661)


--- trunk/LayoutTests/storage/indexeddb/structured-clone-expected.txt	2020-07-21 17:18:56 UTC (rev 264660)
+++ trunk/LayoutTests/storage/indexeddb/structured-clone-expected.txt	2020-07-21 17:28:21 UTC (rev 264661)
@@ -1,4 +1,4 @@
-Test structured clone permutations in IndexedDB. File/FileList tests require DumpRenderTree.
+Test structured clone permutations in IndexedDB.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
@@ -599,13 +599,43 @@
 PASS result data matches
 
 Testing Blob
-Skipping test
+PASS FileReader != null is true
+test_content = 'This is a test. This is only a test.'
+test_data = new Blob([test_content])
+transaction = db.transaction('storeName', 'readwrite')
+store = transaction.objectStore('storeName')
+store.put(value, 'key')
+store.get('key')
+PASS test_data !== result is true
+PASS Object.prototype.toString.call(result) is "[object Blob]"
+PASS result.size is test_data.size
+PASS result.type is test_data.type
+PASS text is "This is a test. This is only a test."
 
 Testing File
-Skipping test
+test_content = 'This is a test. This is only a test.'
+blob = new Blob([test_content])
+test_data = new File([blob], 'fileName')
+transaction = db.transaction('storeName', 'readwrite')
+store = transaction.objectStore('storeName')
+store.put(value, 'key')
+store.get('key')
+PASS file1 !== file2 is true
+PASS Object.prototype.toString.call(file1) is "[object File]"
+PASS Object.prototype.toString.call(file2) is "[object File]"
+PASS file1.name is file2.name
+PASS String(file1.lastModifiedDate) is String(file2.lastModifiedDate)
+PASS text2 is "This is a test. This is only a test."
 
 Testing FileList
-Skipping test
+test_data = document.getElementById('fileInput').files;
+transaction = db.transaction('storeName', 'readwrite')
+store = transaction.objectStore('storeName')
+store.put(value, 'key')
+store.get('key')
+PASS test_data !== result is true
+PASS Object.prototype.toString.call(result) is "[object FileList]"
+PASS result.length is test_data.length
 
 Testing Object
 test_data = []

Deleted: trunk/LayoutTests/storage/indexeddb/structured-clone-private-expected.txt (264660 => 264661)


--- trunk/LayoutTests/storage/indexeddb/structured-clone-private-expected.txt	2020-07-21 17:18:56 UTC (rev 264660)
+++ trunk/LayoutTests/storage/indexeddb/structured-clone-private-expected.txt	2020-07-21 17:28:21 UTC (rev 264661)
@@ -1,935 +0,0 @@
-Test structured clone permutations in IndexedDB. File/FileList tests require DumpRenderTree.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
-
-indexedDB.deleteDatabase(dbname)
-indexedDB.open(dbname)
-store = db.createObjectStore('storeName')
-This index is not used, but evaluating key path on each put() call will exercise (de)serialization:
-store.createIndex('indexName', 'dummyKeyPath')
-
-Running tests...
-
-Testing: undefined
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS is(test_data, result) is true
-
-Testing: null
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS is(test_data, result) is true
-
-Testing boolean primitives
-Testing: true
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS is(test_data, result) is true
-Testing: false
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS is(test_data, result) is true
-
-Testing number primitives
-Testing: NaN
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS is(test_data, result) is true
-Testing: -Infinity
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS is(test_data, result) is true
-Testing: -Number.MAX_VALUE
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS is(test_data, result) is true
-Testing: -0xffffffff
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS is(test_data, result) is true
-Testing: -0x80000000
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS is(test_data, result) is true
-Testing: -0x7fffffff
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS is(test_data, result) is true
-Testing: -1
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS is(test_data, result) is true
-Testing: -Number.MIN_VALUE
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS is(test_data, result) is true
-Testing: -0
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS is(test_data, result) is true
-Testing: 0
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS is(test_data, result) is true
-Testing: 1
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS is(test_data, result) is true
-Testing: Number.MIN_VALUE
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS is(test_data, result) is true
-Testing: 0x7fffffff
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS is(test_data, result) is true
-Testing: 0x80000000
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS is(test_data, result) is true
-Testing: 0xffffffff
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS is(test_data, result) is true
-Testing: Number.MAX_VALUE
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS is(test_data, result) is true
-Testing: Infinity
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS is(test_data, result) is true
-
-Testing string primitives
-Testing: ''
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS is(test_data, result) is true
-Testing: 'this is a sample string'
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS is(test_data, result) is true
-Testing: 'null(\0)'
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS is(test_data, result) is true
-
-Testing BigInt primitives
-Testing: -12345678901234567890n
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS is(test_data, result) is true
-Testing: -1n
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS is(test_data, result) is true
-Testing: 0n
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS is(test_data, result) is true
-Testing: 1n
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS is(test_data, result) is true
-Testing: 12345678901234567890n
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS is(test_data, result) is true
-
-Testing Boolean objects
-Testing: new Boolean(true)
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS typeof result is "object"
-PASS Object.prototype.toString.call(result) is Object.prototype.toString.call(test_data)
-PASS test_data !== result is true
-PASS result.toString() is test_data.toString()
-PASS is(test_data.valueOf(), result.valueOf()) is true
-Testing: new Boolean(false)
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS typeof result is "object"
-PASS Object.prototype.toString.call(result) is Object.prototype.toString.call(test_data)
-PASS test_data !== result is true
-PASS result.toString() is test_data.toString()
-PASS is(test_data.valueOf(), result.valueOf()) is true
-
-Testing Number objects
-Testing: new Number(NaN)
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS typeof result is "object"
-PASS Object.prototype.toString.call(result) is Object.prototype.toString.call(test_data)
-PASS test_data !== result is true
-PASS result.toString() is test_data.toString()
-PASS is(test_data.valueOf(), result.valueOf()) is true
-Testing: new Number(-Infinity)
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS typeof result is "object"
-PASS Object.prototype.toString.call(result) is Object.prototype.toString.call(test_data)
-PASS test_data !== result is true
-PASS result.toString() is test_data.toString()
-PASS is(test_data.valueOf(), result.valueOf()) is true
-Testing: new Number(-Number.MAX_VALUE)
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS typeof result is "object"
-PASS Object.prototype.toString.call(result) is Object.prototype.toString.call(test_data)
-PASS test_data !== result is true
-PASS result.toString() is test_data.toString()
-PASS is(test_data.valueOf(), result.valueOf()) is true
-Testing: new Number(-Number.MIN_VALUE)
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS typeof result is "object"
-PASS Object.prototype.toString.call(result) is Object.prototype.toString.call(test_data)
-PASS test_data !== result is true
-PASS result.toString() is test_data.toString()
-PASS is(test_data.valueOf(), result.valueOf()) is true
-Testing: new Number(-0)
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS typeof result is "object"
-PASS Object.prototype.toString.call(result) is Object.prototype.toString.call(test_data)
-PASS test_data !== result is true
-PASS result.toString() is test_data.toString()
-PASS is(test_data.valueOf(), result.valueOf()) is true
-Testing: new Number(0)
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS typeof result is "object"
-PASS Object.prototype.toString.call(result) is Object.prototype.toString.call(test_data)
-PASS test_data !== result is true
-PASS result.toString() is test_data.toString()
-PASS is(test_data.valueOf(), result.valueOf()) is true
-Testing: new Number(Number.MIN_VALUE)
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS typeof result is "object"
-PASS Object.prototype.toString.call(result) is Object.prototype.toString.call(test_data)
-PASS test_data !== result is true
-PASS result.toString() is test_data.toString()
-PASS is(test_data.valueOf(), result.valueOf()) is true
-Testing: new Number(Number.MAX_VALUE)
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS typeof result is "object"
-PASS Object.prototype.toString.call(result) is Object.prototype.toString.call(test_data)
-PASS test_data !== result is true
-PASS result.toString() is test_data.toString()
-PASS is(test_data.valueOf(), result.valueOf()) is true
-Testing: new Number(Infinity)
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS typeof result is "object"
-PASS Object.prototype.toString.call(result) is Object.prototype.toString.call(test_data)
-PASS test_data !== result is true
-PASS result.toString() is test_data.toString()
-PASS is(test_data.valueOf(), result.valueOf()) is true
-
-Testing String objects
-Testing: new String()
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS typeof result is "object"
-PASS Object.prototype.toString.call(result) is Object.prototype.toString.call(test_data)
-PASS test_data !== result is true
-PASS result.toString() is test_data.toString()
-PASS is(test_data.valueOf(), result.valueOf()) is true
-Testing: new String('this is a sample string')
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS typeof result is "object"
-PASS Object.prototype.toString.call(result) is Object.prototype.toString.call(test_data)
-PASS test_data !== result is true
-PASS result.toString() is test_data.toString()
-PASS is(test_data.valueOf(), result.valueOf()) is true
-Testing: new String('null(\0)')
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS typeof result is "object"
-PASS Object.prototype.toString.call(result) is Object.prototype.toString.call(test_data)
-PASS test_data !== result is true
-PASS result.toString() is test_data.toString()
-PASS is(test_data.valueOf(), result.valueOf()) is true
-
-Testing BigInt objects
-Testing BigInt object: BigInt(-12345678901234567890)
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS typeof result is "bigint"
-PASS test_data.toString() is result.toString()
-Testing BigInt object: BigInt(-1)
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS typeof result is "bigint"
-PASS test_data.toString() is result.toString()
-Testing BigInt object: BigInt(0)
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS typeof result is "bigint"
-PASS test_data.toString() is result.toString()
-Testing BigInt object: BigInt(1)
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS typeof result is "bigint"
-PASS test_data.toString() is result.toString()
-Testing BigInt object: BigInt(-0)
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS typeof result is "bigint"
-PASS test_data.toString() is result.toString()
-Testing BigInt object: BigInt('0x1fffffffffffff')
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS typeof result is "bigint"
-PASS test_data.toString() is result.toString()
-
-Testing Date objects
-Testing: new Date(-1e13)
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS typeof result is "object"
-PASS Object.prototype.toString.call(result) is Object.prototype.toString.call(test_data)
-PASS test_data !== result is true
-PASS result.toString() is test_data.toString()
-PASS is(test_data.valueOf(), result.valueOf()) is true
-Testing: new Date(-1e12)
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS typeof result is "object"
-PASS Object.prototype.toString.call(result) is Object.prototype.toString.call(test_data)
-PASS test_data !== result is true
-PASS result.toString() is test_data.toString()
-PASS is(test_data.valueOf(), result.valueOf()) is true
-Testing: new Date(-1e9)
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS typeof result is "object"
-PASS Object.prototype.toString.call(result) is Object.prototype.toString.call(test_data)
-PASS test_data !== result is true
-PASS result.toString() is test_data.toString()
-PASS is(test_data.valueOf(), result.valueOf()) is true
-Testing: new Date(-1e6)
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS typeof result is "object"
-PASS Object.prototype.toString.call(result) is Object.prototype.toString.call(test_data)
-PASS test_data !== result is true
-PASS result.toString() is test_data.toString()
-PASS is(test_data.valueOf(), result.valueOf()) is true
-Testing: new Date(-1e3)
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS typeof result is "object"
-PASS Object.prototype.toString.call(result) is Object.prototype.toString.call(test_data)
-PASS test_data !== result is true
-PASS result.toString() is test_data.toString()
-PASS is(test_data.valueOf(), result.valueOf()) is true
-Testing: new Date(0)
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS typeof result is "object"
-PASS Object.prototype.toString.call(result) is Object.prototype.toString.call(test_data)
-PASS test_data !== result is true
-PASS result.toString() is test_data.toString()
-PASS is(test_data.valueOf(), result.valueOf()) is true
-Testing: new Date(1e3)
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS typeof result is "object"
-PASS Object.prototype.toString.call(result) is Object.prototype.toString.call(test_data)
-PASS test_data !== result is true
-PASS result.toString() is test_data.toString()
-PASS is(test_data.valueOf(), result.valueOf()) is true
-Testing: new Date(1e6)
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS typeof result is "object"
-PASS Object.prototype.toString.call(result) is Object.prototype.toString.call(test_data)
-PASS test_data !== result is true
-PASS result.toString() is test_data.toString()
-PASS is(test_data.valueOf(), result.valueOf()) is true
-Testing: new Date(1e9)
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS typeof result is "object"
-PASS Object.prototype.toString.call(result) is Object.prototype.toString.call(test_data)
-PASS test_data !== result is true
-PASS result.toString() is test_data.toString()
-PASS is(test_data.valueOf(), result.valueOf()) is true
-Testing: new Date(1e12)
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS typeof result is "object"
-PASS Object.prototype.toString.call(result) is Object.prototype.toString.call(test_data)
-PASS test_data !== result is true
-PASS result.toString() is test_data.toString()
-PASS is(test_data.valueOf(), result.valueOf()) is true
-Testing: new Date(1e13)
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS typeof result is "object"
-PASS Object.prototype.toString.call(result) is Object.prototype.toString.call(test_data)
-PASS test_data !== result is true
-PASS result.toString() is test_data.toString()
-PASS is(test_data.valueOf(), result.valueOf()) is true
-
-Testing RegExp objects
-Testing RegExp: new RegExp()
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS test_data !== result is true
-PASS Object.prototype.toString.call(result) is "[object RegExp]"
-PASS result.toString() is test_data.toString()
-
-Testing RegExp: /abc/
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS test_data !== result is true
-PASS Object.prototype.toString.call(result) is "[object RegExp]"
-PASS result.toString() is test_data.toString()
-
-Testing RegExp: /abc/g
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS test_data !== result is true
-PASS Object.prototype.toString.call(result) is "[object RegExp]"
-PASS result.toString() is test_data.toString()
-
-Testing RegExp: /abc/i
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS test_data !== result is true
-PASS Object.prototype.toString.call(result) is "[object RegExp]"
-PASS result.toString() is test_data.toString()
-
-Testing RegExp: /abc/gi
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS test_data !== result is true
-PASS Object.prototype.toString.call(result) is "[object RegExp]"
-PASS result.toString() is test_data.toString()
-
-Testing RegExp: /abc/m
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS test_data !== result is true
-PASS Object.prototype.toString.call(result) is "[object RegExp]"
-PASS result.toString() is test_data.toString()
-
-Testing RegExp: /abc/mg
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS test_data !== result is true
-PASS Object.prototype.toString.call(result) is "[object RegExp]"
-PASS result.toString() is test_data.toString()
-
-Testing RegExp: /abc/mi
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS test_data !== result is true
-PASS Object.prototype.toString.call(result) is "[object RegExp]"
-PASS result.toString() is test_data.toString()
-
-Testing RegExp: /abc/mgi
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS test_data !== result is true
-PASS Object.prototype.toString.call(result) is "[object RegExp]"
-PASS result.toString() is test_data.toString()
-
-
-Testing ImageData
-canvas = document.createElement('canvas')
-canvas.width = 8
-canvas.height = 8
-test_data = canvas.getContext('2d').getImageData(0, 0, 8, 8)
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS test_data !== result is true
-PASS Object.prototype.toString.call(result) is "[object ImageData]"
-PASS result.width is test_data.width
-PASS result.height is test_data.height
-PASS result.data.length is test_data.data.length
-PASS result data matches
-
-Testing Blob
-Skipping test
-
-Testing File
-Skipping test
-
-Testing FileList
-Skipping test
-
-Testing Object
-test_data = []
-test_data[0] = 'foo'
-test_data[1] = 'bar'
-test_data['a'] = true
-test_data['b'] = false
-test_data['foo'] = 123
-test_data['bar'] = 456
-test_data[''] = null
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS test_data !== result is true
-PASS arrayCompare(Object.keys(result).sort(), Object.keys(test_data).sort()) is true
-PASS test_data["0"] is result["0"]
-PASS test_data["1"] is result["1"]
-PASS test_data["a"] is result["a"]
-PASS test_data["b"] is result["b"]
-PASS test_data["foo"] is result["foo"]
-PASS test_data["bar"] is result["bar"]
-PASS test_data[""] is result[""]
-
-Testing Array
-test_data = []
-test_data[0] = 'foo'
-test_data[1] = 'bar'
-test_data[10] = true
-test_data[11] = false
-test_data[20] = 123
-test_data[21] = 456
-test_data[30] = null
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS test_data !== result is true
-PASS test_data.length === result.length is true
-PASS test_data[0] is result[0]
-PASS test_data[1] is result[1]
-PASS test_data[10] is result[10]
-PASS test_data[11] is result[11]
-PASS test_data[20] is result[20]
-PASS test_data[21] is result[21]
-PASS test_data[30] is result[30]
-
-Testing TypedArray
-value = new Uint8Array([])
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS test_data !== result is true
-PASS Object.prototype.toString.call(result) is Object.prototype.toString.call(test_data)
-PASS test_data.length === result.length is true
-value = new Uint8Array([0, 1, 254, 255])
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS test_data !== result is true
-PASS Object.prototype.toString.call(result) is Object.prototype.toString.call(test_data)
-PASS test_data.length === result.length is true
-PASS is(test_data[0], result[0]) is true
-PASS is(test_data[1], result[1]) is true
-PASS is(test_data[2], result[2]) is true
-PASS is(test_data[3], result[3]) is true
-value = new Uint16Array([0x0000, 0x0001, 0xFFFE, 0xFFFF])
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS test_data !== result is true
-PASS Object.prototype.toString.call(result) is Object.prototype.toString.call(test_data)
-PASS test_data.length === result.length is true
-PASS is(test_data[0], result[0]) is true
-PASS is(test_data[1], result[1]) is true
-PASS is(test_data[2], result[2]) is true
-PASS is(test_data[3], result[3]) is true
-value = new Uint32Array([0x00000000, 0x00000001, 0xFFFFFFFE, 0xFFFFFFFF])
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS test_data !== result is true
-PASS Object.prototype.toString.call(result) is Object.prototype.toString.call(test_data)
-PASS test_data.length === result.length is true
-PASS is(test_data[0], result[0]) is true
-PASS is(test_data[1], result[1]) is true
-PASS is(test_data[2], result[2]) is true
-PASS is(test_data[3], result[3]) is true
-value = new Int8Array([0, 1, 254, 255])
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS test_data !== result is true
-PASS Object.prototype.toString.call(result) is Object.prototype.toString.call(test_data)
-PASS test_data.length === result.length is true
-PASS is(test_data[0], result[0]) is true
-PASS is(test_data[1], result[1]) is true
-PASS is(test_data[2], result[2]) is true
-PASS is(test_data[3], result[3]) is true
-value = new Int16Array([0x0000, 0x0001, 0xFFFE, 0xFFFF])
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS test_data !== result is true
-PASS Object.prototype.toString.call(result) is Object.prototype.toString.call(test_data)
-PASS test_data.length === result.length is true
-PASS is(test_data[0], result[0]) is true
-PASS is(test_data[1], result[1]) is true
-PASS is(test_data[2], result[2]) is true
-PASS is(test_data[3], result[3]) is true
-value = new Int32Array([0x00000000, 0x00000001, 0xFFFFFFFE, 0xFFFFFFFF])
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS test_data !== result is true
-PASS Object.prototype.toString.call(result) is Object.prototype.toString.call(test_data)
-PASS test_data.length === result.length is true
-PASS is(test_data[0], result[0]) is true
-PASS is(test_data[1], result[1]) is true
-PASS is(test_data[2], result[2]) is true
-PASS is(test_data[3], result[3]) is true
-value = new Uint8ClampedArray([0, 1, 254, 255])
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS test_data !== result is true
-PASS Object.prototype.toString.call(result) is Object.prototype.toString.call(test_data)
-PASS test_data.length === result.length is true
-PASS is(test_data[0], result[0]) is true
-PASS is(test_data[1], result[1]) is true
-PASS is(test_data[2], result[2]) is true
-PASS is(test_data[3], result[3]) is true
-value = new Float32Array([-Infinity, -1.5, -1, -0.5, 0, 0.5, 1, 1.5, Infinity, NaN])
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS test_data !== result is true
-PASS Object.prototype.toString.call(result) is Object.prototype.toString.call(test_data)
-PASS test_data.length === result.length is true
-PASS is(test_data[0], result[0]) is true
-PASS is(test_data[1], result[1]) is true
-PASS is(test_data[2], result[2]) is true
-PASS is(test_data[3], result[3]) is true
-PASS is(test_data[4], result[4]) is true
-PASS is(test_data[5], result[5]) is true
-PASS is(test_data[6], result[6]) is true
-PASS is(test_data[7], result[7]) is true
-PASS is(test_data[8], result[8]) is true
-PASS is(test_data[9], result[9]) is true
-value = new Float64Array([-Infinity, -Number.MAX_VALUE, -Number.MIN_VALUE, 0, Number.MIN_VALUE, Number.MAX_VALUE, Infinity, NaN])
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS test_data !== result is true
-PASS Object.prototype.toString.call(result) is Object.prototype.toString.call(test_data)
-PASS test_data.length === result.length is true
-PASS is(test_data[0], result[0]) is true
-PASS is(test_data[1], result[1]) is true
-PASS is(test_data[2], result[2]) is true
-PASS is(test_data[3], result[3]) is true
-PASS is(test_data[4], result[4]) is true
-PASS is(test_data[5], result[5]) is true
-PASS is(test_data[6], result[6]) is true
-PASS is(test_data[7], result[7]) is true
-
-Testing Arrays
-test_data = []
-test_data[0] = []
-test_data[1] = [1, 2, 3]
-test_data[10] = Object.assign(['foo', 'bar'], {10: true, 11: false, 20: 123, 21: 456, 30: null})
-test_data[11] = Object.assign(['foo', 'bar'], {a: true, b: false, foo: 123, bar: 456, '': null})
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS test_data !== result is true
-PASS typeof test_data is typeof result
-PASS test_data.length === result.length is true
-PASS arrayCompare(test_data[0], result[0]) is true
-PASS arrayCompare(test_data[1], result[1]) is true
-PASS arrayCompare(test_data[10], result[10]) is true
-PASS arrayCompare(test_data[11], result[11]) is true
-
-Testing Map
-test_data = new Map([[1,2],[3,4]])
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS typeof test_data is typeof result
-PASS test_data.size is result.size
-
-Testing Set
-test_data = new Set([1,2,3,4])
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS typeof test_data is typeof result
-PASS test_data.size is result.size
-PASS result.has(1) is true
-PASS result.has(2) is true
-PASS result.has(3) is true
-PASS result.has(4) is true
-
-Testing geometry types
-Testing geometry type: new DOMMatrix()
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS test_data !== result is true
-PASS typeof result is "object"
-PASS Object.prototype.toString.call(test_data) is Object.prototype.toString.call(result)
-PASS test_data.toString() is result.toString()
-Testing geometry type: new DOMMatrixReadOnly()
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS test_data !== result is true
-PASS typeof result is "object"
-PASS Object.prototype.toString.call(test_data) is Object.prototype.toString.call(result)
-PASS test_data.toString() is result.toString()
-Testing geometry type: new DOMPoint()
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS test_data !== result is true
-PASS typeof result is "object"
-PASS Object.prototype.toString.call(test_data) is Object.prototype.toString.call(result)
-PASS test_data.toString() is result.toString()
-Testing geometry type: new DOMPointReadOnly()
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS test_data !== result is true
-PASS typeof result is "object"
-PASS Object.prototype.toString.call(test_data) is Object.prototype.toString.call(result)
-PASS test_data.toString() is result.toString()
-Testing geometry type: new DOMRect()
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS test_data !== result is true
-PASS typeof result is "object"
-PASS Object.prototype.toString.call(test_data) is Object.prototype.toString.call(result)
-PASS test_data.toString() is result.toString()
-Testing geometry type: new DOMRectReadOnly()
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS test_data !== result is true
-PASS typeof result is "object"
-PASS Object.prototype.toString.call(test_data) is Object.prototype.toString.call(result)
-PASS test_data.toString() is result.toString()
-Testing geometry type: new DOMQuad()
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS test_data !== result is true
-PASS typeof result is "object"
-PASS Object.prototype.toString.call(test_data) is Object.prototype.toString.call(result)
-PASS test_data.toString() is result.toString()
-
-Testing CryptoKey
-promise = crypto.subtle.generateKey({ name: 'HMAC', hash: {name: 'SHA-512'}}, true, ['sign', 'verify']);
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-store.put(value, 'key')
-store.get('key')
-PASS typeof test_data is typeof result
-PASS test_data.type is result.type
-PASS test_data.extractable is result.extractable
-PASS test_data.algorithm.toString() is result.algorithm.toString()
-PASS arrayCompare(test_data.usages, result.usages) is true
-
-Test types that can't be cloned:
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-Testing Error
-Expecting exception from store.put(new Error, 'key')
-PASS Exception was thrown.
-PASS code is DOMException.DATA_CLONE_ERR
-Exception message: The object can not be cloned.
-Testing Function
-Expecting exception from store.put(new Function, 'key')
-PASS Exception was thrown.
-PASS code is DOMException.DATA_CLONE_ERR
-Exception message: The object can not be cloned.
-Testing DOMException
-Expecting exception from store.put(new DOMException, 'key')
-PASS Exception was thrown.
-PASS code is DOMException.DATA_CLONE_ERR
-Exception message: The object can not be cloned.
-Testing other host object types
-Expecting exception from store.put(self, 'key')
-PASS Exception was thrown.
-PASS code is DOMException.DATA_CLONE_ERR
-Exception message: The object can not be cloned.
-Expecting exception from store.put(document, 'key')
-PASS Exception was thrown.
-PASS code is DOMException.DATA_CLONE_ERR
-Exception message: The object can not be cloned.
-Expecting exception from store.put(document.body, 'key')
-PASS Exception was thrown.
-PASS code is DOMException.DATA_CLONE_ERR
-Exception message: The object can not be cloned.
-PASS successfullyParsed is true
-
-TEST COMPLETE
-

Deleted: trunk/LayoutTests/storage/indexeddb/structured-clone-private.html (264660 => 264661)


--- trunk/LayoutTests/storage/indexeddb/structured-clone-private.html	2020-07-21 17:18:56 UTC (rev 264660)
+++ trunk/LayoutTests/storage/indexeddb/structured-clone-private.html	2020-07-21 17:28:21 UTC (rev 264661)
@@ -1,11 +0,0 @@
-<!-- webkit-test-runner [ useEphemeralSession=true ] -->
-<html>
-<head>
-<script src=""
-<script src=""
-</head>
-<body>
-<input type="file" id="fileInput" multiple></input>
-<script src=""
-</body>
-</html>

Modified: trunk/Source/WebCore/ChangeLog (264660 => 264661)


--- trunk/Source/WebCore/ChangeLog	2020-07-21 17:18:56 UTC (rev 264660)
+++ trunk/Source/WebCore/ChangeLog	2020-07-21 17:28:21 UTC (rev 264661)
@@ -1,3 +1,23 @@
+2020-07-21  Sihui Liu  <sihui_...@appe.com>
+
+        REGRESSION(r264486): ASSERTION FAILED: ASSERT_NOT_REACHED() in NetworkProcessPlatformStrategies::createBlobRegistry
+        https://bugs.webkit.org/show_bug.cgi?id=214425
+
+        Reviewed by Youenn Fablet.
+
+        In SerializedScriptValue.cpp, some kind of wrappers will not be created when global object is not 
+        JSDOMGlobalObject, so they would not be created for IDB before r264486. After r264486, IDB uses 
+        JSIDBSerializationGlobalObject, which is JSDOMGlobalObject, so those wrappers start to be created. To restore
+        the old behavior, adding checks for JSIDBSerializationGlobalObject in SerializedScriptValue.cpp.
+
+        Modify and re-enable test: LayoutTests/storage/indexeddb/structured-clone.html
+
+        * bindings/js/SerializedScriptValue.cpp:
+        (WebCore::CloneDeserializer::CloneDeserializer):
+        (WebCore::CloneDeserializer::readFile):
+        (WebCore::CloneDeserializer::readRTCCertificate):
+        (WebCore::CloneDeserializer::readTerminal):
+
 2020-07-21  Jer Noble  <jer.no...@apple.com>
 
         [Cocoa] Adopt VTRegisterSupplementalVideoDecoderIfAvailable

Modified: trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp (264660 => 264661)


--- trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp	2020-07-21 17:18:56 UTC (rev 264660)
+++ trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp	2020-07-21 17:28:21 UTC (rev 264661)
@@ -46,6 +46,7 @@
 #include "JSDOMRect.h"
 #include "JSFile.h"
 #include "JSFileList.h"
+#include "JSIDBSerializationGlobalObject.h"
 #include "JSImageBitmap.h"
 #include "JSImageData.h"
 #include "JSMessagePort.h"
@@ -2003,7 +2004,7 @@
         )
         : CloneBase(lexicalGlobalObject)
         , m_globalObject(globalObject)
-        , m_isDOMGlobalObject(globalObject->inherits<JSDOMGlobalObject>(globalObject->vm()))
+        , m_isJSIDBSerializationGlobalObject(globalObject->inherits<JSIDBSerializationGlobalObject>(globalObject->vm()))
         , m_ptr(buffer.data())
         , m_end(buffer.data() + buffer.size())
         , m_version(0xFFFFFFFF)
@@ -2034,7 +2035,7 @@
         )
         : CloneBase(lexicalGlobalObject)
         , m_globalObject(globalObject)
-        , m_isDOMGlobalObject(globalObject->inherits<JSDOMGlobalObject>(globalObject->vm()))
+        , m_isJSIDBSerializationGlobalObject(globalObject->inherits<JSIDBSerializationGlobalObject>(globalObject->vm()))
         , m_ptr(buffer.data())
         , m_end(buffer.data() + buffer.size())
         , m_version(0xFFFFFFFF)
@@ -2290,8 +2291,10 @@
         if (filePath.isEmpty())
             filePath = path->string();
 
-        if (m_isDOMGlobalObject)
-            file = File::deserialize(filePath, URL(URL(), url->string()), type->string(), name->string(), optionalLastModified);
+        if (m_isJSIDBSerializationGlobalObject)
+            return true;
+
+        file = File::deserialize(filePath, URL(URL(), url->string()), type->string(), name->string(), optionalLastModified);
         return true;
     }
 
@@ -2945,7 +2948,7 @@
             fingerprints.uncheckedAppend(RTCCertificate::DtlsFingerprint { algorithm->string(), value->string() });
         }
 
-        if (!m_isDOMGlobalObject)
+        if (m_isJSIDBSerializationGlobalObject)
             return constructEmptyObject(m_lexicalGlobalObject, m_globalObject->objectPrototype());
 
         auto rtcCertificate = RTCCertificate::create(SecurityOrigin::createFromString(origin->string()), expires, WTFMove(fingerprints), certificate->takeString(), keyedMaterial->takeString());
@@ -3157,7 +3160,7 @@
             RefPtr<File> file;
             if (!readFile(file))
                 return JSValue();
-            if (!m_isDOMGlobalObject)
+            if (m_isJSIDBSerializationGlobalObject)
                 return jsNull();
             return toJS(m_lexicalGlobalObject, jsCast<JSDOMGlobalObject*>(m_globalObject), file.get());
         }
@@ -3165,15 +3168,16 @@
             unsigned length = 0;
             if (!read(length))
                 return JSValue();
+            ASSERT(m_globalObject->inherits<JSDOMGlobalObject>(m_globalObject->vm()));
             Vector<Ref<File>> files;
             for (unsigned i = 0; i < length; i++) {
                 RefPtr<File> file;
                 if (!readFile(file))
                     return JSValue();
-                if (m_isDOMGlobalObject)
+                if (!m_isJSIDBSerializationGlobalObject)
                     files.append(file.releaseNonNull());
             }
-            if (!m_isDOMGlobalObject)
+            if (m_isJSIDBSerializationGlobalObject)
                 return jsNull();
             return getJSValue(FileList::create(WTFMove(files)).get());
         }
@@ -3191,10 +3195,6 @@
                 fail();
                 return JSValue();
             }
-            if (!m_isDOMGlobalObject) {
-                m_ptr += length;
-                return jsNull();
-            }
             IntSize imageSize(width, height);
             RELEASE_ASSERT(!length || (imageSize.area() * 4).unsafeGet() <= length);
             auto result = ImageData::create(imageSize);
@@ -3219,7 +3219,7 @@
             unsigned long long size = 0;
             if (!read(size))
                 return JSValue();
-            if (!m_isDOMGlobalObject)
+            if (m_isJSIDBSerializationGlobalObject)
                 return jsNull();
             return getJSValue(Blob::deserialize(URL(URL(), url->string()), type->string(), size, blobFilePathForBlobURL(url->string())).get());
         }
@@ -3412,7 +3412,7 @@
     }
 
     JSGlobalObject* m_globalObject;
-    bool m_isDOMGlobalObject;
+    bool m_isJSIDBSerializationGlobalObject;
     const uint8_t* m_ptr;
     const uint8_t* m_end;
     unsigned m_version;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to