Bug 1185106 - Part 8.1: Treat await as keyword in module. r=efaust,till
authorMariusz Kierski <mkierski@mozilla.com>
Sun, 28 Aug 2016 23:58:29 +0900
changeset 346930 0f59ff767344e7856642447f5e9a3679cc2fe4ab
parent 346929 203903ea62ec88835f67ffaf938d39745461d486
child 346931 92f7082a90be77700618e8176c73ad7538ee75a3
push id10298
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:33:03 +0000
treeherdermozilla-aurora@7e29173b1641 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersefaust, till
bugs1185106
milestone52.0a1
Bug 1185106 - Part 8.1: Treat await as keyword in module. r=efaust,till MozReview-Commit-ID: JnnXaIJvPGW
js/src/frontend/Parser.cpp
--- a/js/src/frontend/Parser.cpp
+++ b/js/src/frontend/Parser.cpp
@@ -1964,16 +1964,17 @@ Parser<FullParseHandler>::moduleBody(Mod
     ParseContext::VarScope varScope(this);
     if (!varScope.init(pc))
         return nullptr;
 
     Node mn = handler.newModule();
     if (!mn)
         return null();
 
+    AutoAwaitIsKeyword awaitIsKeyword(&tokenStream, true);
     ParseNode* pn = statementList(YieldIsKeyword);
     if (!pn)
         return null();
 
     MOZ_ASSERT(pn->isKind(PNK_STATEMENTLIST));
     mn->pn_body = pn;
 
     TokenKind tt;