[gjs/wip/ptomato/mozjs38: 26/28] js: Fix misc APIs for mozjs38



commit af0fb8ee981321343b0a4b51e6b483e0b23eb2c7
Author: Philip Chimento <philip chimento gmail com>
Date:   Fri Jan 20 23:12:43 2017 -0800

    js: Fix misc APIs for mozjs38
    
    This commit adapts to a few miscellaneous API changes in mozjs38 that
    don't fit anywhere else.

 gjs/jsapi-util.cpp |    5 ++---
 gjs/runtime.cpp    |    2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/gjs/jsapi-util.cpp b/gjs/jsapi-util.cpp
index 7a6110b..853263d 100644
--- a/gjs/jsapi-util.cpp
+++ b/gjs/jsapi-util.cpp
@@ -89,9 +89,8 @@ gjs_init_context_standard (JSContext              *context,
      *
      * setExtraWarnings: Report warnings to error reporter function.
      */
-    JS::ContextOptionsRef(context)
-        .setDontReportUncaught(true)
-        .setExtraWarnings(extra_warnings);
+    JS::ContextOptionsRef(context).setDontReportUncaught(true);
+    JS::RuntimeOptionsRef(context).setExtraWarnings(extra_warnings);
 
     if (!g_getenv("GJS_DISABLE_JIT")) {
         gjs_debug(GJS_DEBUG_CONTEXT, "Enabling JIT");
diff --git a/gjs/runtime.cpp b/gjs/runtime.cpp
index 5ddf4b0..902fcd9 100644
--- a/gjs/runtime.cpp
+++ b/gjs/runtime.cpp
@@ -256,7 +256,7 @@ gjs_runtime_for_current_thread(void)
 
     if (!runtime) {
         g_assert(gjs_is_inited);
-        runtime = JS_NewRuntime(32*1024*1024 /* max bytes */, JS_USE_HELPER_THREADS);
+        runtime = JS_NewRuntime(32 * 1024 * 1024 /* max bytes */);
         if (runtime == NULL)
             g_error("Failed to create javascript runtime");
 


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