WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
142774
Enable ES6 classes by default
https://bugs.webkit.org/show_bug.cgi?id=142774
Summary
Enable ES6 classes by default
Ryosuke Niwa
Reported
2015-03-16 21:54:27 PDT
Now that default constructor is supported, we're ready for the prime time!
Attachments
Enables the feature
(58.19 KB, patch)
2015-03-16 22:11 PDT
,
Ryosuke Niwa
no flags
Details
Formatted Diff
Diff
Fixed double ChangeLog
(57.97 KB, patch)
2015-03-16 22:12 PDT
,
Ryosuke Niwa
barraclough
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Ryosuke Niwa
Comment 1
2015-03-16 22:11:32 PDT
Created
attachment 248814
[details]
Enables the feature
Ryosuke Niwa
Comment 2
2015-03-16 22:12:27 PDT
Created
attachment 248815
[details]
Fixed double ChangeLog
Ryosuke Niwa
Comment 3
2015-03-16 22:54:27 PDT
Thanks for the review!
Ryosuke Niwa
Comment 4
2015-03-16 22:56:18 PDT
Committed
r181618
: <
http://trac.webkit.org/changeset/181618
>
Joseph Pecoraro
Comment 5
2015-03-17 14:21:30 PDT
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()?
Ryosuke Niwa
Comment 6
2015-03-17 15:42:06 PDT
(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.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug