[gjs/wip/ptomato/mozjs45prep: 1/5] closure: Remove pointer to runtime



commit 866f2475d364ae156db09e838a6fba97c1cf2995
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! Noticed because JSRuntime is going away in
    SpiderMonkey 52.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=781429

 gi/closure.cpp |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
---
diff --git a/gi/closure.cpp b/gi/closure.cpp
index e65a980..e3ef0ba 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;
 };
@@ -92,7 +91,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.
@@ -131,7 +129,6 @@ closure_clear_idle(void *data)
 
     closure->priv.obj.reset();
     closure->priv.context = nullptr;
-    closure->priv.runtime = nullptr;
 
     g_closure_unref(static_cast<GClosure *>(data));
     return G_SOURCE_REMOVE;
@@ -307,7 +304,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]