Bug 958643, part 1 - Remove the unused nsXPConnect::WrapNativeHolder. r=krizsa
MozReview-Commit-ID: AOQYLS8FFrf
--- a/js/xpconnect/idl/nsIXPConnect.idl
+++ b/js/xpconnect/idl/nsIXPConnect.idl
@@ -306,25 +306,16 @@ interface nsIXPConnect : nsISupports
*/
JSObjectPtr
wrapNative(in JSContextPtr aJSContext,
in JSObjectPtr aScope,
in nsISupports aCOMObj,
in nsIIDRef aIID);
/**
- * Same as wrapNative, but it returns the JSObject in an nsIXPConnectJSObjectHolder.
- */
- nsIXPConnectJSObjectHolder
- wrapNativeHolder(in JSContextPtr aJSContext,
- in JSObjectPtr aScope,
- in nsISupports aCOMObj,
- in nsIIDRef aIID);
-
- /**
* Same as wrapNative, but it returns the JSObject in aVal. C++ callers
* must ensure that aVal is rooted.
* aIID may be null, it means the same as passing in
* &NS_GET_IID(nsISupports) but when passing in null certain shortcuts
* can be taken because we know without comparing IIDs that the caller is
* asking for an nsISupports wrapper.
* If aAllowWrapper, then the returned value will be wrapped in the proper
* type of security wrapper on top of the XPCWrappedNative (if needed).
--- a/js/xpconnect/src/nsXPConnect.cpp
+++ b/js/xpconnect/src/nsXPConnect.cpp
@@ -646,34 +646,16 @@ nsXPConnect::WrapNative(JSContext * aJSC
if (!v.isObjectOrNull())
return NS_ERROR_FAILURE;
*aRetVal = v.toObjectOrNull();
return NS_OK;
}
NS_IMETHODIMP
-nsXPConnect::WrapNativeHolder(JSContext * aJSContext,
- JSObject * aScopeArg,
- nsISupports* aCOMObj,
- const nsIID & aIID,
- nsIXPConnectJSObjectHolder **aHolder)
-{
- MOZ_ASSERT(aHolder, "bad param");
- MOZ_ASSERT(aJSContext, "bad param");
- MOZ_ASSERT(aScopeArg, "bad param");
- MOZ_ASSERT(aCOMObj, "bad param");
-
- RootedObject aScope(aJSContext, aScopeArg);
- RootedValue v(aJSContext);
- return NativeInterface2JSObject(aScope, aCOMObj, nullptr, &aIID,
- true, &v, aHolder);
-}
-
-NS_IMETHODIMP
nsXPConnect::WrapNativeToJSVal(JSContext* aJSContext,
JSObject* aScopeArg,
nsISupports* aCOMObj,
nsWrapperCache* aCache,
const nsIID* aIID,
bool aAllowWrapping,
MutableHandleValue aVal)
{