mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 15:58:39 +09:00
Bug 1434384 - Mark v1 structured clone data as cross-process. r=jorendorff, a=RyanVM
--HG-- extra : source : d85679eb427513cb18650f3d4e7d37a6ccbefbab extra : intermediate-source : 5c286cc709dfcaca7269b88516e6f71626c98496
This commit is contained in:
parent
30a101ad73
commit
1baa793518
1 changed files with 4 additions and 3 deletions
|
|
@ -2188,12 +2188,14 @@ JSStructuredCloneReader::readHeader()
|
|||
return in.reportTruncated();
|
||||
|
||||
if (tag != SCTAG_HEADER) {
|
||||
// Old structured clone buffer. We must have read it from disk or
|
||||
// somewhere, so we can assume it's scope-compatible.
|
||||
// Old structured clone buffer. We must have read it from disk.
|
||||
storedScope = JS::StructuredCloneScope::DifferentProcess;
|
||||
return true;
|
||||
}
|
||||
|
||||
MOZ_ALWAYS_TRUE(in.readPair(&tag, &data));
|
||||
storedScope = JS::StructuredCloneScope(data);
|
||||
|
||||
if (data != uint32_t(JS::StructuredCloneScope::SameProcessSameThread) &&
|
||||
data != uint32_t(JS::StructuredCloneScope::SameProcessDifferentThread) &&
|
||||
data != uint32_t(JS::StructuredCloneScope::DifferentProcess))
|
||||
|
|
@ -2202,7 +2204,6 @@ JSStructuredCloneReader::readHeader()
|
|||
"invalid structured clone scope");
|
||||
return false;
|
||||
}
|
||||
storedScope = JS::StructuredCloneScope(data);
|
||||
if (storedScope < allowedScope) {
|
||||
JS_ReportErrorNumberASCII(context(), GetErrorMessage, nullptr, JSMSG_SC_BAD_SERIALIZED_DATA,
|
||||
"incompatible structured clone scope");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue