Bug 1127443 - Don't mark objects created by JS_NewObjectWithGivenProto as having unknown properties.
authorTom Schuster <evilpies@gmail.com>
Sat, 31 Jan 2015 16:18:51 +0100
changeset 226932 5c4b7be30f7d300f8259dd8b7f4a3a3f1180e8a6
parent 226931 cb01144424b5493c90f16733568eb109f3eb2fd0
child 226933 87f2bd784f4151468734471fac6efd91e35bd68e
push id28212
push userphilringnalda@gmail.com
push dateSun, 01 Feb 2015 17:17:22 +0000
treeherdermozilla-central@2ed663b8bc05 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1127443
milestone38.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 1127443 - Don't mark objects created by JS_NewObjectWithGivenProto as having unknown properties.
js/src/jsapi.cpp
--- a/js/src/jsapi.cpp
+++ b/js/src/jsapi.cpp
@@ -2061,20 +2061,17 @@ JS_NewObjectWithGivenProto(JSContext *cx
 
     const Class *clasp = Valueify(jsclasp);
     if (!clasp)
         clasp = &PlainObject::class_;    /* default class is Object */
 
     MOZ_ASSERT(clasp != &JSFunction::class_);
     MOZ_ASSERT(!(clasp->flags & JSCLASS_IS_GLOBAL));
 
-    JSObject *obj = NewObjectWithGivenProto(cx, clasp, proto, parent);
-    if (obj)
-        MarkTypeObjectUnknownProperties(cx, obj->type());
-    return obj;
+    return NewObjectWithGivenProto(cx, clasp, proto, parent);
 }
 
 JS_PUBLIC_API(JSObject *)
 JS_NewPlainObject(JSContext *cx)
 {
     MOZ_ASSERT(!cx->runtime()->isAtomsCompartment(cx->compartment()));
     AssertHeapIsIdle(cx);
     CHECK_REQUEST(cx);