diff options
author | Gaming4JC <g4jc@hyperbola.info> | 2019-06-08 19:05:28 -0400 |
---|---|---|
committer | Gaming4JC <g4jc@hyperbola.info> | 2019-07-18 22:38:22 -0400 |
commit | c2b1e70b763660da2a41a826b4049360090ff373 (patch) | |
tree | 81de2c5d99d5ad4be3c1e619d1e9d5ff061e6d9e | |
parent | 739a81958035410ddd9b230354a56c909cc5c816 (diff) | |
download | UXP-c2b1e70b763660da2a41a826b4049360090ff373.tar UXP-c2b1e70b763660da2a41a826b4049360090ff373.tar.gz UXP-c2b1e70b763660da2a41a826b4049360090ff373.tar.lz UXP-c2b1e70b763660da2a41a826b4049360090ff373.tar.xz UXP-c2b1e70b763660da2a41a826b4049360090ff373.zip |
1320408 - Part 3: Remove JSContext* parameter from JSFunction::getBoundFunctionArgument.
-rw-r--r-- | js/src/jsfun.cpp | 6 | ||||
-rw-r--r-- | js/src/jsfun.h | 2 | ||||
-rw-r--r-- | js/src/vm/Debugger.cpp | 2 |
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; } |