зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1602878 - Remove BaseScript::hasEnclosingScope(). r=mgaudet
This accessor was only meaningful for lazy scripts so we should remove it. Various accessors will internally check for this and external consumers shouldn't use this to make decisions. Depends on D56726 Differential Revision: https://phabricator.services.mozilla.com/D56787 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
2a0f80e609
Коммит
960d051bc8
|
@ -133,8 +133,6 @@ static JSScript* DelazifyScript(JSContext* cx, Handle<LazyScript*> lazyScript) {
|
|||
|
||||
// JSFunction::getOrCreateScript requires the enclosing script not to be
|
||||
// lazified.
|
||||
MOZ_ASSERT(lazyScript->hasEnclosingLazyScript() ||
|
||||
lazyScript->hasEnclosingScope());
|
||||
if (lazyScript->hasEnclosingLazyScript()) {
|
||||
Rooted<LazyScript*> enclosingLazyScript(cx,
|
||||
lazyScript->enclosingLazyScript());
|
||||
|
|
|
@ -98,8 +98,6 @@ static void TraverseInnerLazyScriptsForLazyScript(
|
|||
}
|
||||
|
||||
LazyScript* lazyScript = fun->lazyScript();
|
||||
MOZ_ASSERT(lazyScript->hasEnclosingScope() ||
|
||||
lazyScript->hasEnclosingLazyScript());
|
||||
MOZ_ASSERT_IF(lazyScript->hasEnclosingLazyScript(),
|
||||
lazyScript->enclosingLazyScript() == enclosingLazyScript);
|
||||
|
||||
|
|
|
@ -5702,7 +5702,6 @@ LazyScript* LazyScript::CreateForXDR(
|
|||
// LazyScript::enclosingScriptHasEverBeenCompiled relies on the enclosing
|
||||
// scope being non-null if we have ever been nested inside non-lazy
|
||||
// function.
|
||||
MOZ_ASSERT(!lazy->hasEnclosingScope());
|
||||
if (enclosingScope) {
|
||||
lazy->setEnclosingScope(enclosingScope);
|
||||
}
|
||||
|
|
|
@ -2104,7 +2104,6 @@ setterLevel: \
|
|||
}
|
||||
void setEnclosingLazyScript(LazyScript* enclosingLazyScript);
|
||||
|
||||
bool hasEnclosingScope() const { return warmUpData_.isEnclosingScope(); }
|
||||
Scope* enclosingScope() const {
|
||||
MOZ_ASSERT(!warmUpData_.isEnclosingScript(),
|
||||
"Enclosing scope is not computed yet");
|
||||
|
@ -3424,7 +3423,7 @@ class LazyScript : public BaseScript {
|
|||
// The enclosing JSScript can be GCed later if the enclosing scope is not
|
||||
// FunctionScope or ModuleScope.
|
||||
bool enclosingScriptHasEverBeenCompiled() const {
|
||||
return hasEnclosingScope();
|
||||
return warmUpData_.isEnclosingScope();
|
||||
}
|
||||
|
||||
friend class GCMarker;
|
||||
|
|
Загрузка…
Ссылка в новой задаче