From af31466131718875e82882d92bab09a1f4ba4ae4 Mon Sep 17 00:00:00 2001 From: Jan de Mooij Date: Thu, 2 Aug 2018 09:15:41 +0200 Subject: [PATCH] Bug 1479712 part 2 - Remove unused nsIXPConnect.getWrappedNativePrototype. r=bholley --- js/xpconnect/idl/nsIXPConnect.idl | 5 ----- js/xpconnect/src/nsXPConnect.cpp | 30 ------------------------------ 2 files changed, 35 deletions(-) diff --git a/js/xpconnect/idl/nsIXPConnect.idl b/js/xpconnect/idl/nsIXPConnect.idl index 5a8f5d92251f..a175fa41e9de 100644 --- a/js/xpconnect/idl/nsIXPConnect.idl +++ b/js/xpconnect/idl/nsIXPConnect.idl @@ -328,11 +328,6 @@ interface nsIXPConnect : nsISupports // Methods added since mozilla 0.6.... - JSObjectPtr - getWrappedNativePrototype(in JSContextPtr aJSContext, - in JSObjectPtr aScope, - in nsIClassInfo aClassInfo); - jsval variantToJS(in JSContextPtr ctx, in JSObjectPtr scope, in nsIVariant value); nsIVariant JSToVariant(in JSContextPtr ctx, in jsval value); diff --git a/js/xpconnect/src/nsXPConnect.cpp b/js/xpconnect/src/nsXPConnect.cpp index c5561f685a1f..83e100bf20bb 100644 --- a/js/xpconnect/src/nsXPConnect.cpp +++ b/js/xpconnect/src/nsXPConnect.cpp @@ -801,36 +801,6 @@ nsXPConnect::EvalInSandboxObject(const nsAString& source, const char* filename, return EvalInSandbox(cx, sandbox, source, filenameStr, 1, rval); } -NS_IMETHODIMP -nsXPConnect::GetWrappedNativePrototype(JSContext* aJSContext, - JSObject* aScopeArg, - nsIClassInfo* aClassInfo, - JSObject** aRetVal) -{ - RootedObject aScope(aJSContext, aScopeArg); - JSAutoRealmAllowCCW ar(aJSContext, aScope); - - XPCWrappedNativeScope* scope = ObjectScope(aScope); - if (!scope) - return UnexpectedFailure(NS_ERROR_FAILURE); - - nsCOMPtr scrProto = - XPCWrappedNative::GatherProtoScriptable(aClassInfo); - - AutoMarkingWrappedNativeProtoPtr proto(aJSContext); - proto = XPCWrappedNativeProto::GetNewOrUsed(scope, aClassInfo, scrProto); - if (!proto) - return UnexpectedFailure(NS_ERROR_FAILURE); - - JSObject* protoObj = proto->GetJSProtoObject(); - if (!protoObj) - return UnexpectedFailure(NS_ERROR_FAILURE); - - *aRetVal = protoObj; - - return NS_OK; -} - NS_IMETHODIMP nsXPConnect::DebugDump(int16_t depth) {