Bug 148179

Summary: Named IIFE function + ES6 default parameters crashes WebKit
Product: WebKit Reporter: Tobias Reiss <tobi+webkit>
Component: JavaScriptCoreAssignee: Saam Barati <saam>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, ggaren, graouts, joepeck, mattbaker, nvasilyev, saam, timothy, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Test case none

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