1320408 - Part 3: Remove JSContext* parameter from JSFunction::getBoundFunctionArgument.

This commit is contained in:
Gaming4JC 2019-06-08 19:05:28 -04:00 committed by Roy Tam
commit ed78b21cf0
3 changed files with 4 additions and 6 deletions

View file

@ -1325,13 +1325,11 @@ GetBoundFunctionArguments(const JSFunction* boundFun)
}
const js::Value&
JSFunction::getBoundFunctionArgument(JSContext* cx, unsigned which) const
JSFunction::getBoundFunctionArgument(unsigned which) const
{
MOZ_ASSERT(which < getBoundFunctionArgumentCount());
RootedArrayObject boundArgs(cx, GetBoundFunctionArguments(this));
RootedValue res(cx);
return boundArgs->getDenseElement(which);
return GetBoundFunctionArguments(this)->getDenseElement(which);
}
size_t

View file

@ -591,7 +591,7 @@ class JSFunction : public js::NativeObject
JSObject* getBoundFunctionTarget() const;
const js::Value& getBoundFunctionThis() const;
const js::Value& getBoundFunctionArgument(JSContext* cx, unsigned which) const;
const js::Value& getBoundFunctionArgument(unsigned which) const;
size_t getBoundFunctionArgumentCount() const;
private:

View file

@ -9611,7 +9611,7 @@ DebuggerObject::getBoundArguments(JSContext* cx, HandleDebuggerObject object,
if (!result.resize(length))
return false;
for (size_t i = 0; i < length; i++) {
result[i].set(referent->getBoundFunctionArgument(cx, i));
result[i].set(referent->getBoundFunctionArgument(i));
if (!dbg->wrapDebuggeeValue(cx, result[i]))
return false;
}