<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 "bound " + 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 "bound " + 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@lists.webkit.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>nvasilyev@apple.com
</td>
</tr>
<tr>
<th>CC</th>
<td>benjamin@webkit.org, burg@cs.washington.edu, fpizlo@apple.com, ggaren@apple.com, gskachkov@gmail.com, joepeck@webkit.org, keith_miller@apple.com, mark.lam@apple.com, msaboff@apple.com, nvasilyev@apple.com, oliver@apple.com, sbarati@apple.com, sukolsak@gmail.com, timothy@apple.com, utatane.tea@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 "bound " + the target function's name"
href="show_bug.cgi?id=153796">Bug 153796</a> [ES6] bound functions .name property should be "bound " + the target function's name
We improved bound functions .name, but .toString() wasn't affected.
<span class="quote">> function foo() {return 42}
> boundFunc = foo.bind(null)
> boundFunc.name</span >
< "bound foo"
<span class="quote">> boundFunc.toString()</span >
< "function foo() {
[native code]
}"
What if we return the following instead:
<span class="quote">> boundFunc.toString()</span >
< "function bound foo() {return 42}"
or this:
<span class="quote">> boundFunc.toString()</span >
< "bound function foo() {return 42}"
I have no preference.
Two things are different from the current behavior:
1. Instead of "[native code]", 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 "bound" 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>