Bug 1569315 - Sink prototype fetching into AllocNewFunction r=tcampbell

GetFunctionPrototype already returns null for 'normal' functions. Eventually
the real %FunctionPrototype% is provided based on the class proto key.

Differential Revision: https://phabricator.services.mozilla.com/D39770
This commit is contained in:
Matthew Gaudet
2019-07-31 19:30:27 +00:00
parent b711ad8e20
commit 3e710f0359
3 changed files with 12 additions and 13 deletions

View File

@@ -263,7 +263,7 @@ JS::Result<FunctionBox*> BinASTParserPerTokenizer<Tok>::buildFunctionBox(
RootedFunction fun(cx_);
BINJS_TRY_VAR(fun, !pc_ ? lazyScript_->functionNonDelazifying()
: AllocNewFunction(cx_, atom, syntax, generatorKind,
functionAsyncKind, nullptr));
functionAsyncKind));
MOZ_ASSERT_IF(pc_, fun->explicitName() == atom);
mozilla::Maybe<Directives> directives;