Bug 1604792 - Move parseGoal from Parser to SharedContext. r=mgaudet
Since this flag is preserved on LazyScript, it is useful to track it on SharedContext and initialize it consistently on lazy and non-lazy scripts. This patch removes the plumbing of passing the ParseGoal through the parser class hierarchy. Differential Revision: https://phabricator.services.mozilla.com/D57661
This commit is contained in:
@@ -367,11 +367,11 @@ JS::Result<Ok> BinASTParserPerTokenizer<Tok>::finishLazyFunction(
|
||||
funbox->setArgCount(nargs);
|
||||
funbox->synchronizeArgCount();
|
||||
|
||||
BINJS_TRY_DECL(lazy,
|
||||
LazyScript::Create(
|
||||
cx_, fun, sourceObject_, pc_->closedOverBindingsForLazy(),
|
||||
pc_->innerFunctionBoxesForLazy, start, end, start, end,
|
||||
/* lineno = */ 0, start, ParseGoal::Script));
|
||||
BINJS_TRY_DECL(lazy, LazyScript::Create(cx_, fun, sourceObject_,
|
||||
pc_->closedOverBindingsForLazy(),
|
||||
pc_->innerFunctionBoxesForLazy, start,
|
||||
end, start, end,
|
||||
/* lineno = */ 0, start));
|
||||
|
||||
if (funbox->strict()) {
|
||||
lazy->setStrict();
|
||||
|
||||
Reference in New Issue
Block a user