Bug 994159 - Fix typo in OOM check in DefineMetaTypeDescr. r=nmatsakis.
authorJason Orendorff <jorendorff@mozilla.com>
Fri, 25 Apr 2014 11:50:33 -0500
changeset 198823 ac3d60d50ccd112fb7407c2229c086634d5a0b0c
parent 198822 0eb5fefd5ca84ce7185bddbf847197acc6f062ee
child 198824 0436eec4d294f73a424e931945a27fe38cd3e028
push id3624
push userasasaki@mozilla.com
push dateMon, 09 Jun 2014 21:49:01 +0000
treeherdermozilla-beta@b1a5da15899a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnmatsakis
bugs994159
milestone31.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 994159 - Fix typo in OOM check in DefineMetaTypeDescr. r=nmatsakis.
js/src/builtin/TypedObject.cpp
--- a/js/src/builtin/TypedObject.cpp
+++ b/js/src/builtin/TypedObject.cpp
@@ -1295,17 +1295,17 @@ DefineMetaTypeDescr(JSContext *cx,
     // Create ctor.prototype.prototype, which inherits from Object.__proto__
 
     RootedObject objProto(cx, global->getOrCreateObjectPrototype(cx));
     if (!objProto)
         return nullptr;
     RootedObject protoProto(cx);
     protoProto = NewObjectWithProto<JSObject>(cx, objProto,
                                               global, SingletonObject);
-    if (!proto)
+    if (!protoProto)
         return nullptr;
 
     RootedValue protoProtoValue(cx, ObjectValue(*protoProto));
     if (!JSObject::defineProperty(cx, proto, cx->names().prototype,
                                   protoProtoValue,
                                   nullptr, nullptr,
                                   JSPROP_READONLY | JSPROP_PERMANENT))
         return nullptr;