mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
Bug 1099440 - Make JS_TraceIncomingCCWs use MarkObjectUnbarriered instead of calling the tracer itself. r=terrence
This commit is contained in:
parent
c7fdbe75a6
commit
7acd9e57c6
@ -139,13 +139,14 @@ JS_TraceIncomingCCWs(JSTracer *trc, const JS::ZoneSet &zones)
|
||||
// zones multiple times, and don't hold a strong reference.
|
||||
if (key.kind == CrossCompartmentKey::StringWrapper)
|
||||
continue;
|
||||
JSObject *obj = static_cast<JSObject *>(key.wrapped);
|
||||
// Ignore CCWs whose wrapped value doesn't live in our given set
|
||||
// of zones.
|
||||
if (!zones.has(static_cast<JSObject *>(key.wrapped)->zone()))
|
||||
if (!zones.has(obj->zone()))
|
||||
continue;
|
||||
|
||||
void *thing = key.wrapped;
|
||||
trc->callback(trc, &thing, GetGCThingTraceKind(key.wrapped));
|
||||
MarkObjectUnbarriered(trc, &obj, "cross-compartment wrapper");
|
||||
MOZ_ASSERT(obj == key.wrapped);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user