summaryrefslogtreecommitdiffstats
path: root/dom/ipc/StructuredCloneData.cpp
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-05-02 11:07:35 -0700
committerwolfbeast <mcwerewolf@gmail.com>2018-06-07 08:52:09 +0200
commit0e550f2fb90ada0b608bc1e1982b100291651806 (patch)
tree04820ea1ba44b247afe55a0f3454b347675916bb /dom/ipc/StructuredCloneData.cpp
parent835749ed6d411f006fe9d90ba7479233dcfe8ec7 (diff)
downloadUXP-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/ipc/StructuredCloneData.cpp')
-rw-r--r--dom/ipc/StructuredCloneData.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/dom/ipc/StructuredCloneData.cpp b/dom/ipc/StructuredCloneData.cpp
index 98f56904f..2c1fff2ac 100644
--- a/dom/ipc/StructuredCloneData.cpp
+++ b/dom/ipc/StructuredCloneData.cpp
@@ -88,7 +88,7 @@ StructuredCloneData::Write(JSContext* aCx,
return;
}
- JSStructuredCloneData data;
+ JSStructuredCloneData data(mBuffer->scope());
mBuffer->abandon();
mBuffer->steal(&data);
mBuffer = nullptr;
@@ -107,7 +107,7 @@ StructuredCloneData::ReadIPCParams(const IPC::Message* aMsg,
PickleIterator* aIter)
{
MOZ_ASSERT(!mInitialized);
- JSStructuredCloneData data;
+ JSStructuredCloneData data(JS::StructuredCloneScope::DifferentProcess);
if (!ReadParam(aMsg, aIter, &data)) {
return false;
}