| Summary: | Enable ES6 classes by default | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Ryosuke Niwa <rniwa> | ||||||
| Component: | JavaScriptCore | Assignee: | Ryosuke Niwa <rniwa> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | barraclough, benjamin, fpizlo, ggaren, saam, ysuzuki | ||||||
| Priority: | P2 | ||||||||
| Version: | 528+ (Nightly build) | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 140491 | ||||||||
| Attachments: |
|
||||||||
|
Description
Ryosuke Niwa
2015-03-16 21:54:27 PDT
Created attachment 248814 [details]
Enables the feature
Created attachment 248815 [details]
Fixed double ChangeLog
Thanks for the review! Committed r181618: <http://trac.webkit.org/changeset/181618> Comment on attachment 248815 [details] Fixed double ChangeLog View in context: https://bugs.webkit.org/attachment.cgi?id=248815&action=review > LayoutTests/js/script-tests/class-syntax-super.js:55 > -shouldThrow('new (class extends Base { constructor() { } })', '"TypeError: Cannot return a non-object type in the constructor of a derived class."'); > +shouldThrow('new (class extends Base { constructor() { } })', '"ReferenceError: Cannot access uninitialized variable."'); This error message can certainly be improved. I don't see what is wrong here. Is it a missing call to super()? (In reply to comment #5) > Comment on attachment 248815 [details] > Fixed double ChangeLog > > View in context: > https://bugs.webkit.org/attachment.cgi?id=248815&action=review > > > LayoutTests/js/script-tests/class-syntax-super.js:55 > > -shouldThrow('new (class extends Base { constructor() { } })', '"TypeError: Cannot return a non-object type in the constructor of a derived class."'); > > +shouldThrow('new (class extends Base { constructor() { } })', '"ReferenceError: Cannot access uninitialized variable."'); > > This error message can certainly be improved. I don't see what is wrong > here. Is it a missing call to super()? Yes. The problem here is that constructor() {} doesn't initialize "this" so we can't return safely. |