Bug 795300 - Remove xpc_GetGlobalForObject; r=bholley
authorMs2ger <ms2ger@gmail.com>
Tue, 02 Oct 2012 10:24:11 +0200
changeset 108927 d58921e3d755fb56871c094412c7c6a5bd87dcc5
parent 108926 c499b6216b7264aee71565f134e078aaf5c15358
child 108928 9598fc30867529ca71116c30c937afee79b45aa4
push id82
push usershu@rfrn.org
push dateFri, 05 Oct 2012 13:20:22 +0000
reviewersbholley
bugs795300
milestone18.0a1
Bug 795300 - Remove xpc_GetGlobalForObject; r=bholley
js/xpconnect/src/xpcpublic.h
--- a/js/xpconnect/src/xpcpublic.h
+++ b/js/xpconnect/src/xpcpublic.h
@@ -98,24 +98,16 @@ static inline bool IS_WN_WRAPPER(JSObjec
 {
     return IS_WRAPPER_CLASS(js::GetObjectClass(obj)) && IS_WN_WRAPPER_OBJECT(obj);
 }
 static inline bool IS_SLIM_WRAPPER(JSObject *obj)
 {
     return IS_WRAPPER_CLASS(js::GetObjectClass(obj)) && IS_SLIM_WRAPPER_OBJECT(obj);
 }
 
-inline JSObject *
-xpc_GetGlobalForObject(JSObject *obj)
-{
-    while (JSObject *parent = js::GetObjectParent(obj))
-        obj = parent;
-    return obj;
-}
-
 extern bool
 xpc_OkToHandOutWrapper(nsWrapperCache *cache);
 
 inline JSObject*
 xpc_FastGetCachedWrapper(nsWrapperCache *cache, JSObject *scope, jsval *vp)
 {
     if (cache) {
         JSObject* wrapper = cache->GetWrapper();