Closed
Bug 880329
Opened 11 years ago
Closed 10 years ago
Drop version-based do-while SyntaxError
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla32
People
(Reporter: jorendorff, Assigned: cpeterson)
Details
Attachments
(1 file)
1.82 KB,
patch
|
jorendorff
:
review+
|
Details | Diff | Splinter Review |
We have code that specially treats do {} while (0) alert("OK"); as a syntax error if the version is JSVERSION_ECMA_3. LOL! TC39 just specified this wrong in ES3 and ES5; the semicolon is optional, at least since 2005 (see bug 238945). ES6 fixes the bug, changing the spec to match de facto reality. Keeping around a legacy SyntaxError-me-harder mode is pointless. There's 1JS, y'all.
Assignee | ||
Comment 1•10 years ago
|
||
Remove ES3-only SyntaxError for do-while without semicolon. AFAICT, web content can't even opt into JSVERSION_ECMA_3 if it wanted to because Gecko's <script> element parser rounds up older JS version numbers to JSVERSION_DEFAULT: https://hg.mozilla.org/mozilla-central/file/582b2d81ebe1/content/base/src/nsContentUtils.cpp#l829
Assignee: general → cpeterson
Status: NEW → ASSIGNED
Attachment #8409284 -
Flags: review?(jorendorff)
Reporter | ||
Comment 2•10 years ago
|
||
Comment on attachment 8409284 [details] [diff] [review] remove-SyntaxError.patch Review of attachment 8409284 [details] [diff] [review]: ----------------------------------------------------------------- Thanks.
Attachment #8409284 -
Flags: review?(jorendorff) → review+
Assignee | ||
Comment 3•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/47feb777c154
status-firefox31:
--- → wontfix
status-firefox32:
--- → affected
Comment 4•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/47feb777c154
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
You need to log in
before you can comment on or make changes to this bug.
Description
•