diff options
author | Gaming4JC <g4jc@hyperbola.info> | 2019-07-14 19:04:34 -0400 |
---|---|---|
committer | Gaming4JC <g4jc@hyperbola.info> | 2019-07-18 22:38:45 -0400 |
commit | 6b39e4dcb3022d97235ae5367d02cfea521228bb (patch) | |
tree | 7e22a358e60b66fd67e838416210d727d83a030d /js/src/jit/VMFunctions.cpp | |
parent | 48f3b1035a64253c390105df883ea95aaa80bb26 (diff) | |
download | uxp-6b39e4dcb3022d97235ae5367d02cfea521228bb.tar.gz |
1344477 - Part 1: Add JSOP_CALL_IGNORES_RV for function call that ignores return value.
Diffstat (limited to 'js/src/jit/VMFunctions.cpp')
-rw-r--r-- | js/src/jit/VMFunctions.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/js/src/jit/VMFunctions.cpp b/js/src/jit/VMFunctions.cpp index 5bcd36ba01..e58c3f570a 100644 --- a/js/src/jit/VMFunctions.cpp +++ b/js/src/jit/VMFunctions.cpp @@ -54,8 +54,8 @@ VMFunction::addToFunctions() } bool -InvokeFunction(JSContext* cx, HandleObject obj, bool constructing, uint32_t argc, Value* argv, - MutableHandleValue rval) +InvokeFunction(JSContext* cx, HandleObject obj, bool constructing, bool ignoresReturnValue, + uint32_t argc, Value* argv, MutableHandleValue rval) { TraceLoggerThread* logger = TraceLoggerForMainThread(cx->runtime()); TraceLogStartEvent(logger, TraceLogger_Call); @@ -104,7 +104,7 @@ InvokeFunction(JSContext* cx, HandleObject obj, bool constructing, uint32_t argc return InternalConstructWithProvidedThis(cx, fval, thisv, cargs, newTarget, rval); } - InvokeArgs args(cx); + InvokeArgsMaybeIgnoresReturnValue args(cx, ignoresReturnValue); if (!args.init(cx, argc)) return false; @@ -120,7 +120,7 @@ InvokeFunctionShuffleNewTarget(JSContext* cx, HandleObject obj, uint32_t numActu { MOZ_ASSERT(numFormalArgs > numActualArgs); argv[1 + numActualArgs] = argv[1 + numFormalArgs]; - return InvokeFunction(cx, obj, true, numActualArgs, argv, rval); + return InvokeFunction(cx, obj, true, false, numActualArgs, argv, rval); } bool |