Bug 1245048: Check call to GetPrototype; r=till

This commit is contained in:
Benjamin Bouvier 2016-02-02 11:07:12 +01:00
parent 99d1f70394
commit 0a70d29a1a

View File

@ -365,7 +365,9 @@ intrinsic_FinishBoundFunctionInit(JSContext* cx, unsigned argc, Value* vp)
// 9.4.1.3 BoundFunctionCreate, steps 2-3,8.
RootedObject proto(cx);
GetPrototype(cx, targetObj, &proto);
if (!GetPrototype(cx, targetObj, &proto))
return false;
if (bound->getProto() != proto) {
if (!SetPrototype(cx, bound, proto))
return false;