Closed
Bug 1356189
Opened 7 years ago
Closed 7 years ago
await not rejected as keyword in non-toplevel module context
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla56
People
(Reporter: anba, Assigned: anba)
Details
Attachments
(1 file, 2 obsolete files)
11.43 KB,
patch
|
anba
:
review+
|
Details | Diff | Splinter Review |
Test case, run as module source code: --- function f() { await; } --- Expected: Throws SyntaxError Actual: No SyntaxError thrown
Assignee | ||
Comment 1•7 years ago
|
||
"await" is always a keyword when parsing module source code and since we don't have a "currently-parsing-module-code" flag in the parser, I've modified the existing ParserBase::awaitIsKeyword_ flag to hold the new state when "await" is a module-keyword.
Comment 2•7 years ago
|
||
Comment on attachment 8874746 [details] [diff] [review] bug1356189.patch Review of attachment 8874746 [details] [diff] [review]: ----------------------------------------------------------------- Thanks!
Attachment #8874746 -
Flags: review?(shu) → review+
Assignee | ||
Comment 3•7 years ago
|
||
Try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=85d65f02ddf1cf5fcd1cc12fc763bf525d2183ca
Keywords: checkin-needed
Pushed by ryanvm@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/47ce8dbb036e Ensure 'await' is always a restricted identifier when parsing modules. r=shu
Keywords: checkin-needed
Comment 5•7 years ago
|
||
Backed out for no tests result for own test await-restricted-nested.js on Windows 7 VM opt and also failing it in Win XP SM plain: https://hg.mozilla.org/integration/mozilla-inbound/rev/196bfa86b5a63c20f7f6fdf3e30d9ff3d8839de3 Push with failures: https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&revision=47ce8dbb036e5452c0dd060c274cef056306d258&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception&filter-resultStatus=retry&filter-resultStatus=usercancel&filter-resultStatus=runnable Failure log jsreftest Windows 7 VM opt: https://treeherder.mozilla.org/logviewer.html#?job_id=105246170&repo=mozilla-inbound 10:15:10 INFO - REFTEST TEST-LOAD | file:///c:/slave/test/build/tests/jsreftest/tests/jsreftest.html?test=ecma_6/Module/await-restricted-nested.js;error=SyntaxError;module | 1825 / 16441 (11%) 10:15:10 INFO - REFTEST TEST-UNEXPECTED-FAIL | file:///c:/slave/test/build/tests/jsreftest/tests/jsreftest.html?test=ecma_6/Module/await-restricted-nested.js;error=SyntaxError;module | No test results reported. (SCRIPT) 10:15:10 INFO - 10:15:10 INFO - REFTEST TEST-END | file:///c:/slave/test/build/tests/jsreftest/tests/jsreftest.html?test=ecma_6/Module/await-restricted-nested.js;error=SyntaxError;module Failure log spidermonkey plain Windows XP: https://treeherder.mozilla.org/logviewer.html#?job_id=105221722&repo=mozilla-inbound ## ecma_6\Module\await-restricted-nested.js: rc = 0, run time = 0.187 TEST-UNEXPECTED-FAIL | ecma_6\Module\await-restricted-nested.js | (args: "") ## ecma_6\Module\await-restricted-nested.js: rc = 0, run time = 0.187 TEST-UNEXPECTED-FAIL | ecma_6\Module\await-restricted-nested.js | (args: "--ion-eager --ion-offthread-compile=off") ...
Flags: needinfo?(andrebargull)
Assignee | ||
Comment 6•7 years ago
|
||
The enum needs to be typed as unsigned for MSVC, but that breaks GCC because of https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61414, so I also needed to change field type in ParserBase to use uint8_t instead of the enum type... Try looks good so far: https://treeherder.mozilla.org/#/jobs?repo=try&revision=fae1a20f148d1d778291aeacb5bf2cc056754ce5
Attachment #8874746 -
Attachment is obsolete: true
Flags: needinfo?(andrebargull)
Attachment #8875762 -
Flags: review+
Assignee | ||
Comment 7•7 years ago
|
||
Updated patch to apply cleanly on inbound. Carrying r+.
Attachment #8875762 -
Attachment is obsolete: true
Attachment #8881908 -
Flags: review+
Assignee | ||
Comment 8•7 years ago
|
||
Try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=6346b0ffbdc65834848093fb4d6230c0906d1fad
Keywords: checkin-needed
Pushed by ryanvm@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/d365e0c892e3 Ensure 'await' is always a restricted identifier when parsing modules. r=shu
Keywords: checkin-needed
Comment 10•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/d365e0c892e3
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Updated•7 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•