diff --git a/js/xpconnect/src/XPCWrappedNativeScope.cpp b/js/xpconnect/src/XPCWrappedNativeScope.cpp index 40fb4201f7..5c395712fe 100644 --- a/js/xpconnect/src/XPCWrappedNativeScope.cpp +++ b/js/xpconnect/src/XPCWrappedNativeScope.cpp @@ -496,22 +496,9 @@ XPCWrappedNativeScope::TraceWrappedNativesInAllScopes(JSTracer* trc, XPCJSContex if (wrapper->HasExternalReference() && !wrapper->IsWrapperExpired()) wrapper->TraceSelf(trc); } - - if (cur->mDOMExpandoSet) { - for (DOMExpandoSet::Enum e(*cur->mDOMExpandoSet); !e.empty(); e.popFront()) - JS::TraceEdge(trc, &e.mutableFront(), "DOM expando object"); - } } } -static void -SuspectDOMExpandos(JSObject* obj, nsCycleCollectionNoteRootCallback& cb) -{ - MOZ_ASSERT(dom::GetDOMClass(obj) && dom::GetDOMClass(obj)->mDOMObjectIsISupports); - nsISupports* native = dom::UnwrapDOMObject(obj); - cb.NoteXPCOMRoot(native); -} - // static void XPCWrappedNativeScope::SuspectAllWrappers(XPCJSContext* cx, @@ -521,11 +508,6 @@ XPCWrappedNativeScope::SuspectAllWrappers(XPCJSContext* cx, for (auto i = cur->mWrappedNativeMap->Iter(); !i.Done(); i.Next()) { static_cast(i.Get())->value->Suspect(cb); } - - if (cur->mDOMExpandoSet) { - for (DOMExpandoSet::Range r = cur->mDOMExpandoSet->all(); !r.empty(); r.popFront()) - SuspectDOMExpandos(r.front().unbarrieredGet(), cb); - } } } diff --git a/js/xpconnect/src/xpcprivate.h b/js/xpconnect/src/xpcprivate.h index 97f5c36fe8..2a773cb4a2 100644 --- a/js/xpconnect/src/xpcprivate.h +++ b/js/xpconnect/src/xpcprivate.h @@ -950,28 +950,6 @@ public: static bool IsDyingScope(XPCWrappedNativeScope* scope); - typedef js::HashSet, - js::MovableCellHasher>, - js::SystemAllocPolicy> DOMExpandoSet; - - bool RegisterDOMExpandoObject(JSObject* expando) { - // Expandos are proxy objects, and proxies are always tenured. - JS::AssertGCThingMustBeTenured(expando); - if (!mDOMExpandoSet) { - mDOMExpandoSet = new DOMExpandoSet(); - if (!mDOMExpandoSet->init(8)) - return false; - } - return mDOMExpandoSet->put(JS::Heap(expando)); - } - void RemoveDOMExpandoObject(JSObject* expando) { - if (mDOMExpandoSet) { - DOMExpandoSet::Ptr p = mDOMExpandoSet->lookup(JS::Heap(expando)); - MOZ_ASSERT(p.found()); - mDOMExpandoSet->remove(p); - } - } - typedef js::HashMap, js::PointerHasher, @@ -1065,8 +1043,6 @@ private: // from this scope if the caller scope has mInterposition set. bool mHasCallInterpositions; - nsAutoPtr mDOMExpandoSet; - JS::WeakMapPtr mXrayExpandos; bool mIsContentXBLScope;