summaryrefslogtreecommitdiffstats
path: root/js/src/vm
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2019-06-08 18:45:53 -0400
committerGaming4JC <g4jc@hyperbola.info>2019-07-18 22:38:21 -0400
commite5019fd4cf2142b7fe2cbfedaefcea300390393e (patch)
treed1c7aa013442c768b425f058e4a88b10b1418a0c /js/src/vm
parent9476f2e018856139f92e96e8e738bbbab615e67d (diff)
downloadUXP-e5019fd4cf2142b7fe2cbfedaefcea300390393e.tar
UXP-e5019fd4cf2142b7fe2cbfedaefcea300390393e.tar.gz
UXP-e5019fd4cf2142b7fe2cbfedaefcea300390393e.tar.lz
UXP-e5019fd4cf2142b7fe2cbfedaefcea300390393e.tar.xz
UXP-e5019fd4cf2142b7fe2cbfedaefcea300390393e.zip
1320408 - Part 1: Change JSFunction::getLength and JSFunction::getUnresolvedLength to static method.
Diffstat (limited to 'js/src/vm')
-rw-r--r--js/src/vm/AsyncFunction.cpp2
-rw-r--r--js/src/vm/SelfHosting.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/js/src/vm/AsyncFunction.cpp b/js/src/vm/AsyncFunction.cpp
index f50c87114..e14b77424 100644
--- a/js/src/vm/AsyncFunction.cpp
+++ b/js/src/vm/AsyncFunction.cpp
@@ -118,7 +118,7 @@ js::WrapAsyncFunctionWithProto(JSContext* cx, HandleFunction unwrapped, HandleOb
RootedAtom funName(cx, unwrapped->explicitName());
uint16_t length;
- if (!unwrapped->getLength(cx, &length))
+ if (!JSFunction::getLength(cx, unwrapped, &length))
return nullptr;
// Steps 3 (partially).
diff --git a/js/src/vm/SelfHosting.cpp b/js/src/vm/SelfHosting.cpp
index ccd4cc8d7..dfec47cf2 100644
--- a/js/src/vm/SelfHosting.cpp
+++ b/js/src/vm/SelfHosting.cpp
@@ -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);