[gjs/wip/ptomato/mozjs45prep: 4/26] enumeration: Remove call to JS_SetParent()



commit 848cbb4b61b89d0dd4ca6530dd1c68d9398c420d
Author: Philip Chimento <philip chimento gmail com>
Date:   Sun Mar 19 07:34:35 2017 +0000

    enumeration: Remove call to JS_SetParent()
    
    It was only necessary when objects were constructed with
    JS_ConstructObject(), but we use JS_NewObject() now which already sets
    the parent of the object to be the global object. In addition,
    JS_SetParent() will be removed in SpiderMonkey 45.

 gi/enumeration.cpp |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
---
diff --git a/gi/enumeration.cpp b/gi/enumeration.cpp
index 9d0eeb4..5f5e2f9 100644
--- a/gi/enumeration.cpp
+++ b/gi/enumeration.cpp
@@ -172,10 +172,6 @@ gjs_define_enumeration(JSContext       *context,
                 enum_name);
     }
 
-    /* https://bugzilla.mozilla.org/show_bug.cgi?id=599651 means we
-     * can't just pass in the global as the parent */
-    JS_SetParent(context, enum_obj, global);
-
     if (!gjs_define_enum_values(context, enum_obj, info))
         return false;
     gjs_define_enum_static_methods (context, enum_obj, info);


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