diff options
Diffstat (limited to 'js/src/wasm/AsmJS.cpp')
-rw-r--r-- | js/src/wasm/AsmJS.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/js/src/wasm/AsmJS.cpp b/js/src/wasm/AsmJS.cpp index 52b8eeed1..f3eebb85e 100644 --- a/js/src/wasm/AsmJS.cpp +++ b/js/src/wasm/AsmJS.cpp @@ -8608,9 +8608,12 @@ EstablishPreconditions(ExclusiveContext* cx, AsmJSParser& parser) break; } - if (parser.pc->isGenerator()) + if (parser.pc->isStarGenerator() || parser.pc->isLegacyGenerator()) return Warn(parser, JSMSG_USE_ASM_TYPE_FAIL, "Disabled by generator context"); + if (parser.pc->isAsync()) + return Warn(parser, JSMSG_USE_ASM_TYPE_FAIL, "Disabled by async context"); + if (parser.pc->isArrowFunction()) return Warn(parser, JSMSG_USE_ASM_TYPE_FAIL, "Disabled by arrow function context"); |