[gjs: 3/11] object: Add clarifying comment



commit c2a35bdb1e51355b341a51b7b52888b034252aca
Author: Philip Chimento <philip chimento gmail com>
Date:   Tue Oct 22 22:30:45 2019 -0700

    object: Add clarifying comment
    
    I would have found it useful to be reminded of this while recently
    fixing a bug.

 gi/object.cpp | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/gi/object.cpp b/gi/object.cpp
index e23fceae..87c572e3 100644
--- a/gi/object.cpp
+++ b/gi/object.cpp
@@ -1411,6 +1411,8 @@ void ObjectBase::invalidate_all_closures(void) {
     }
 }
 
+// Note: m_wrapper (the JS object) may already be null when this is called, if
+// it was finalized while the GObject was toggled down.
 void
 ObjectInstance::disassociate_js_gobject(void)
 {


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