diff --git a/dom/indexedDB/IDBObjectStore.cpp b/dom/indexedDB/IDBObjectStore.cpp index 7e242a59eb5b..728f10b1055b 100644 --- a/dom/indexedDB/IDBObjectStore.cpp +++ b/dom/indexedDB/IDBObjectStore.cpp @@ -144,12 +144,6 @@ MovingNotNull> GenerateRequest( std::move(transaction)); } -void StructuredCloneErrorCallback(JSContext* aCx, uint32_t aErrorId, - void* aClosure, const char* aErrorMessage) { - // This callback is only used to prevent the default cloning TypeErrors - // from being thrown, as we will throw DataCloneErrors instead per spec. -} - bool StructuredCloneWriteCallback(JSContext* aCx, JSStructuredCloneWriter* aWriter, JS::Handle aObj, @@ -284,14 +278,10 @@ bool CopyingStructuredCloneWriteCallback(JSContext* aCx, nsresult GetAddInfoCallback(JSContext* aCx, void* aClosure) { static const JSStructuredCloneCallbacks kStructuredCloneCallbacks = { - nullptr /* read */, - StructuredCloneWriteCallback /* write */, - StructuredCloneErrorCallback /* reportError */, - nullptr /* readTransfer */, - nullptr /* writeTransfer */, - nullptr /* freeTransfer */, - nullptr /* canTransfer */, - nullptr /* sabCloned */ + nullptr /* read */, StructuredCloneWriteCallback /* write */, + nullptr /* reportError */, nullptr /* readTransfer */, + nullptr /* writeTransfer */, nullptr /* freeTransfer */, + nullptr /* canTransfer */, nullptr /* sabCloned */ }; MOZ_ASSERT(aCx); @@ -565,7 +555,7 @@ bool IDBObjectStore::DeserializeValue( static const JSStructuredCloneCallbacks callbacks = { StructuredCloneReadCallback, nullptr, - StructuredCloneErrorCallback, + nullptr, nullptr, nullptr, nullptr, @@ -1761,7 +1751,7 @@ bool IDBObjectStore::ValueWrapper::Clone(JSContext* aCx) { static const JSStructuredCloneCallbacks callbacks = { CopyingStructuredCloneReadCallback /* read */, CopyingStructuredCloneWriteCallback /* write */, - StructuredCloneErrorCallback /* reportError */, + nullptr /* reportError */, nullptr /* readTransfer */, nullptr /* writeTransfer */, nullptr /* freeTransfer */, diff --git a/testing/web-platform/meta/IndexedDB/serialize-sharedarraybuffer-throws.https.html.ini b/testing/web-platform/meta/IndexedDB/serialize-sharedarraybuffer-throws.https.html.ini index 9a058c09d966..bcfac5ac85dc 100644 --- a/testing/web-platform/meta/IndexedDB/serialize-sharedarraybuffer-throws.https.html.ini +++ b/testing/web-platform/meta/IndexedDB/serialize-sharedarraybuffer-throws.https.html.ini @@ -2,3 +2,5 @@ expected: if (os == "android") and not debug: [OK, TIMEOUT] if (os == "android") and debug: [OK, TIMEOUT] + [IndexedDB: Attempting to serialize a SharedArrayBuffer should throw] + expected: FAIL diff --git a/testing/web-platform/tests/IndexedDB/serialize-sharedarraybuffer-throws.https.html b/testing/web-platform/tests/IndexedDB/serialize-sharedarraybuffer-throws.https.html index 03a71a78d25c..613ddfe99d81 100644 --- a/testing/web-platform/tests/IndexedDB/serialize-sharedarraybuffer-throws.https.html +++ b/testing/web-platform/tests/IndexedDB/serialize-sharedarraybuffer-throws.https.html @@ -13,7 +13,7 @@ let open_rq = createdb(t); open_rq.onupgradeneeded = function(e) { let db = e.target.result; - let objStore = db.createObjectStore("test", { autoIncrement: false }); + let objStore = db.createObjectStore("test", { keyPath:"pKey" }); let sab = new SharedArrayBuffer(256);