summaryrefslogtreecommitdiffstats
path: root/js/src/frontend/SharedContext.h
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/frontend/SharedContext.h')
-rw-r--r--js/src/frontend/SharedContext.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/js/src/frontend/SharedContext.h b/js/src/frontend/SharedContext.h
index 5766c135a..2d478308e 100644
--- a/js/src/frontend/SharedContext.h
+++ b/js/src/frontend/SharedContext.h
@@ -552,6 +552,10 @@ class FunctionBox : public ObjectBox, public SharedContext
return isStarGenerator() || isLegacyGenerator() || isAsync();
}
+ bool needsIteratorResult() const {
+ return isStarGenerator() || isAsync();
+ }
+
bool isAsync() const { return asyncKind() == AsyncFunction; }
bool isArrow() const { return function()->isArrow(); }