Bug 152385

Summary: [ES6] Catch parameter should accept BindingPattern
Product: WebKit Reporter: Yusuke Suzuki <ysuzuki>
Component: JavaScriptCoreAssignee: Yusuke Suzuki <ysuzuki>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, buildbot, fpizlo, ggaren, keith_miller, mark.lam, msaboff, rniwa, saam
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 153310    
Attachments:
Description Flags
Patch
none
Archive of layout-test-results from ews105 for mac-yosemite-wk2
none
Archive of layout-test-results from ews102 for mac-yosemite
none
Archive of layout-test-results from ews117 for mac-yosemite
none
Patch none

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>