From 298090b8aeb1bc51027fff0558716016421c6db1 Mon Sep 17 00:00:00 2001 From: Daniel Holbert Date: Wed, 27 May 2015 11:21:31 -0700 Subject: [PATCH] Bug 1140482 followup: Update ResolveInterpretedFunctionPrototype() failure-cases to return false instead of nullptr, now that return type is bool. rs=jorendorff Landing on CLOSED TREE --- js/src/jsfun.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/src/jsfun.cpp b/js/src/jsfun.cpp index 567c2ab50038..0fcbd5391232 100644 --- a/js/src/jsfun.cpp +++ b/js/src/jsfun.cpp @@ -388,12 +388,12 @@ ResolveInterpretedFunctionPrototype(JSContext* cx, HandleFunction fun, HandleId else objProto = fun->global().getOrCreateObjectPrototype(cx); if (!objProto) - return nullptr; + return false; RootedPlainObject proto(cx, NewObjectWithGivenProto(cx, objProto, SingletonObject)); if (!proto) - return nullptr; + return false; // Per ES5 13.2 the prototype's .constructor property is configurable, // non-enumerable, and writable. However, per the 15 July 2013 ES6 draft, @@ -402,7 +402,7 @@ ResolveInterpretedFunctionPrototype(JSContext* cx, HandleFunction fun, HandleId if (!isStarGenerator) { RootedValue objVal(cx, ObjectValue(*fun)); if (!DefineProperty(cx, proto, cx->names().constructor, objVal, nullptr, nullptr, 0)) - return nullptr; + return false; } // Per ES5 15.3.5.2 a user-defined function's .prototype property is