diff options
author | Gaming4JC <g4jc@hyperbola.info> | 2019-12-13 20:59:32 -0500 |
---|---|---|
committer | Gaming4JC <g4jc@hyperbola.info> | 2019-12-17 06:25:25 -0500 |
commit | d0d9a4f43dbd58c694c706b17996157fede20bdf (patch) | |
tree | db9e4dce1b1c92b477720f1eba9a9ec04b3f8e2d /js/src/vm/Debugger.cpp | |
parent | 79b5eb14bc5f8495d20147957cda5f4e5fc8186a (diff) | |
download | UXP-d0d9a4f43dbd58c694c706b17996157fede20bdf.tar UXP-d0d9a4f43dbd58c694c706b17996157fede20bdf.tar.gz UXP-d0d9a4f43dbd58c694c706b17996157fede20bdf.tar.lz UXP-d0d9a4f43dbd58c694c706b17996157fede20bdf.tar.xz UXP-d0d9a4f43dbd58c694c706b17996157fede20bdf.zip |
Bug 1316098 - Optimize out result object allocation for await/return in async function.
Tag #1287
Diffstat (limited to 'js/src/vm/Debugger.cpp')
-rw-r--r-- | js/src/vm/Debugger.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/js/src/vm/Debugger.cpp b/js/src/vm/Debugger.cpp index 7c09c50b0..2680699a4 100644 --- a/js/src/vm/Debugger.cpp +++ b/js/src/vm/Debugger.cpp @@ -32,7 +32,6 @@ #include "js/Vector.h" #include "proxy/ScriptedProxyHandler.h" #include "vm/ArgumentsObject.h" -#include "vm/AsyncFunction.h" #include "vm/DebuggerMemory.h" #include "vm/GeneratorObject.h" #include "vm/SPSProfiler.h" @@ -1560,16 +1559,11 @@ CheckResumptionValue(JSContext* cx, AbstractFramePtr frame, const Maybe<HandleVa JSTrapStatus status, MutableHandleValue vp) { if (status == JSTRAP_RETURN && frame && frame.isFunctionFrame()) { - // Don't let a { return: ... } resumption value make a generator or - // async function violate the iterator protocol. The return value from + // Don't let a { return: ... } resumption value make a generator + // function violate the iterator protocol. The return value from // such a frame must have the form { done: <bool>, value: <anything> }. RootedFunction callee(cx, frame.callee()); - if (callee->isAsync()) { - if (!CheckAsyncResumptionValue(cx, vp)) { - JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_DEBUG_BAD_AWAIT); - return false; - } - } else if (callee->isStarGenerator() || callee->isAsync()) { + if (callee->isStarGenerator()) { if (!CheckStarGeneratorResumptionValue(cx, vp)) { JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_DEBUG_BAD_YIELD); return false; |