WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 152570
[ES6] Arrow function. Arrow function should raise exception ReferenceError only when access to 'arguments' on top level
https://bugs.webkit.org/show_bug.cgi?id=152570
Summary
[ES6] Arrow function. Arrow function should raise exception ReferenceError on...
GSkachkov
Reported
2015-12-27 13:07:13 PST
Arrow function should raise exception ReferenceError only when access to 'arguments' in strict mode in top level arrow function. 'use strict'; var arr = (error) => { if (error) { return arguments; } else { return []; } }; arr(false) === []; arr(true); // ReferenceError
Attachments
Patch
(3.28 KB, patch)
2016-02-16 11:09 PST
,
GSkachkov
no flags
Details
Formatted Diff
Diff
Patch
(3.35 KB, patch)
2016-02-17 11:36 PST
,
GSkachkov
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
GSkachkov
Comment 1
2016-02-16 11:02:36 PST
It seems that it is not important is this strict mode or not, just arrow function on top level.
GSkachkov
Comment 2
2016-02-16 11:09:45 PST
Created
attachment 271441
[details]
Patch Added tests
Saam Barati
Comment 3
2016-02-16 15:26:57 PST
Comment on
attachment 271441
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=271441&action=review
> LayoutTests/js/script-tests/arrowfunction-lexical-bind-arguments-top-level.js:2 > +// Ignore this test in run-jsc-stress-tests, but run in run-webkit-tests > +//@ skip
Why?
GSkachkov
Comment 4
2016-02-17 00:10:34 PST
Comment on
attachment 271441
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=271441&action=review
>> LayoutTests/js/script-tests/arrowfunction-lexical-bind-arguments-top-level.js:2 >> +//@ skip > > Why?
jsc always has arguments
http://trac.webkit.org/browser/trunk/Source/JavaScriptCore/jsc.cpp#L758
so I skip tests in jsc But in browser we do not have arguments, so I'm checking only for browser.
Saam Barati
Comment 5
2016-02-17 09:51:53 PST
Comment on
attachment 271441
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=271441&action=review
>>> LayoutTests/js/script-tests/arrowfunction-lexical-bind-arguments-top-level.js:2 >>> +//@ skip >> >> Why? > > jsc always has arguments
http://trac.webkit.org/browser/trunk/Source/JavaScriptCore/jsc.cpp#L758
so I skip tests in jsc > But in browser we do not have arguments, so I'm checking only for browser.
Ok. Can you add that to your comment in the test?
GSkachkov
Comment 6
2016-02-17 11:36:52 PST
Created
attachment 271572
[details]
Patch Fix comments
GSkachkov
Comment 7
2016-02-17 12:05:19 PST
(In reply to
comment #5
)
> Comment on
attachment 271441
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=271441&action=review
> > >>> LayoutTests/js/script-tests/arrowfunction-lexical-bind-arguments-top-level.js:2 > >>> +//@ skip > >> > >> Why? > > > > jsc always has arguments
http://trac.webkit.org/browser/trunk/Source/JavaScriptCore/jsc.cpp#L758
so I skip tests in jsc > > But in browser we do not have arguments, so I'm checking only for browser. > > Ok. Can you add that to your comment in the test?
Fixed
WebKit Commit Bot
Comment 8
2016-02-17 13:33:32 PST
Comment on
attachment 271572
[details]
Patch Clearing flags on attachment: 271572 Committed
r196718
: <
http://trac.webkit.org/changeset/196718
>
WebKit Commit Bot
Comment 9
2016-02-17 13:33:35 PST
All reviewed patches have been landed. Closing bug.
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