summaryrefslogtreecommitdiff
path: root/js/src/shell
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2019-12-13 21:29:23 -0500
committerGaming4JC <g4jc@hyperbola.info>2019-12-17 06:25:27 -0500
commitd5086ac3aa308bb1ef177834366eeaf7b39bb17e (patch)
tree9b2c84158cf996b388bcb191130a5062fd7d6992 /js/src/shell
parent82f9efff935a4ac4379bdfddddc84aae84fc869e (diff)
downloaduxp-d5086ac3aa308bb1ef177834366eeaf7b39bb17e.tar.gz
Bug 1331092 - Part 2: Implement Async Generator except yield*.
Tag #1287
Diffstat (limited to 'js/src/shell')
-rw-r--r--js/src/shell/js.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/js/src/shell/js.cpp b/js/src/shell/js.cpp
index 51cd11fe83..33f7d6bdcc 100644
--- a/js/src/shell/js.cpp
+++ b/js/src/shell/js.cpp
@@ -85,6 +85,7 @@
#include "threading/Thread.h"
#include "vm/ArgumentsObject.h"
#include "vm/AsyncFunction.h"
+#include "vm/AsyncIteration.h"
#include "vm/Compression.h"
#include "vm/Debugger.h"
#include "vm/HelperThreads.h"
@@ -2304,6 +2305,8 @@ ValueToScript(JSContext* cx, HandleValue v, JSFunction** funp = nullptr)
// Get unwrapped async function.
if (IsWrappedAsyncFunction(fun))
fun = GetUnwrappedAsyncFunction(fun);
+ if (IsWrappedAsyncGenerator(fun))
+ fun = GetUnwrappedAsyncGenerator(fun);
if (!fun->isInterpreted()) {
JS_ReportErrorNumberASCII(cx, my_GetErrorMessage, nullptr, JSSMSG_SCRIPTS_ONLY);