[gjs/wip/ptomato/mozjs45prep: 5/23] enumeration: Remove call to JS_SetParent()



commit d149138d3d84a615bd392286dd05a5b6d3cc2434
Author: Philip Chimento <philip endlessm 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]