[gjs/mozjs31: 4/7] js: Remove deprecated JS_GetGlobalForScopeChain



commit ed9088ec0442d127c1b48eacd62e6b0e946d4215
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.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=751252

 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 dc4182b..bea2694 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), new_exc(context);
     JS::AutoValueArray<1> error_args(context);
     result = false;
diff --git a/gjs/stack.cpp b/gjs/stack.cpp
index 8ccf301..7dba9b1 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]