[gjs/gnome-3-26] object: Revert problematic commits



commit 50e19ac6faeefd1b5fd2c8e1ea9be085120f9a80
Author: Philip Chimento <philip chimento gmail com>
Date:   Sat Jan 27 14:33:25 2018 -0800

    object: Revert problematic commits
    
    This effectively reverts commits 0b3d6bb4, 50503ff2 and 05810c9a. It was
    an optional suggestion from me on the original patchset, that I thought
    would let the JS wrappers for finalized objects get garbage-collected
    sooner. But it's obviously not working as intended, so let's drop it.
    
    Closes #33.

 gi/object.cpp | 6 ------
 1 file changed, 6 deletions(-)
---
diff --git a/gi/object.cpp b/gi/object.cpp
index b6d6557..ae5bb33 100644
--- a/gi/object.cpp
+++ b/gi/object.cpp
@@ -973,12 +973,6 @@ wrapped_gobj_dispose_notify(gpointer      data,
     auto *priv = static_cast<ObjectInstance *>(data);
 
     priv->g_object_finalized = true;
-
-    if (priv->keep_alive.rooted()) {
-        priv->keep_alive.reset();
-        dissociate_list_remove(priv);
-    }
-
     weak_pointer_list.erase(priv);
 #if DEBUG_DISPOSE
     gjs_debug(GJS_DEBUG_GOBJECT, "Wrapped GObject %p disposed", where_the_object_was);


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