Bug 1553482 - Use BinASTInterfaceAndField in Context;r=arai

Depends on D32295

Differential Revision: https://phabricator.services.mozilla.com/D32395
This commit is contained in:
David Teller
2019-05-24 18:48:57 +00:00
parent 4e57b7b654
commit 3568baf9cd
8 changed files with 624 additions and 320 deletions

View File

@@ -133,7 +133,7 @@ JS::Result<ParseNode*> BinASTParserPerTokenizer<Tok>::parseAux(
MOZ_TRY(tokenizer_->readHeader());
ParseNode* result(nullptr);
const Context topContext(Context::topLevel());
const Context topContext((RootContext()));
MOZ_TRY_VAR(result, asFinalParser()->parseProgram(topContext));
mozilla::Maybe<GlobalScope::Data*> bindings =
@@ -196,7 +196,7 @@ JS::Result<FunctionNode*> BinASTParserPerTokenizer<Tok>::parseLazyFunction(
// Inject a toplevel context (i.e. no parent) to parse the lazy content.
// In the future, we may move this to a more specific context.
const Context context(Context::topLevel());
const Context context((RootContext()));
MOZ_TRY(
(asFinalParser()->*parseFunc)(func->nargs(), &params, &tmpBody, context));