mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-24 16:17:29 +09:00
1320408 - Part 3: Remove JSContext* parameter from JSFunction::getBoundFunctionArgument.
This commit is contained in:
parent
07cd213071
commit
ed78b21cf0
3 changed files with 4 additions and 6 deletions
|
|
@ -1325,13 +1325,11 @@ GetBoundFunctionArguments(const JSFunction* boundFun)
|
||||||
}
|
}
|
||||||
|
|
||||||
const js::Value&
|
const js::Value&
|
||||||
JSFunction::getBoundFunctionArgument(JSContext* cx, unsigned which) const
|
JSFunction::getBoundFunctionArgument(unsigned which) const
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(which < getBoundFunctionArgumentCount());
|
MOZ_ASSERT(which < getBoundFunctionArgumentCount());
|
||||||
|
|
||||||
RootedArrayObject boundArgs(cx, GetBoundFunctionArguments(this));
|
return GetBoundFunctionArguments(this)->getDenseElement(which);
|
||||||
RootedValue res(cx);
|
|
||||||
return boundArgs->getDenseElement(which);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t
|
size_t
|
||||||
|
|
|
||||||
|
|
@ -591,7 +591,7 @@ class JSFunction : public js::NativeObject
|
||||||
|
|
||||||
JSObject* getBoundFunctionTarget() const;
|
JSObject* getBoundFunctionTarget() const;
|
||||||
const js::Value& getBoundFunctionThis() 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;
|
size_t getBoundFunctionArgumentCount() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
||||||
|
|
@ -9611,7 +9611,7 @@ DebuggerObject::getBoundArguments(JSContext* cx, HandleDebuggerObject object,
|
||||||
if (!result.resize(length))
|
if (!result.resize(length))
|
||||||
return false;
|
return false;
|
||||||
for (size_t i = 0; i < length; i++) {
|
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]))
|
if (!dbg->wrapDebuggeeValue(cx, result[i]))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue