Closed
Bug 1317379
Opened 8 years ago
Closed 8 years ago
B.3.4 shouldn't be applied for generator and async functions
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla53
People
(Reporter: anba, Assigned: Waldo)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
(deleted),
patch
|
arai
:
review+
|
Details | Diff | Splinter Review |
`if (true) function* g() {}` and `if (true) async function f() {}` should both throw a SyntaxError because B.3.4 only applies for FunctionDeclaration.
ES2017 spec:
https://tc39.github.io/ecma262/#sec-functiondeclarations-in-ifstatement-statement-clauses
Assignee | ||
Comment 1•8 years ago
|
||
Attachment #8810674 -
Flags: review?(arai.unmht)
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → jwalden+bmo
Status: NEW → ASSIGNED
Comment 2•8 years ago
|
||
Comment on attachment 8810674 [details] [diff] [review]
Disallow generator functions and async functions as direct children of if/else
Review of attachment 8810674 [details] [diff] [review]:
-----------------------------------------------------------------
Thanks!
Attachment #8810674 -
Flags: review?(arai.unmht) → review+
Pushed by jwalden@mit.edu:
https://hg.mozilla.org/integration/mozilla-inbound/rev/4c223c3ddf73
Disallow generator functions and async functions as direct children of if/else. r=arai
Comment 4•8 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox53:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
Comment 5•8 years ago
|
||
Sorry about all these requests. Not sure if it will work to backport everything. Let us at least try to backport the easy / lowest risk ones. I also assume that all these issues probably go back before F52? Though I don't think we can / need to backport to beta. I assume only serious security issues are allowed currently.
Flags: needinfo?(andrebargull)
Reporter | ||
Comment 6•8 years ago
|
||
I think Waldo should decide if it's safe to backport this one.
Flags: needinfo?(andrebargull) → needinfo?(jwalden+bmo)
Assignee | ||
Comment 7•8 years ago
|
||
I can't think of a reason why we'd need to backport this. It's enough of an edge case that I doubt anyone will come to depend on this bugginess, and that seems like the only reason to accelerate a fix.
Even if we did decide this was important to fix earlier, the changes span sufficient number of lines, and are picky enough about peeking and lookahead and such, that it presents *some* risk of containing a mistake. And when there's not much to gain, some risk is too much risk.
I say we don't even consider taking this.
Flags: needinfo?(jwalden+bmo)
Updated•8 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•