[gjs: 3/22] object: Use the term "DISPOSED" for objects in such state, not FINALIZED




commit b22497a768bdc71ecc7d4fb8971453a65df522d1
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date:   Wed Mar 24 07:17:20 2021 +0100

    object: Use the term "DISPOSED" for objects in such state, not FINALIZED
    
    As they're still objects, but in disposed state

 gi/object.cpp                                      | 6 +++---
 installed-tests/js/testGObjectDestructionAccess.js | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/gi/object.cpp b/gi/object.cpp
index f42fb0c8..45ce94bd 100644
--- a/gi/object.cpp
+++ b/gi/object.cpp
@@ -2235,11 +2235,11 @@ bool ObjectBase::to_string(JSContext* cx, unsigned argc, JS::Value* vp) {
 /*
  * ObjectInstance::to_string_kind:
  *
- * ObjectInstance shows a "finalized" marker in its toString() method if the
- * wrapped GObject has already been finalized.
+ * ObjectInstance shows a "disposed" marker in its toString() method if the
+ * wrapped GObject has already been disposed.
  */
 const char* ObjectInstance::to_string_kind(void) const {
-    return m_gobj_disposed ? "object (FINALIZED)" : "object";
+    return m_gobj_disposed ? "object (DISPOSED)" : "object";
 }
 
 /*
diff --git a/installed-tests/js/testGObjectDestructionAccess.js 
b/installed-tests/js/testGObjectDestructionAccess.js
index 0b35d859..2391aacb 100644
--- a/installed-tests/js/testGObjectDestructionAccess.js
+++ b/installed-tests/js/testGObjectDestructionAccess.js
@@ -126,7 +126,7 @@ describe('Access to destroyed GObject', function () {
 
     it('Proto function toString', function () {
         expect(destroyedWindow.toString()).toMatch(
-            /\[object \(FINALIZED\) instance wrapper GIName:Gtk.Window jsobj@0x[a-f0-9]+ 
native@0x[a-f0-9]+\]/);
+            /\[object \(DISPOSED\) instance wrapper GIName:Gtk.Window jsobj@0x[a-f0-9]+ 
native@0x[a-f0-9]+\]/);
     });
 
     it('Proto function toString before/after', function () {
@@ -138,6 +138,6 @@ describe('Access to destroyed GObject', function () {
         validWindow.destroy();
 
         expect(validWindow.toString()).toMatch(
-            /\[object \(FINALIZED\) instance wrapper GIName:Gtk.Window jsobj@0x[a-f0-9]+ 
native@0x[a-f0-9]+\]/);
+            /\[object \(DISPOSED\) instance wrapper GIName:Gtk.Window jsobj@0x[a-f0-9]+ 
native@0x[a-f0-9]+\]/);
     });
 });


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