From 0e550f2fb90ada0b608bc1e1982b100291651806 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Wed, 2 May 2018 11:07:35 -0700 Subject: Refactor structured clone JSAPI to prevent mismatched scopes. Roll-up of bugs 1442722, 1455071, 1433642, 1456604 and 1458320. --- dom/ipc/StructuredCloneData.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dom/ipc/StructuredCloneData.cpp') 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; } -- cgit v1.2.3