[gjs/wip/ptomato/mozjs31: 16/26] js: Remove deprecated JS_GetGlobalForScopeChain



commit 471f53a2326d1b15d5216c72344bd963b19a34bf
Author: Philip Chimento <philip endlessm com>
Date:   Thu Oct 27 13:26:42 2016 -0700

    js: Remove deprecated JS_GetGlobalForScopeChain
    
    This was renamed to JS::CurrentGlobalOrNull in mozjs31.

 gjs/jsapi-util-error.cpp |    2 +-
 gjs/stack.cpp            |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gjs/jsapi-util-error.cpp b/gjs/jsapi-util-error.cpp
index 6b21bb3..005f81c 100644
--- a/gjs/jsapi-util-error.cpp
+++ b/gjs/jsapi-util-error.cpp
@@ -75,7 +75,7 @@ gjs_throw_valist(JSContext       *context,
     }
 
     JS::RootedObject constructor(context);
-    JS::RootedObject global(context, JS_GetGlobalForScopeChain(context));
+    JS::RootedObject global(context, JS::CurrentGlobalOrNull(context));
     JS::RootedValue v_constructor(context), v_message(context), new_exc(context);
     result = false;
 
diff --git a/gjs/stack.cpp b/gjs/stack.cpp
index 089ff35..c99201f 100644
--- a/gjs/stack.cpp
+++ b/gjs/stack.cpp
@@ -54,7 +54,7 @@ gjs_context_get_frame_info(JSContext                              *context,
                            mozilla::Maybe<JS::MutableHandleValue>& lineNumber)
 {
     JSAutoRequest ar(context);
-    JS::RootedObject global(context, JS_GetGlobalForScopeChain(context)),
+    JS::RootedObject global(context, JS::CurrentGlobalOrNull(context)),
         constructor(context);
     JSAutoCompartment ac(context, global);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]