Fix for bug 804732 (Remove mCachedDOMPrototypes). r=bz.

--HG--
extra : rebase_source : dc9ffe5f37dbc0542cbb47384b2d25472c70d801
This commit is contained in:
Peter Van der Beken 2012-10-23 22:11:58 +02:00
parent 874593342a
commit 09dd1ac571
3 changed files with 0 additions and 29 deletions

View File

@ -384,8 +384,6 @@ XPCWrappedNativeScope::StartFinalizationPhaseOfGC(JSFreeOp *fop, XPCJSRuntime* r
if (cur->mGlobalJSObject &&
JS_IsAboutToBeFinalized(cur->mGlobalJSObject)) {
cur->mGlobalJSObject.finalize(fop->runtime());
if (cur->GetCachedDOMPrototypes().IsInitialized())
cur->GetCachedDOMPrototypes().Clear();
// Move this scope from the live list to the dying list.
if (prev)
prev->mNext = next;
@ -660,22 +658,6 @@ XPCWrappedNativeScope::RemoveWrappedNativeProtos()
GetRuntime()->GetDetachedWrappedNativeProtoMap());
}
static PLDHashOperator
TraceDOMPrototype(const char* aKey, JSObject* aData, void* aClosure)
{
JSTracer *trc = static_cast<JSTracer*>(aClosure);
JS_CALL_OBJECT_TRACER(trc, aData, "DOM prototype");
return PL_DHASH_NEXT;
}
void
XPCWrappedNativeScope::TraceDOMPrototypes(JSTracer *trc)
{
if (mCachedDOMPrototypes.IsInitialized()) {
mCachedDOMPrototypes.EnumerateRead(TraceDOMPrototype, trc);
}
}
/***************************************************************************/
// static

View File

@ -1026,9 +1026,6 @@ TraceXPCGlobal(JSTracer *trc, JSObject *obj)
}
#endif
if (XPCWrappedNativeScope *scope = GetObjectScope(obj))
scope->TraceDOMPrototypes(trc);
if (js::GetObjectClass(obj)->flags & JSCLASS_DOM_GLOBAL)
mozilla::dom::TraceProtoOrIfaceCache(trc, obj);
}

View File

@ -1697,13 +1697,6 @@ public:
XPCContext *GetContext() { return mContext; }
void ClearContext() { mContext = nullptr; }
nsDataHashtable<nsDepCharHashKey, JSObject*>& GetCachedDOMPrototypes()
{
return mCachedDOMPrototypes;
}
void TraceDOMPrototypes(JSTracer *trc);
JSBool ExperimentalBindingsEnabled()
{
return mExperimentalBindingsEnabled;
@ -1755,7 +1748,6 @@ private:
XPCContext* mContext;
nsDataHashtable<nsDepCharHashKey, JSObject*> mCachedDOMPrototypes;
nsAutoPtr<DOMExpandoMap> mDOMExpandoMap;
JSBool mExperimentalBindingsEnabled;