<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:ggaren@apple.com" title="Geoffrey Garen <ggaren@apple.com>"> <span class="fn">Geoffrey Garen</span></a>
</span> changed
<a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - Function.prototype.bind: Bound functions must use the [[Prototype]] of their target function instead of Function.prototype"
href="https://bugs.webkit.org/show_bug.cgi?id=145605">bug 145605</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Attachment #260999 Flags</td>
<td>review?
</td>
<td>review-
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - Function.prototype.bind: Bound functions must use the [[Prototype]] of their target function instead of Function.prototype"
href="https://bugs.webkit.org/show_bug.cgi?id=145605#c32">Comment # 32</a>
on <a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - Function.prototype.bind: Bound functions must use the [[Prototype]] of their target function instead of Function.prototype"
href="https://bugs.webkit.org/show_bug.cgi?id=145605">bug 145605</a>
from <span class="vcard"><a class="email" href="mailto:ggaren@apple.com" title="Geoffrey Garen <ggaren@apple.com>"> <span class="fn">Geoffrey Garen</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=260999&action=diff" name="attach_260999" title="Patch">attachment 260999</a> <a href="attachment.cgi?id=260999&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=260999&action=review">https://bugs.webkit.org/attachment.cgi?id=260999&action=review</a>
<span class="quote">> Source/JavaScriptCore/runtime/JSBoundFunction.cpp:81
> + bool hasDefaultPrototype = targetPrototype.isObject() && asObject(targetPrototype) == (JSObject *)globalObject->functionPrototype();</span >
There's no need to cast functionPrototype() to JSObject*: FunctionPrototype inherits from JSObject.
WebKit style uses C++ cast syntax rather than C syntax.
WebKit style puts the * next to the type name, as in "JSObject*".
The clearest and most efficient way to write this is "targetPrototype == globalObject->functionPrototype()". That's only one compare-and-branch instead of two.</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>