Bug 1552316 - Use FunctionBox in ASTSerializer::function r=tcampbell
authorMatthew Gaudet <mgaudet@mozilla.com>
Tue, 21 May 2019 13:47:31 +0000
changeset 474745 8e11986fdfd9f78ceb98e9517fc51dff2e687a2b
parent 474744 fb78510f1805cfbbbcb06524429e124ede56e6f3
child 474746 da19f9f642fb4b63bcec2b7c51ca8bf2d2c0508c
push id36046
push useraiakab@mozilla.com
push dateTue, 21 May 2019 21:45:52 +0000
treeherdermozilla-central@257f2c96cef5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstcampbell
bugs1552316
milestone69.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1552316 - Use FunctionBox in ASTSerializer::function r=tcampbell Differential Revision: https://phabricator.services.mozilla.com/D31533
js/src/builtin/ReflectParse.cpp
--- a/js/src/builtin/ReflectParse.cpp
+++ b/js/src/builtin/ReflectParse.cpp
@@ -3320,26 +3320,25 @@ bool ASTSerializer::identifier(NameNode*
 
   RootedAtom pnAtom(cx, id->atom());
   return identifier(pnAtom, &id->pn_pos, dst);
 }
 
 bool ASTSerializer::function(FunctionNode* funNode, ASTType type,
                              MutableHandleValue dst) {
   FunctionBox* funbox = funNode->funbox();
-  RootedFunction func(cx, funbox->function());
 
   GeneratorStyle generatorStyle =
       funbox->isGenerator() ? GeneratorStyle::ES6 : GeneratorStyle::None;
 
   bool isAsync = funbox->isAsync();
   bool isExpression = funbox->hasExprBody();
 
   RootedValue id(cx);
-  RootedAtom funcAtom(cx, func->explicitName());
+  RootedAtom funcAtom(cx, funbox->explicitName());
   if (!optIdentifier(funcAtom, nullptr, &id)) {
     return false;
   }
 
   NodeVector args(cx);
   NodeVector defaults(cx);
 
   RootedValue body(cx), rest(cx);