From 2b5983ce96cacdcbba00306e1d0e5796d79a18cb Mon Sep 17 00:00:00 2001 From: Brian Hackett Date: Wed, 9 Nov 2011 10:34:54 -0800 Subject: [PATCH] Replace uses of GetObjectGlobal with JS_GetGlobalForObject, no bug. --- js/xpconnect/src/dombindings.cpp | 2 +- js/xpconnect/wrappers/XrayWrapper.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/js/xpconnect/src/dombindings.cpp b/js/xpconnect/src/dombindings.cpp index ecc9674ebb22..9f3ca62b1d08 100644 --- a/js/xpconnect/src/dombindings.cpp +++ b/js/xpconnect/src/dombindings.cpp @@ -479,7 +479,7 @@ ListBase::create(JSContext *cx, XPCWrappedNativeScope *scope, ListType *aLis return NULL; JSAutoEnterCompartment ac; - if (js::GetObjectGlobal(parent) != scope->GetGlobalJSObject()) { + if (JS_GetGlobalForObject(cx, parent) != scope->GetGlobalJSObject()) { if (!ac.enter(cx, parent)) return NULL; diff --git a/js/xpconnect/wrappers/XrayWrapper.cpp b/js/xpconnect/wrappers/XrayWrapper.cpp index 44c27b95660d..e0fc021a348c 100644 --- a/js/xpconnect/wrappers/XrayWrapper.cpp +++ b/js/xpconnect/wrappers/XrayWrapper.cpp @@ -1089,7 +1089,8 @@ GetHolderObject(JSContext *cx, JSObject *wrapper, bool createHolder = true) if (!js::GetProxyExtra(wrapper, 0).isUndefined()) return &js::GetProxyExtra(wrapper, 0).toObject(); - JSObject *obj = JS_NewObjectWithGivenProto(cx, nsnull, nsnull, js::GetObjectGlobal(wrapper)); + JSObject *obj = JS_NewObjectWithGivenProto(cx, nsnull, nsnull, + JS_GetGlobalForObject(cx, wrapper)); if (!obj) return nsnull; js::SetProxyExtra(wrapper, 0, ObjectValue(*obj));