diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-05-02 11:07:35 -0700 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-06-07 08:52:09 +0200 |
commit | 0e550f2fb90ada0b608bc1e1982b100291651806 (patch) | |
tree | 04820ea1ba44b247afe55a0f3454b347675916bb /dom/indexedDB/IDBObjectStore.cpp | |
parent | 835749ed6d411f006fe9d90ba7479233dcfe8ec7 (diff) | |
download | UXP-0e550f2fb90ada0b608bc1e1982b100291651806.tar UXP-0e550f2fb90ada0b608bc1e1982b100291651806.tar.gz UXP-0e550f2fb90ada0b608bc1e1982b100291651806.tar.lz UXP-0e550f2fb90ada0b608bc1e1982b100291651806.tar.xz UXP-0e550f2fb90ada0b608bc1e1982b100291651806.zip |
Refactor structured clone JSAPI to prevent mismatched scopes.
Roll-up of bugs 1442722, 1455071, 1433642, 1456604 and 1458320.
Diffstat (limited to 'dom/indexedDB/IDBObjectStore.cpp')
-rw-r--r-- | dom/indexedDB/IDBObjectStore.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/dom/indexedDB/IDBObjectStore.cpp b/dom/indexedDB/IDBObjectStore.cpp index a6d6c5f06..8a0b292ad 100644 --- a/dom/indexedDB/IDBObjectStore.cpp +++ b/dom/indexedDB/IDBObjectStore.cpp @@ -67,7 +67,7 @@ struct IDBObjectStore::StructuredCloneWriteInfo uint64_t mOffsetToKeyProp; explicit StructuredCloneWriteInfo(IDBDatabase* aDatabase) - : mCloneBuffer(JS::StructuredCloneScope::SameProcessSameThread, nullptr, + : mCloneBuffer(JS::StructuredCloneScope::DifferentProcessForIndexedDB, nullptr, nullptr) , mDatabase(aDatabase) , mOffsetToKeyProp(0) @@ -1216,7 +1216,7 @@ IDBObjectStore::DeserializeValue(JSContext* aCx, // FIXME: Consider to use StructuredCloneHolder here and in other // deserializing methods. if (!JS_ReadStructuredClone(aCx, aCloneReadInfo.mData, JS_STRUCTURED_CLONE_VERSION, - JS::StructuredCloneScope::SameProcessSameThread, + JS::StructuredCloneScope::DifferentProcessForIndexedDB, aValue, &callbacks, &aCloneReadInfo)) { return false; } @@ -1249,7 +1249,7 @@ IDBObjectStore::DeserializeIndexValue(JSContext* aCx, }; if (!JS_ReadStructuredClone(aCx, aCloneReadInfo.mData, JS_STRUCTURED_CLONE_VERSION, - JS::StructuredCloneScope::SameProcessSameThread, + JS::StructuredCloneScope::DifferentProcessForIndexedDB, aValue, &callbacks, &aCloneReadInfo)) { return false; } @@ -1285,7 +1285,7 @@ IDBObjectStore::DeserializeUpgradeValue(JSContext* aCx, }; if (!JS_ReadStructuredClone(aCx, aCloneReadInfo.mData, JS_STRUCTURED_CLONE_VERSION, - JS::StructuredCloneScope::SameProcessSameThread, + JS::StructuredCloneScope::DifferentProcessForIndexedDB, aValue, &callbacks, &aCloneReadInfo)) { return false; } |