[gjs/gnome-3-24] closure: Remove pointer to runtime



commit b0013bd7eb620ecff2501bf4ec7527fb4d82c203
Author: Philip Chimento <philip chimento gmail com>
Date:   Tue May 2 20:58:56 2017 -0700

    closure: Remove pointer to runtime
    
    This isn't used at all. Backported from master in order to apply fixes
    for closure invalidation.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=786668
    
    https://bugzilla.gnome.org/show_bug.cgi?id=785657

 gi/closure.cpp |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
---
diff --git a/gi/closure.cpp b/gi/closure.cpp
index b22c8f9..cba62b2 100644
--- a/gi/closure.cpp
+++ b/gi/closure.cpp
@@ -33,7 +33,6 @@
 #include "gjs/mem.h"
 
 struct Closure {
-    JSRuntime *runtime;
     JSContext *context;
     GjsMaybeOwned<JSObject *> obj;
     unsigned idle_clear_id;
@@ -93,7 +92,6 @@ invalidate_js_pointers(GjsClosure *gc)
 
     c->obj.reset();
     c->context = NULL;
-    c->runtime = NULL;
 
     /* Notify any closure reference holders they
      * may want to drop references.
@@ -132,7 +130,6 @@ closure_clear_idle(void *data)
 
     closure->priv.obj.reset();
     closure->priv.context = nullptr;
-    closure->priv.runtime = nullptr;
     closure->priv.idle_clear_id = 0;
 
     g_closure_unref(static_cast<GClosure *>(data));
@@ -315,7 +312,6 @@ gjs_closure_new(JSContext  *context,
     gc = (GjsClosure*) g_closure_new_simple(sizeof(GjsClosure), NULL);
     c = new (&gc->priv) Closure();
 
-    c->runtime = JS_GetRuntime(context);
     /* The saved context is used for lifetime management, so that the closure will
      * be torn down with the context that created it. The context could be attached to
      * the default context of the runtime using if we wanted the closure to survive


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