Bug 1550628 - Correctly handle OOM. r=iain
authorAshley Hauck <khyperia@mozilla.com>
Fri, 10 May 2019 01:08:35 +0000
changeset 532156 c21f692a069302eca39bdb1342bc6acb9fa14a3b
parent 532155 e754d9ad197df615a1f71185f6201d956efc31b9
child 532157 919f1307f466e0d747bcc5cc40947ddfb0d7662e
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersiain
bugs1550628
milestone68.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 1550628 - Correctly handle OOM. r=iain Differential Revision: https://phabricator.services.mozilla.com/D30597
js/src/frontend/Parser.cpp
--- a/js/src/frontend/Parser.cpp
+++ b/js/src/frontend/Parser.cpp
@@ -7428,17 +7428,17 @@ GeneralParser<ParseHandler, Unit>::field
 
   UnaryNodeType exprStatement =
       handler_.newExprStatement(initializerPropInit, wholeInitializerPos.end);
   if (!exprStatement) {
     return null();
   }
 
   ListNodeType statementList = handler_.newStatementList(wholeInitializerPos);
-  if (!argsbody) {
+  if (!statementList) {
     return null();
   }
   handler_.addStatementToList(statementList, exprStatement);
 
   // Set the function's body to the field assignment.
   LexicalScopeNodeType initializerBody =
       finishLexicalScope(pc_->varScope(), statementList);
   if (!initializerBody) {