1320408 - Part 1: Change JSFunction::getLength and JSFunction::getUnresolvedLength to static method.

This commit is contained in:
Gaming4JC 2019-06-08 18:45:53 -04:00 committed by Roy Tam
commit 6633322957
4 changed files with 19 additions and 19 deletions

View file

@ -477,7 +477,7 @@ intrinsic_FinishBoundFunctionInit(JSContext* cx, unsigned argc, Value* vp)
// Try to avoid invoking the resolve hook.
if (targetObj->is<JSFunction>() && !targetObj->as<JSFunction>().hasResolvedLength()) {
RootedValue targetLength(cx);
if (!targetObj->as<JSFunction>().getUnresolvedLength(cx, &targetLength))
if (!JSFunction::getUnresolvedLength(cx, targetObj.as<JSFunction>(), &targetLength))
return false;
length = Max(0.0, targetLength.toNumber() - argCount);