[gjs: 1/3] object: Bypass read barrier in jsobj_addr()



commit bca9e57a28182a375068b181d5d5c9a994dd0ffa
Author: Philip Chimento <philip chimento gmail com>
Date:   Tue Feb 4 15:22:37 2020 +0100

    object: Bypass read barrier in jsobj_addr()
    
    jsobj_addr() is for debug-only printing, so bypass the read barrier in
    GjsMaybeOwned when fetching the address. This is okay because the only
    thing that is done with the return value of jsobj_addr() is to print it.
    
    Closes: #301

 gi/object.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gi/object.cpp b/gi/object.cpp
index 3b1e87a7..5f88df4b 100644
--- a/gi/object.cpp
+++ b/gi/object.cpp
@@ -177,7 +177,7 @@ void ObjectInstance::unlink(void) {
 const JSObject* ObjectBase::jsobj_addr(void) const {
     if (is_prototype())
         return nullptr;
-    return to_instance()->wrapper();
+    return to_instance()->m_wrapper.debug_addr();
 }
 
 // Overrides GIWrapperBase::typecheck(). We only override the overload that


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