mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 23:38:38 +09:00
Refactor structured clone JSAPI to prevent mismatched scopes.
Roll-up of bugs 1442722, 1455071, 1433642, 1456604 and 1458320.
This commit is contained in:
parent
1b173ad9e4
commit
0795e50d87
15 changed files with 447 additions and 311 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue