<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:ggaren&#64;apple.com" title="Geoffrey Garen &lt;ggaren&#64;apple.com&gt;"> <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&#64;apple.com" title="Geoffrey Garen &lt;ggaren&#64;apple.com&gt;"> <span class="fn">Geoffrey Garen</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=260999&amp;action=diff" name="attach_260999" title="Patch">attachment 260999</a> <a href="attachment.cgi?id=260999&amp;action=edit" title="Patch">[details]</a></span>
Patch

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=260999&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=260999&amp;action=review</a>

<span class="quote">&gt; Source/JavaScriptCore/runtime/JSBoundFunction.cpp:81
&gt; +    bool hasDefaultPrototype = targetPrototype.isObject() &amp;&amp; asObject(targetPrototype) == (JSObject *)globalObject-&gt;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 &quot;JSObject*&quot;.

The clearest and most efficient way to write this is &quot;targetPrototype == globalObject-&gt;functionPrototype()&quot;. 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>