<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>148179</bug_id>
          
          <creation_ts>2015-08-19 10:50:20 -0700</creation_ts>
          <short_desc>Named IIFE function + ES6 default parameters crashes WebKit</short_desc>
          <delta_ts>2015-08-26 10:54:08 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Tobias Reiss">tobi+webkit</reporter>
          <assigned_to name="Saam Barati">saam</assigned_to>
          <cc>bburg</cc>
    
    <cc>ggaren</cc>
    
    <cc>graouts</cc>
    
    <cc>joepeck</cc>
    
    <cc>mattbaker</cc>
    
    <cc>nvasilyev</cc>
    
    <cc>saam</cc>
    
    <cc>timothy</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>ysuzuki</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1118922</commentid>
    <comment_count>0</comment_count>
    <who name="Tobias Reiss">tobi+webkit</who>
    <bug_when>2015-08-19 10:50:20 -0700</bug_when>
    <thetext>* 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 = &apos;test&apos;) {
  console.log(oo);
})()

 =&gt; Crashes the Browser

* EXPECTATION
Console prints &quot;test&quot;

Interestingly an anonymous function works:

(function(oo = &apos;test&apos;) {
  console.log(oo);
})()</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1118923</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2015-08-19 10:51:19 -0700</bug_when>
    <thetext>&lt;rdar://problem/22345949&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1118925</commentid>
    <comment_count>2</comment_count>
      <attachid>259378</attachid>
    <who name="Blaze Burg">bburg</who>
    <bug_when>2015-08-19 10:58:32 -0700</bug_when>
    <thetext>Created attachment 259378
Test case

This is not an inspector bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1120980</commentid>
    <comment_count>3</comment_count>
    <who name="Saam Barati">saam</who>
    <bug_when>2015-08-26 10:54:08 -0700</bug_when>
    <thetext>this was fixed in: http://trac.webkit.org/changeset/188926
for bug: https://bugs.webkit.org/show_bug.cgi?id=148400</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>259378</attachid>
            <date>2015-08-19 10:58:32 -0700</date>
            <delta_ts>2015-08-19 10:58:32 -0700</delta_ts>
            <desc>Test case</desc>
            <filename>named-iife-default-parameters.html</filename>
            <type>text/html</type>
            <size>171</size>
            <attacher name="Blaze Burg">bburg</attacher>
            
              <data encoding="base64">PCFkb2N0eXBlIGh0bWw+CjxodG1sPgo8Ym9keT4KPHNjcmlwdD4KKGZ1bmN0aW9uIGZuKG9vID0g
J3Rlc3QnKSB7CiAgY29uc29sZS5sb2cob28pOwp9KSgpCjwvc2NyaXB0PgoKPHA+VGVzdGluZyBh
IG5hbWVkIElJRkUgd2l0aCBkZWZhdWx0IHBhcmFtZXRlcnMuPC9wPgoKPC9ib2R5Pgo8L2h0bWw+
</data>

          </attachment>
      

    </bug>

</bugzilla>