[gjs] context: Compile Lie with lazy source flag



commit 79aa10c3e7f0aa22234a3eac10b3c23f8fc7f6b2
Author: Philip Chimento <philip chimento gmail com>
Date:   Sat Dec 17 21:37:55 2016 -0800

    context: Compile Lie with lazy source flag
    
    This flag prevents SpiderMonkey from caching the compiled script.
    Apparently it causes an assertion failure in js::GlobalWorkerThreadState
    on some machines when shutting down JS if the script is cached; perhaps
    because we free the source code string here.
    
    (Unreviewed, but this makes tests pass again on my other machine.)
    
    https://bugzilla.gnome.org/show_bug.cgi?id=608450

 gjs/context.cpp |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/gjs/context.cpp b/gjs/context.cpp
index 68cb811..f75f742 100644
--- a/gjs/context.cpp
+++ b/gjs/context.cpp
@@ -297,6 +297,7 @@ gjs_define_promise_object(JSContext       *cx,
                                                                       &lie_length));
     JS::CompileOptions options(cx);
     options.setUTF8(true)
+        .setSourceIsLazy(true)
         .setFile("<Promise>");
 
     JS::RootedValue promise(cx);


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