<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Bound functions toString method should return &quot;bound &quot; + the target function's toString()"
   href="https://bugs.webkit.org/show_bug.cgi?id=153909">153909</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Bound functions toString method should return &quot;bound &quot; + the target function's toString()
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>WebKit Nightly Build
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>JavaScriptCore
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>nvasilyev&#64;apple.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>benjamin&#64;webkit.org, burg&#64;cs.washington.edu, fpizlo&#64;apple.com, ggaren&#64;apple.com, gskachkov&#64;gmail.com, joepeck&#64;webkit.org, keith_miller&#64;apple.com, mark.lam&#64;apple.com, msaboff&#64;apple.com, nvasilyev&#64;apple.com, oliver&#64;apple.com, sbarati&#64;apple.com, sukolsak&#64;gmail.com, timothy&#64;apple.com, utatane.tea&#64;gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Via <a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED - [ES6] bound functions .name property should be &quot;bound &quot; + the target function's name"
   href="show_bug.cgi?id=153796">Bug 153796</a> [ES6] bound functions .name property should be &quot;bound &quot; + the target function's name

We improved bound functions .name, but .toString() wasn't affected.

<span class="quote">&gt; function foo() {return 42}
&gt; boundFunc = foo.bind(null)
&gt; boundFunc.name</span >
&lt; &quot;bound foo&quot;
<span class="quote">&gt; boundFunc.toString()</span >
&lt; &quot;function foo() {
      [native code]
  }&quot;


What if we return the following instead:

<span class="quote">&gt; boundFunc.toString()</span >
&lt; &quot;function bound foo() {return 42}&quot;

or this:

<span class="quote">&gt; boundFunc.toString()</span >
&lt; &quot;bound function foo() {return 42}&quot;

I have no preference.

Two things are different from the current behavior:

1. Instead of &quot;[native code]&quot;, the original content of the function is shown.
   This is much more convenient for debugging. Currently, all anonymous
   functions look alike:

   function () {
       [native code]
   }

2. Added &quot;bound&quot; prefix.


This is just an idea; I don't think ES6 spec touches this point.

What do you think?</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>