[gjs/wip/ptomato/mozjs38: 14/20] js: Fix misc APIs for mozjs38



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

 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 4ba6e2e..8a83071 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 a431d12..cc0d704 100644
--- a/gjs/runtime.cpp
+++ b/gjs/runtime.cpp
@@ -296,7 +296,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]