Bug 148179 - Named IIFE function + ES6 default parameters crashes WebKit
Summary: Named IIFE function + ES6 default parameters crashes WebKit
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Saam Barati
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-08-19 10:50 PDT by Tobias Reiss
Modified: 2015-08-26 10:54 PDT (History)
10 users (show)

See Also:


Attachments
Test case (171 bytes, text/html)
2015-08-19 10:58 PDT, BJ Burg
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Reiss 2015-08-19 10:50:20 PDT
* Version
WebKit nightly r188633

* SUMMARY
Executing a named IIFE function that uses ES6 default parameters in the console causes a crash.

* STEPS TO REPRODUCE
1. Open Console
2. Execute the following snippet

(function fn(oo = 'test') {
  console.log(oo);
})()

 => Crashes the Browser

* EXPECTATION
Console prints "test"

Interestingly an anonymous function works:

(function(oo = 'test') {
  console.log(oo);
})()
Comment 1 Radar WebKit Bug Importer 2015-08-19 10:51:19 PDT
<rdar://problem/22345949>
Comment 2 BJ Burg 2015-08-19 10:58:32 PDT
Created attachment 259378 [details]
Test case

This is not an inspector bug.
Comment 3 Saam Barati 2015-08-26 10:54:08 PDT
this was fixed in: http://trac.webkit.org/changeset/188926
for bug: https://bugs.webkit.org/show_bug.cgi?id=148400