[gjs/gnome-3-28] Fix up GJS_DISABLE_JIT flag now the JIT is enabled by default in spidermonkey (https://bugzilla.mozi



commit 3fbc78be25ead1dd10099ad86485255de25fba02
Author: Christopher Wheeldon <cdwheeldon gmail com>
Date:   Fri Jun 8 10:30:58 2018 +0100

    Fix up GJS_DISABLE_JIT flag now the JIT is enabled by default in spidermonkey 
(https://bugzilla.mozilla.org/show_bug.cgi?id=1160311)

 gjs/engine.cpp | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/gjs/engine.cpp b/gjs/engine.cpp
index 67911eef..720267d9 100644
--- a/gjs/engine.cpp
+++ b/gjs/engine.cpp
@@ -308,13 +308,14 @@ gjs_create_js_context(GjsContext *js_context)
         JS::ContextOptionsRef(cx).setExtraWarnings(true);
     }
 
-    if (!g_getenv("GJS_DISABLE_JIT")) {
+    bool enable_jit = !(g_getenv("GJS_DISABLE_JIT"));
+    if (enable_jit) {
         gjs_debug(GJS_DEBUG_CONTEXT, "Enabling JIT");
-        JS::ContextOptionsRef(cx)
-            .setIon(true)
-            .setBaseline(true)
-            .setAsmJS(true);
     }
+    JS::ContextOptionsRef(cx)
+        .setIon(enable_jit)
+        .setBaseline(enable_jit)
+        .setAsmJS(enable_jit);
 
     return cx;
 }


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