mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-01 13:57:32 +00:00
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
This commit is contained in:
parent
1f0ef48e79
commit
298090b8ae
@ -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<PlainObject>(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
|
||||
|
Loading…
x
Reference in New Issue
Block a user