Bug 1365564 - Fix GCMarker::stackContainsCrossZonePointerTo to check all proxies for cross compartment target objects r=sfink

This commit is contained in:
Jon Coppeard 2017-05-27 10:52:21 +02:00
parent d8e719c8a3
commit 7443a84960

View File

@ -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;