[gjs/gnome-3-30] engine: mozjs60 changes for GC sweeping tracking



commit d4fe34a2e59fd8592e567c653bebb4da60632ecf
Author: Andrea Azzarone <andrea azzarone canonical com>
Date:   Tue Oct 23 00:44:37 2018 +0100

    engine: mozjs60 changes for GC sweeping tracking
    
    With the switch to mozjs60, the sweeping happens in three phases insted of two:
    JSFINALIZE_GROUP_PREPARE, JSFINALIZE_GROUP_START, and JSFINALIZE_GROUP_END.
    Update the code to keep track of whether the runtime is currently doing GC
    sweeping, and prevent calling JS code at that time.
    
    Fixes: GNOME/gjs#212

 gjs/engine.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gjs/engine.cpp b/gjs/engine.cpp
index a22199b3..2d90981a 100644
--- a/gjs/engine.cpp
+++ b/gjs/engine.cpp
@@ -162,7 +162,7 @@ gjs_finalize_callback(JSFreeOp         *fop,
      code, so we can probably rely on this behavior.
   */
 
-  if (status == JSFINALIZE_GROUP_START)
+  if (status == JSFINALIZE_GROUP_PREPARE)
         _gjs_context_set_sweeping(js_context, true);
   else if (status == JSFINALIZE_GROUP_END)
         _gjs_context_set_sweeping(js_context, false);


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