From 75bb849fa3cec0d814c0756485fae59377209ef6 Mon Sep 17 00:00:00 2001 From: Andrew McCreight Date: Wed, 20 Sep 2017 10:26:16 -0700 Subject: [PATCH] Bug 958643, part 5 - Eliminate XPCJSObjectHolder. r=krizsa It is now unused. MozReview-Commit-ID: AzXW6qHdSOW --HG-- extra : rebase_source : f60697cff778843c36a1e75f3e4f8779bc356d40 --- js/xpconnect/src/XPCForwards.h | 1 - js/xpconnect/src/XPCWrappedNative.cpp | 15 --------------- js/xpconnect/src/xpcprivate.h | 20 -------------------- 3 files changed, 36 deletions(-) diff --git a/js/xpconnect/src/XPCForwards.h b/js/xpconnect/src/XPCForwards.h index 24f49803dd2f..7062098616c1 100644 --- a/js/xpconnect/src/XPCForwards.h +++ b/js/xpconnect/src/XPCForwards.h @@ -31,7 +31,6 @@ class XPCWrappedNativeProto; class XPCWrappedNativeTearOff; class XPCTraceableVariant; -class XPCJSObjectHolder; class JSObject2WrappedJSMap; class Native2WrappedNativeMap; diff --git a/js/xpconnect/src/XPCWrappedNative.cpp b/js/xpconnect/src/XPCWrappedNative.cpp index ea3e1486c659..114bce70038f 100644 --- a/js/xpconnect/src/XPCWrappedNative.cpp +++ b/js/xpconnect/src/XPCWrappedNative.cpp @@ -2228,18 +2228,3 @@ static void DEBUG_CheckClassInfoClaims(XPCWrappedNative* wrapper) } } #endif - -NS_IMPL_ISUPPORTS(XPCJSObjectHolder, nsIXPConnectJSObjectHolder) - -JSObject* -XPCJSObjectHolder::GetJSObject() -{ - NS_PRECONDITION(mJSObj, "bad object state"); - return mJSObj; -} - -XPCJSObjectHolder::XPCJSObjectHolder(JSContext* cx, JSObject* obj) - : mJSObj(cx, obj) -{ - MOZ_ASSERT(obj); -} diff --git a/js/xpconnect/src/xpcprivate.h b/js/xpconnect/src/xpcprivate.h index 45d471a8b2fb..df180bf37fd4 100644 --- a/js/xpconnect/src/xpcprivate.h +++ b/js/xpconnect/src/xpcprivate.h @@ -2034,26 +2034,6 @@ private: nsCOMPtr mOuter; // only set in root }; -/***************************************************************************/ - -class XPCJSObjectHolder final : public nsIXPConnectJSObjectHolder -{ -public: - // all the interface method declarations... - NS_DECL_ISUPPORTS - NS_DECL_NSIXPCONNECTJSOBJECTHOLDER - - // non-interface implementation - -public: - XPCJSObjectHolder(JSContext* cx, JSObject* obj); - -private: - virtual ~XPCJSObjectHolder() {} - XPCJSObjectHolder() = delete; - - JS::PersistentRooted mJSObj; -}; /*************************************************************************** ****************************************************************************