Closed
Bug 1199296
Opened 9 years ago
Closed 8 years ago
Don't allow legacy generator yield in method definitions
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla51
People
(Reporter: anba, Assigned: efaust)
References
Details
(Keywords: dev-doc-complete, site-compat)
Attachments
(1 file, 1 obsolete file)
6.29 KB,
patch
|
shu
:
review+
|
Details | Diff | Splinter Review |
Tests:
---
js> (new (class {constructor(){ yield 2 }})).next()
2
js> ({m(){ yield 2 }}).m().next()
2
js> Object.getOwnPropertyDescriptor({get m() { yield 2 }}, "m").get().next()
2
---
Expected: Throws SyntaxError
Actual: Parsed as legacy generator
Reporter | ||
Updated•9 years ago
|
Blocks: harmony-classes
Updated•9 years ago
|
Keywords: dev-doc-needed,
site-compat
Assignee | ||
Comment 1•8 years ago
|
||
OK, so, this is pretty stupid, since this is not exposed to the web by default, but in case people are explicitly setting version numbers, we should not allow this. Here's a fix.
Assignee | ||
Comment 2•8 years ago
|
||
Oops, helps if the tests actually fail in the before vs after trial.
Attachment #8766978 -
Attachment is obsolete: true
Attachment #8766978 -
Flags: review?(shu)
Attachment #8766985 -
Flags: review?(shu)
Updated•8 years ago
|
Attachment #8766985 -
Flags: review?(shu) → review+
Pushed by efaustbmo@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/fab721467f68
Don't allow method definitions to be legacy generators. (r=shu)
Backed out in https://hg.mozilla.org/integration/mozilla-inbound/rev/b3145407c4c3 for mass bustage like
https://treeherder.mozilla.org/logviewer.html#?job_id=31593500&repo=mozilla-inbound
Flags: needinfo?(efaustbmo)
Pushed by efaustbmo@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/79b119d86a4c
Don't allow method definitions to be legacy generators. (r=shu, r=evilpie, r=jaws)
Pushed by kwierso@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/28ff935d4af9
Fix up mochitest(cl) failures r=mconley
Comment 7•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/79b119d86a4c
https://hg.mozilla.org/mozilla-central/rev/28ff935d4af9
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox51:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
Comment 8•8 years ago
|
||
Posted the site compatibility doc: https://www.fxsitecompat.com/en-CA/docs/2016/legacy-generator-function-is-no-longer-allowed-in-method-definitions/
Comment 9•8 years ago
|
||
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Method_definitions#Shorthand_generator_methods
https://developer.mozilla.org/en-US/Firefox/Releases/51#JavaScript
Keywords: dev-doc-needed → dev-doc-complete
Flags: needinfo?(efaustbmo)
You need to log in
before you can comment on or make changes to this bug.
Description
•