forked from mirrors/gecko-dev
Bug 1467022 - Add comment about the script field to JSFunction::hasScript, and refer JSFunction::hasUncompletedScript. r=jandem DONTBUILD, comment-only
This commit is contained in:
parent
0d90f33cca
commit
13ebe80af7
1 changed files with 8 additions and 0 deletions
|
|
@ -262,6 +262,14 @@ class JSFunction : public js::NativeObject
|
|||
}
|
||||
bool isLambda() const { return flags() & LAMBDA; }
|
||||
bool isInterpretedLazy() const { return flags() & INTERPRETED_LAZY; }
|
||||
|
||||
// This method doesn't check the non-nullness of u.scripted.s.script_,
|
||||
// because it's guaranteed to be non-null when this has INTERPRETED flag,
|
||||
// for live JSFunctions.
|
||||
//
|
||||
// When this JSFunction instance is reached via GC iteration, the above
|
||||
// doesn't hold, and hasUncompletedScript should also be checked.
|
||||
// (see the comment above hasUncompletedScript for more details).
|
||||
bool hasScript() const { return flags() & INTERPRETED; }
|
||||
|
||||
bool infallibleIsDefaultClassConstructor(JSContext* cx) const;
|
||||
|
|
|
|||
Loading…
Reference in a new issue