summaryrefslogtreecommitdiff
path: root/js/src/jsfun.h
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2019-12-01 13:34:22 -0500
committerGaming4JC <g4jc@hyperbola.info>2019-12-17 06:25:23 -0500
commit9163aaebb670bd87e6ef71beaf24999c926217eb (patch)
tree48bc403ef6b3349b749b0c38c1e94818b0734274 /js/src/jsfun.h
parent1fd726c6b04faacbb49c525ec733d9419ab65a84 (diff)
downloaduxp-9163aaebb670bd87e6ef71beaf24999c926217eb.tar.gz
Bug 1343481 - Part 1: Remove {JSFunction,JSScript,LazyScript}.isGenerator() method.
Tag #1287
Diffstat (limited to 'js/src/jsfun.h')
-rw-r--r--js/src/jsfun.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/js/src/jsfun.h b/js/src/jsfun.h
index 234169507d..9aee719e4f 100644
--- a/js/src/jsfun.h
+++ b/js/src/jsfun.h
@@ -146,7 +146,9 @@ class JSFunction : public js::NativeObject
MOZ_ASSERT_IF(nonLazyScript()->funHasExtensibleScope() ||
nonLazyScript()->needsHomeObject() ||
nonLazyScript()->isDerivedClassConstructor() ||
- isGenerator(),
+ isStarGenerator() ||
+ isLegacyGenerator() ||
+ isAsync(),
nonLazyScript()->bodyScope()->hasEnvironment());
return nonLazyScript()->bodyScope()->hasEnvironment();
@@ -501,8 +503,6 @@ class JSFunction : public js::NativeObject
return js::NotGenerator;
}
- bool isGenerator() const { return generatorKind() != js::NotGenerator; }
-
bool isLegacyGenerator() const { return generatorKind() == js::LegacyGenerator; }
bool isStarGenerator() const { return generatorKind() == js::StarGenerator; }
@@ -513,9 +513,9 @@ class JSFunction : public js::NativeObject
bool isAsync() const {
if (isInterpretedLazy())
- return lazyScript()->asyncKind() == js::AsyncFunction;
+ return lazyScript()->isAsync();
if (hasScript())
- return nonLazyScript()->asyncKind() == js::AsyncFunction;
+ return nonLazyScript()->isAsync();
return false;
}