mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1199843 - Part 3: Strongly type JS::TraceChildren; r=jonco r=mccr8
This commit is contained in:
parent
c50ed22fdf
commit
e6825e10a2
@ -338,13 +338,13 @@ JS_CallHashSetObjectTracer(JSTracer* trc, HashSetEnum& e, JSObject* const& key,
|
||||
extern JS_PUBLIC_API(void)
|
||||
JS_CallTenuredObjectTracer(JSTracer* trc, JS::TenuredHeap<JSObject*>* objp, const char* name);
|
||||
|
||||
extern JS_PUBLIC_API(void)
|
||||
JS_TraceChildren(JSTracer* trc, void* thing, JS::TraceKind kind);
|
||||
|
||||
extern JS_PUBLIC_API(void)
|
||||
JS_TraceRuntime(JSTracer* trc);
|
||||
|
||||
namespace JS {
|
||||
extern JS_PUBLIC_API(void)
|
||||
TraceChildren(JSTracer* trc, GCCellPtr thing);
|
||||
|
||||
typedef js::HashSet<Zone*, js::DefaultHasher<Zone*>, js::SystemAllocPolicy> ZoneSet;
|
||||
} // namespace JS
|
||||
|
||||
|
@ -176,9 +176,9 @@ JS_CallTenuredObjectTracer(JSTracer* trc, JS::TenuredHeap<JSObject*>* objp, cons
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(void)
|
||||
JS_TraceChildren(JSTracer* trc, void* thing, JS::TraceKind kind)
|
||||
JS::TraceChildren(JSTracer* trc, GCCellPtr thing)
|
||||
{
|
||||
js::TraceChildren(trc, thing, kind);
|
||||
js::TraceChildren(trc, thing.asCell(), thing.kind());
|
||||
}
|
||||
|
||||
struct TraceChildrenFunctor {
|
||||
|
@ -372,7 +372,7 @@ CreateGlobalObject(JSContext* cx, const JSClass* clasp, nsIPrincipal* principal,
|
||||
if (!((const js::Class*)clasp)->ext.isWrappedNative)
|
||||
{
|
||||
VerifyTraceProtoAndIfaceCacheCalledTracer trc(JS_GetRuntime(cx));
|
||||
JS_TraceChildren(&trc, global, JS::TraceKind::Object);
|
||||
TraceChildren(&trc, GCCellPtr(global.get()));
|
||||
MOZ_ASSERT(trc.ok, "Trace hook on global needs to call TraceXPCGlobal for XPConnect compartments.");
|
||||
}
|
||||
#endif
|
||||
|
@ -148,7 +148,7 @@ NoteWeakMapChildrenTracer::onChild(const JS::GCCellPtr& aThing)
|
||||
mCb.NoteWeakMapping(mMap, mKey, mKeyDelegate, aThing);
|
||||
mTracedAny = true;
|
||||
} else {
|
||||
JS_TraceChildren(this, aThing.asCell(), aThing.kind());
|
||||
JS::TraceChildren(this, aThing);
|
||||
}
|
||||
}
|
||||
|
||||
@ -203,7 +203,7 @@ NoteWeakMapsTracer::trace(JSObject* aMap, JS::GCCellPtr aKey,
|
||||
mChildTracer.mKeyDelegate = kdelegate;
|
||||
|
||||
if (aValue.is<JSString>()) {
|
||||
JS_TraceChildren(&mChildTracer, aValue.asCell(), aValue.kind());
|
||||
JS::TraceChildren(&mChildTracer, aValue);
|
||||
}
|
||||
|
||||
// The delegate could hold alive the key, so report something to the CC
|
||||
@ -360,7 +360,7 @@ TraversalTracer::onChild(const JS::GCCellPtr& aThing)
|
||||
// be traced.
|
||||
JS_TraceObjectGroupCycleCollectorChildren(this, aThing);
|
||||
} else if (!aThing.is<JSString>()) {
|
||||
JS_TraceChildren(this, aThing.asCell(), aThing.kind());
|
||||
JS::TraceChildren(this, aThing);
|
||||
}
|
||||
}
|
||||
|
||||
@ -542,7 +542,7 @@ CycleCollectedJSRuntime::NoteGCThingJSChildren(JS::GCCellPtr aThing,
|
||||
{
|
||||
MOZ_ASSERT(mJSRuntime);
|
||||
TraversalTracer trc(mJSRuntime, aCb);
|
||||
JS_TraceChildren(&trc, aThing.asCell(), aThing.kind());
|
||||
JS::TraceChildren(&trc, aThing);
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user