Bug 152385 - [ES6] Catch parameter should accept BindingPattern
Summary: [ES6] Catch parameter should accept BindingPattern
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords:
Depends on:
Blocks: 153310
  Show dependency treegraph
 
Reported: 2015-12-17 03:43 PST by Yusuke Suzuki
Modified: 2016-01-21 20:21 PST (History)
9 users (show)

See Also:


Attachments
Patch (60.99 KB, patch)
2016-01-21 08:57 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews105 for mac-yosemite-wk2 (1.16 MB, application/zip)
2016-01-21 09:28 PST, Build Bot
no flags Details
Archive of layout-test-results from ews102 for mac-yosemite (1.01 MB, application/zip)
2016-01-21 09:46 PST, Build Bot
no flags Details
Archive of layout-test-results from ews117 for mac-yosemite (936.06 KB, application/zip)
2016-01-21 09:51 PST, Build Bot
no flags Details
Patch (272.48 KB, patch)
2016-01-21 10:31 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2015-12-17 03:43:28 PST
...
Comment 1 Yusuke Suzuki 2016-01-21 08:57:16 PST
Created attachment 269455 [details]
Patch
Comment 2 Saam Barati 2016-01-21 09:15:39 PST
Comment on attachment 269455 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=269455&action=review

r=me

> Source/JavaScriptCore/tests/stress/catch-parameter-syntax.js:27
> +    } catch ([a, a]) {

Is this definitely disallowed by the spec?
Comment 3 Saam Barati 2016-01-21 09:15:58 PST
Comment on attachment 269455 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=269455&action=review

r=me

> Source/JavaScriptCore/tests/stress/catch-parameter-syntax.js:27
> +    } catch ([a, a]) {

Is this definitely disallowed by the spec?
Comment 4 Build Bot 2016-01-21 09:28:27 PST
Comment on attachment 269455 [details]
Patch

Attachment 269455 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/722079

New failing tests:
sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A16_T7.html
sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A16_T13.html
js/mozilla/strict/12.14.1.html
sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A16_T5.html
sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A16_T8.html
js/dom/reserved-words-as-property.html
sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A16_T10.html
Comment 5 Build Bot 2016-01-21 09:28:30 PST
Created attachment 269458 [details]
Archive of layout-test-results from ews105 for mac-yosemite-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews105  Port: mac-yosemite-wk2  Platform: Mac OS X 10.10.5
Comment 6 Yusuke Suzuki 2016-01-21 09:36:50 PST
Comment on attachment 269455 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=269455&action=review

Thanks!! Before landing, I'll update the test expect files (since failure in layout tests is due to missing test expect file updates)

>>> Source/JavaScriptCore/tests/stress/catch-parameter-syntax.js:27
>>> +    } catch ([a, a]) {
>> 
>> Is this definitely disallowed by the spec?
> 
> Is this definitely disallowed by the spec?

Yup! "It is a Syntax Error if BoundNames of CatchParameter contains any duplicate elements."
http://ecma-international.org/ecma-262/6.0/#sec-try-statement-static-semantics-early-errors
Comment 7 Build Bot 2016-01-21 09:46:47 PST
Comment on attachment 269455 [details]
Patch

Attachment 269455 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/722144

New failing tests:
sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A16_T7.html
sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A16_T13.html
js/mozilla/strict/12.14.1.html
sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A16_T5.html
sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A16_T8.html
js/dom/reserved-words-as-property.html
sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A16_T10.html
Comment 8 Build Bot 2016-01-21 09:46:49 PST
Created attachment 269459 [details]
Archive of layout-test-results from ews102 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews102  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 9 Build Bot 2016-01-21 09:51:22 PST
Comment on attachment 269455 [details]
Patch

Attachment 269455 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/722133

New failing tests:
sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A16_T7.html
sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A16_T13.html
js/mozilla/strict/12.14.1.html
sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A16_T5.html
sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A16_T8.html
js/dom/reserved-words-as-property.html
sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A16_T10.html
Comment 10 Build Bot 2016-01-21 09:51:25 PST
Created attachment 269461 [details]
Archive of layout-test-results from ews117 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews117  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 11 Yusuke Suzuki 2016-01-21 10:31:01 PST
Created attachment 269467 [details]
Patch

revised, checking on EWS
Comment 12 Yusuke Suzuki 2016-01-21 10:31:58 PST
Oops. I should add "--no-obsolute"... Anyway, after checking EWS, I'll land it :)
Comment 13 Yusuke Suzuki 2016-01-21 20:21:50 PST
Committed r195439: <http://trac.webkit.org/changeset/195439>