summaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/src/jsfun.cpp6
-rw-r--r--js/src/jsfun.h2
-rw-r--r--js/src/vm/Debugger.cpp2
3 files changed, 4 insertions, 6 deletions
diff --git a/js/src/jsfun.cpp b/js/src/jsfun.cpp
index 41f935080..f032b822f 100644
--- a/js/src/jsfun.cpp
+++ b/js/src/jsfun.cpp
@@ -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
diff --git a/js/src/jsfun.h b/js/src/jsfun.h
index 781ca6223..f3643f1e6 100644
--- a/js/src/jsfun.h
+++ b/js/src/jsfun.h
@@ -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:
diff --git a/js/src/vm/Debugger.cpp b/js/src/vm/Debugger.cpp
index 988ae413b..5cc054308 100644
--- a/js/src/vm/Debugger.cpp
+++ b/js/src/vm/Debugger.cpp
@@ -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;
}