[gjs] Revert "engine: Free Cairo static data on shutdown"



commit 8510bede1dd1f8a5fb95a2f594b4d3a68289e5ea
Author: Philip Chimento <philip chimento gmail com>
Date:   Sat Apr 14 16:25:58 2018 -0700

    Revert "engine: Free Cairo static data on shutdown"
    
    This reverts commit 575f1e2e077af04a112b9e5eaabaf008b086568e.
    Per https://bugs.freedesktop.org/show_bug.cgi?id=105466, calling
    cairo_debug_reset_static_data() was supposed to be safe in production,
    but actually it fails assertions on program exit, with certain Cairo
    versions, including 1.14.12.
    
    Unreviewed.

 gjs/engine.cpp | 18 ++----------------
 1 file changed, 2 insertions(+), 16 deletions(-)
---
diff --git a/gjs/engine.cpp b/gjs/engine.cpp
index 90fa57cf..67911eef 100644
--- a/gjs/engine.cpp
+++ b/gjs/engine.cpp
@@ -37,10 +37,6 @@
 #include <windows.h>
 #endif
 
-#ifdef ENABLE_CAIRO
-# include <cairo.h>
-#endif
-
 /* Implementations of locale-specific operations; these are used
  * in the implementation of String.localeCompare(), Date.toLocaleDateString(),
  * and so forth. We take the straight-forward approach of converting
@@ -218,16 +214,6 @@ on_promise_unhandled_rejection(JSContext                    *cx,
                                                       std::move(stack));
 }
 
-static void
-shutdown(void)
-{
-    JS_ShutDown();
-
-#ifdef ENABLE_CAIRO
-    cairo_debug_reset_static_data();  /* for valgrind reports */
-#endif
-}
-
 #ifdef G_OS_WIN32
 HMODULE gjs_dll;
 static bool gjs_is_inited = false;
@@ -245,7 +231,7 @@ LPVOID    lpvReserved)
     break;
 
   case DLL_THREAD_DETACH:
-    shutdown();
+    JS_ShutDown ();
     break;
 
   default:
@@ -265,7 +251,7 @@ public:
     }
 
     ~GjsInit() {
-        shutdown();
+        JS_ShutDown();
     }
 
     operator bool() {


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