Bug 1136906 part 1. Stop passing parents to JS_NewObject in ctypes code. r=waldo
authorBoris Zbarsky <bzbarsky@mit.edu>
Thu, 26 Feb 2015 09:40:08 -0500
changeset 230987 1b6971da39285fc56b2534d23ec6896b95949809
parent 230986 fb067573f99d2ebbe152f2f04f7df4f1edd3a8f2
child 230988 d06271a6af45c5567714a6715cf46ad0aeb890c2
push id56143
push userbzbarsky@mozilla.com
push dateThu, 26 Feb 2015 14:48:47 +0000
treeherdermozilla-inbound@4c63198808db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswaldo
bugs1136906
milestone39.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1136906 part 1. Stop passing parents to JS_NewObject in ctypes code. r=waldo
js/src/ctypes/CTypes.cpp
--- a/js/src/ctypes/CTypes.cpp
+++ b/js/src/ctypes/CTypes.cpp
@@ -960,17 +960,17 @@ InitCDataClass(JSContext* cx, HandleObje
 
   // Set up ctypes.CData.__proto__ === ctypes.CType.prototype.
   // (Note that 'ctypes.CData instanceof Function' is still true, thanks to the
   // prototype chain.)
   if (!JS_SetPrototype(cx, ctor, CTypeProto))
     return nullptr;
 
   // Set up ctypes.CData.prototype.
-  RootedObject prototype(cx, JS_NewObject(cx, &sCDataProtoClass, parent));
+  RootedObject prototype(cx, JS_NewObject(cx, &sCDataProtoClass));
   if (!prototype)
     return nullptr;
 
   if (!JS_DefineProperty(cx, ctor, "prototype", prototype,
                          JSPROP_ENUMERATE | JSPROP_READONLY | JSPROP_PERMANENT))
     return nullptr;
 
   if (!JS_DefineProperty(cx, prototype, "constructor", ctor,
@@ -1385,17 +1385,17 @@ JS_InitCTypesClass(JSContext* cx, Handle
       !JS_DefineProperties(cx, ctypes, sModuleProps))
     return false;
 
   // Set up ctypes.CDataFinalizer.prototype.
   RootedObject ctor(cx);
   if (!GetObjectProperty(cx, ctypes, "CDataFinalizer", &ctor))
     return false;
 
-  RootedObject prototype(cx, JS_NewObject(cx, &sCDataFinalizerProtoClass, ctypes));
+  RootedObject prototype(cx, JS_NewObject(cx, &sCDataFinalizerProtoClass));
   if (!prototype)
     return false;
 
   if (!JS_DefineFunctions(cx, prototype, sCDataFinalizerFunctions))
     return false;
 
   if (!JS_DefineProperty(cx, ctor, "prototype", prototype,
                          JSPROP_ENUMERATE | JSPROP_READONLY | JSPROP_PERMANENT))