mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-10 05:47:04 +00:00
Bug 1365564 - Fix GCMarker::stackContainsCrossZonePointerTo to check all proxies for cross compartment target objects r=sfink
This commit is contained in:
parent
d8e719c8a3
commit
7443a84960
@ -2607,11 +2607,16 @@ GCMarker::stackContainsCrossZonePointerTo(const Cell* target) const
|
||||
if (sourceZone == targetZone)
|
||||
continue;
|
||||
|
||||
if ((IsCrossCompartmentWrapper(source) && source->as<ProxyObject>().target() == target) ||
|
||||
Debugger::isDebuggerCrossCompartmentEdge(source, target))
|
||||
{
|
||||
return sourceZone;
|
||||
// The private slot of proxy objects might contain a cross-compartment
|
||||
// pointer.
|
||||
if (source->is<ProxyObject>()) {
|
||||
Value value = source->as<ProxyObject>().private_();
|
||||
if (value.isObject() && &value.toObject() == target)
|
||||
return sourceZone;
|
||||
}
|
||||
|
||||
if (Debugger::isDebuggerCrossCompartmentEdge(source, target))
|
||||
return sourceZone;
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user