WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
144238
Class contructor and methods shouldn't have "arguments" and "caller"
https://bugs.webkit.org/show_bug.cgi?id=144238
Summary
Class contructor and methods shouldn't have "arguments" and "caller"
Ryosuke Niwa
Reported
2015-04-26 16:00:05 PDT
Apparently ES6 gutted "arguments" property from class constructors and methods. Authors should also be able to define a property named "arguments"; e.g. class A { static arguments() {} } class B { static get arguments() {} }
Attachments
Patch
(17.78 KB, patch)
2016-05-01 02:36 PDT
,
GSkachkov
no flags
Details
Formatted Diff
Diff
Patch
(18.95 KB, patch)
2016-05-01 02:56 PDT
,
GSkachkov
no flags
Details
Formatted Diff
Diff
Patch
(18.88 KB, patch)
2016-05-01 03:06 PDT
,
GSkachkov
no flags
Details
Formatted Diff
Diff
Patch
(16.44 KB, patch)
2016-05-01 03:26 PDT
,
GSkachkov
rniwa
: review+
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Ryosuke Niwa
Comment 1
2015-04-26 16:46:13 PDT
Same goes for "caller".
GSkachkov
Comment 2
2016-05-01 02:36:14 PDT
Created
attachment 277849
[details]
Patch
GSkachkov
Comment 3
2016-05-01 02:56:59 PDT
Created
attachment 277850
[details]
Patch Patch for review
GSkachkov
Comment 4
2016-05-01 03:06:31 PDT
Created
attachment 277851
[details]
Patch Small improvement
GSkachkov
Comment 5
2016-05-01 03:26:45 PDT
Created
attachment 277854
[details]
Patch Remove debug code
GSkachkov
Comment 6
2016-05-01 03:40:05 PDT
I think define arguments property should be fixed in separate patch, we already has one
https://bugs.webkit.org/show_bug.cgi?id=152985
Ryosuke Niwa
Comment 7
2016-05-01 14:52:07 PDT
Comment on
attachment 277854
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=277854&action=review
> LayoutTests/js/script-tests/class-method-and-constructor-properties.js:55 > + caller() { return 'value'; }
How about staric ones?
Ryosuke Niwa
Comment 8
2016-05-01 14:53:16 PDT
(In reply to
comment #7
)
> Comment on
attachment 277854
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=277854&action=review
> > > LayoutTests/js/script-tests/class-method-and-constructor-properties.js:55 > > + caller() { return 'value'; } > > How about staric ones?
Oh, never mind. Didn't see the comment there
Ryosuke Niwa
Comment 9
2016-05-01 14:54:21 PDT
Comment on
attachment 277854
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=277854&action=review
> Source/JavaScriptCore/runtime/JSFunction.cpp:371 > + GetterSetter* errorGetterSetter = thisObject->jsExecutable()->isClassConstructorFunction() || thisObject->jsExecutable()->parseMode() == SourceParseMode::MethodMode
Please add a static local helper function instead of duplicating the code.
GSkachkov
Comment 10
2016-05-02 05:46:11 PDT
(In reply to
comment #9
)
> Comment on
attachment 277854
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=277854&action=review
> > > Source/JavaScriptCore/runtime/JSFunction.cpp:371 > > + GetterSetter* errorGetterSetter = thisObject->jsExecutable()->isClassConstructorFunction() || thisObject->jsExecutable()->parseMode() == SourceParseMode::MethodMode > > Please add a static local helper function instead of duplicating the code.
Done
GSkachkov
Comment 11
2016-05-02 05:47:28 PDT
Committed r 200321: <
http://trac.webkit.org/changeset/200321
>
Ryosuke Niwa
Comment 12
2016-05-05 22:22:30 PDT
Closing the bug since the patch was landed in
http://trac.webkit.org/changeset/200321
.
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