[gjs/wip/ptomato/mozjs31: 13/23] js: Remove deprecated JS_GetGlobalForScopeChain



commit 2677ef03e093d3a6989dfce0ca7b85e260108951
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 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]