Bug 783989 - Return false after reporting error. r=ejpbruel

This commit is contained in:
Bobby Holley 2012-08-20 14:04:26 -07:00
parent 9dd734f9d1
commit 5d53d2e91b
2 changed files with 3 additions and 0 deletions

View File

@ -0,0 +1,2 @@
// |jit-test| error: Error
wrapWithProto(0);

View File

@ -3410,6 +3410,7 @@ WrapWithProto(JSContext *cx, unsigned argc, jsval *vp)
if (!obj.isObject() || !proto.isObjectOrNull()) {
JS_ReportErrorNumber(cx, my_GetErrorMessage, NULL, JSSMSG_INVALID_ARGS,
"wrapWithProto");
return false;
}
JSObject *wrapped = Wrapper::New(cx, &obj.toObject(), proto.toObjectOrNull(),