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 320238 0f59ff767344e7856642447f5e9a3679cc2fe4ab
parent 320237 203903ea62ec88835f67ffaf938d39745461d486
child 320239 92f7082a90be77700618e8176c73ad7538ee75a3
push id20754
push usercbook@mozilla.com
push dateMon, 31 Oct 2016 15:58:35 +0000
treeherderfx-team@b1b66b1780c2 [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;