mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-01 22:07:41 +00:00
Bug 650161 - Don't trace contents of wrapped native scope in wrapped native proto's trace hook, just the scope's global r=billm
This commit is contained in:
parent
03377550a4
commit
90c9dbbc91
@ -1065,9 +1065,12 @@ public:
|
||||
static void
|
||||
TraceWrappedNativesInAllScopes(JSTracer* trc, XPCJSRuntime* rt);
|
||||
|
||||
void TraceInside(JSTracer *trc) {
|
||||
void TraceSelf(JSTracer *trc) {
|
||||
MOZ_ASSERT(mGlobalJSObject);
|
||||
mGlobalJSObject.trace(trc, "XPCWrappedNativeScope::mGlobalJSObject");
|
||||
}
|
||||
|
||||
void TraceInside(JSTracer *trc) {
|
||||
if (mContentXBLScope)
|
||||
mContentXBLScope.trace(trc, "XPCWrappedNativeScope::mXBLScope");
|
||||
for (size_t i = 0; i < mAddonScopes.Length(); i++)
|
||||
@ -1847,7 +1850,7 @@ public:
|
||||
mScriptableInfo->Mark();
|
||||
}
|
||||
|
||||
GetScope()->TraceInside(trc);
|
||||
GetScope()->TraceSelf(trc);
|
||||
}
|
||||
|
||||
void TraceJS(JSTracer *trc) {
|
||||
@ -2162,7 +2165,7 @@ public:
|
||||
if (HasProto())
|
||||
GetProto()->TraceSelf(trc);
|
||||
else
|
||||
GetScope()->TraceInside(trc);
|
||||
GetScope()->TraceSelf(trc);
|
||||
if (mFlatJSObject && JS_IsGlobalObject(mFlatJSObject))
|
||||
{
|
||||
xpc::TraceXPCGlobal(trc, mFlatJSObject);
|
||||
|
Loading…
x
Reference in New Issue
Block a user