Bug 1597152 - Part 1: Set lazy function position after reading tree. r=Yoric
Differential Revision: https://phabricator.services.mozilla.com/D53368
This commit is contained in:
@@ -137,6 +137,8 @@ JS::Result<ParseNode*> BinASTParserPerTokenizer<Tok>::parseAux(
|
||||
const auto topContext = RootContext();
|
||||
MOZ_TRY_VAR(result, asFinalParser()->parseProgram(topContext));
|
||||
|
||||
MOZ_TRY(tokenizer_->readTreeFooter());
|
||||
|
||||
mozilla::Maybe<GlobalScope::Data*> bindings =
|
||||
NewGlobalScopeData(cx_, varScope, alloc_, pc_);
|
||||
if (MOZ_UNLIKELY(!bindings)) {
|
||||
@@ -376,6 +378,8 @@ JS::Result<Ok> BinASTParserPerTokenizer<Tok>::finishLazyFunction(
|
||||
MOZ_ASSERT(lazy->isBinAST());
|
||||
funbox->initLazyScript(lazy);
|
||||
|
||||
MOZ_TRY(tokenizer_->registerLazyScript(lazy));
|
||||
|
||||
return Ok();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user