Bug 688069 - fix String.prototype.{replace,match,search,split} for transparently wrapped RegExp arguments (r=cdleary)

This commit is contained in:
Luke Wagner
2012-02-01 13:36:48 -08:00
parent cb009b6710
commit 9d9892ebfd
14 changed files with 87 additions and 44 deletions

View File

@@ -3567,9 +3567,7 @@ static JSBool
array_isArray(JSContext *cx, uintN argc, Value *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
bool isArray = args.length() > 0 &&
args[0].isObject() &&
ObjectClassIs(args[0].toObject(), ESClass_Array, cx);
bool isArray = args.length() > 0 && IsObjectWithClass(args[0], ESClass_Array, cx);
args.rval().setBoolean(isArray);
return true;
}