Bug 852421 - Remove MarkTypeObjectUnknownProperties call from Object.create. r=bhackett
authorJan de Mooij <jdemooij@mozilla.com>
Tue, 16 Jul 2013 21:34:02 +0200
changeset 138746 0960402d8145e0442bf08d5bb8d19cd09d75227b
parent 138745 eb9dcbb4b46d860fbabb775bbd54b54584bcf120
child 138747 71233da022ea5543353c61470022983a705c9d54
push idunknown
push userunknown
push dateunknown
reviewersbhackett
bugs852421
milestone25.0a1
Bug 852421 - Remove MarkTypeObjectUnknownProperties call from Object.create. r=bhackett
js/src/builtin/Object.cpp
--- a/js/src/builtin/Object.cpp
+++ b/js/src/builtin/Object.cpp
@@ -701,19 +701,16 @@ obj_create(JSContext *cx, unsigned argc,
     /*
      * Use the callee's global as the parent of the new object to avoid dynamic
      * scoping (i.e., using the caller's global).
      */
     RootedObject obj(cx, NewObjectWithGivenProto(cx, &JSObject::class_, proto, &args.callee().global()));
     if (!obj)
         return false;
 
-    /* Don't track types or array-ness for objects created here. */
-    MarkTypeObjectUnknownProperties(cx, obj->type());
-
     /* 15.2.3.5 step 4. */
     if (args.hasDefined(1)) {
         if (args[1].isPrimitive()) {
             JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, JSMSG_NOT_NONNULL_OBJECT);
             return false;
         }
 
         RootedObject props(cx, &args[1].toObject());