Bug 1434308 - IndexedDB must use DifferentProcess scope in StructuredClone, r=sfink

This commit is contained in:
Andrea Marchesini 2018-01-30 21:33:19 +01:00
Родитель ef3c58e0e6
Коммит 68f4120a93
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -74,7 +74,7 @@ struct IDBObjectStore::StructuredCloneWriteInfo
uint64_t mOffsetToKeyProp;
explicit StructuredCloneWriteInfo(IDBDatabase* aDatabase)
: mCloneBuffer(JS::StructuredCloneScope::SameProcessSameThread, nullptr,
: mCloneBuffer(JS::StructuredCloneScope::DifferentProcess, nullptr,
nullptr)
, mDatabase(aDatabase)
, mOffsetToKeyProp(0)
@ -1330,7 +1330,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::DifferentProcess,
aValue, &callbacks, &aCloneReadInfo)) {
return false;
}
@ -1502,7 +1502,7 @@ private:
if (!JS_ReadStructuredClone(aCx, mCloneReadInfo.mData,
JS_STRUCTURED_CLONE_VERSION,
JS::StructuredCloneScope::SameProcessSameThread,
JS::StructuredCloneScope::DifferentProcess,
aValue, &callbacks, &mCloneReadInfo)) {
return NS_ERROR_DOM_DATA_CLONE_ERR;
}
@ -1615,7 +1615,7 @@ private:
if (!JS_ReadStructuredClone(aCx, mCloneReadInfo.mData,
JS_STRUCTURED_CLONE_VERSION,
JS::StructuredCloneScope::SameProcessSameThread,
JS::StructuredCloneScope::DifferentProcess,
aValue, &callbacks, &mCloneReadInfo)) {
return NS_ERROR_DOM_DATA_CLONE_ERR;
}