mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 01:05:45 +00:00
Bug 1552316 - Don't rely on functionbox for initFromLazyFunction r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D31536 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
4fc4833da6
commit
32b04894a8
@ -277,7 +277,7 @@ JS::Result<FunctionBox*> BinASTParserPerTokenizer<Tok>::buildFunctionBox(
|
||||
if (pc_) {
|
||||
funbox->initWithEnclosingParseContext(pc_, fun,syntax);
|
||||
} else {
|
||||
funbox->initFromLazyFunction();
|
||||
funbox->initFromLazyFunction(fun);
|
||||
}
|
||||
return funbox;
|
||||
}
|
||||
|
@ -2871,7 +2871,7 @@ FunctionNode* Parser<FullParseHandler, Unit>::standaloneLazyFunction(
|
||||
if (!funbox) {
|
||||
return null();
|
||||
}
|
||||
funbox->initFromLazyFunction();
|
||||
funbox->initFromLazyFunction(fun);
|
||||
|
||||
Directives newDirectives = directives;
|
||||
SourceParseContext funpc(this, funbox, &newDirectives);
|
||||
|
@ -171,8 +171,7 @@ FunctionBox::FunctionBox(JSContext* cx, TraceListNode* traceListHead,
|
||||
MOZ_ASSERT(fun->isTenured());
|
||||
}
|
||||
|
||||
void FunctionBox::initFromLazyFunction() {
|
||||
JSFunction* fun = function();
|
||||
void FunctionBox::initFromLazyFunction(JSFunction* fun) {
|
||||
if (fun->lazyScript()->isDerivedClassConstructor()) {
|
||||
setDerivedClassConstructor();
|
||||
}
|
||||
|
@ -431,7 +431,7 @@ class FunctionBox : public ObjectBox, public SharedContext {
|
||||
&extraVarScopeBindings_);
|
||||
}
|
||||
|
||||
void initFromLazyFunction();
|
||||
void initFromLazyFunction(JSFunction* fun);
|
||||
void initStandaloneFunction(Scope* enclosingScope);
|
||||
void initWithEnclosingParseContext(ParseContext* enclosing, JSFunction* fun,
|
||||
FunctionSyntaxKind kind);
|
||||
|
Loading…
Reference in New Issue
Block a user