From 58ac75dfe287c0d818196860ab1179c8ab5e608e Mon Sep 17 00:00:00 2001 From: Ed Morley Date: Wed, 20 Nov 2013 16:37:55 +0000 Subject: [PATCH] Backed out changeset 17ca97e65aa5 (bug 940727) --- dom/bindings/DOMJSProxyHandler.cpp | 5 +---- js/xpconnect/src/XPCJSRuntime.cpp | 14 -------------- js/xpconnect/src/xpcprivate.h | 3 --- 3 files changed, 1 insertion(+), 21 deletions(-) diff --git a/dom/bindings/DOMJSProxyHandler.cpp b/dom/bindings/DOMJSProxyHandler.cpp index ca4189f069d..edcf55a9b58 100644 --- a/dom/bindings/DOMJSProxyHandler.cpp +++ b/dom/bindings/DOMJSProxyHandler.cpp @@ -80,10 +80,7 @@ DOMProxyHandler::GetAndClearExpandoObject(JSObject* obj) if (v.isObject()) { js::SetProxyExtra(obj, JSPROXYSLOT_EXPANDO, UndefinedValue()); - XPCWrappedNativeScope* scope = xpc::MaybeGetObjectScope(obj); - if (scope) { - scope->RemoveDOMExpandoObject(obj); - } + xpc::GetObjectScope(obj)->RemoveDOMExpandoObject(obj); } else { js::ExpandoAndGeneration* expandoAndGeneration = static_cast(v.toPrivate()); diff --git a/js/xpconnect/src/XPCJSRuntime.cpp b/js/xpconnect/src/XPCJSRuntime.cpp index 2070d185e60..5513a149f49 100644 --- a/js/xpconnect/src/XPCJSRuntime.cpp +++ b/js/xpconnect/src/XPCJSRuntime.cpp @@ -384,20 +384,6 @@ EnsureCompartmentPrivate(JSCompartment *c) return priv; } -XPCWrappedNativeScope* -MaybeGetObjectScope(JSObject *obj) -{ - MOZ_ASSERT(obj); - JSCompartment *compartment = js::GetObjectCompartment(obj); - - MOZ_ASSERT(compartment); - CompartmentPrivate *priv = GetCompartmentPrivate(compartment); - if (!priv) - return nullptr; - - return priv->scope; -} - static bool PrincipalImmuneToScriptPolicy(nsIPrincipal* aPrincipal) { diff --git a/js/xpconnect/src/xpcprivate.h b/js/xpconnect/src/xpcprivate.h index d0cc03c42b2..4985bc16ac5 100644 --- a/js/xpconnect/src/xpcprivate.h +++ b/js/xpconnect/src/xpcprivate.h @@ -3786,9 +3786,6 @@ GetObjectScope(JSObject *obj) return EnsureCompartmentPrivate(obj)->scope; } -// This returns null if a scope doesn't already exist. -XPCWrappedNativeScope* MaybeGetObjectScope(JSObject *obj); - extern bool gDebugMode; extern bool gDesiredDebugMode;