<?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>140295</bug_id>
          
          <creation_ts>2015-01-09 10:03:37 -0800</creation_ts>
          <short_desc>(function(arg1) {}.bind(window)).length results in 0</short_desc>
          <delta_ts>2020-08-21 11:49:24 -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>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</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>sarimarton</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ashvayka</cc>
    
    <cc>dbates</cc>
    
    <cc>ggaren</cc>
    
    <cc>mark.lam</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1060163</commentid>
    <comment_count>0</comment_count>
    <who name="">sarimarton</who>
    <bug_when>2015-01-09 10:03:37 -0800</bug_when>
    <thetext>Simple as that:

(function(arg1) {}.bind(window)).length results in 0 instead of 1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1060207</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2015-01-09 11:47:05 -0800</bug_when>
    <thetext>&lt;rdar://problem/19429047&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1060758</commentid>
    <comment_count>2</comment_count>
    <who name="Daniel Bates">dbates</who>
    <bug_when>2015-01-12 20:40:47 -0800</bug_when>
    <thetext>What is the version of Safari/WebKit you are using? What is the platform/OS version? On Mac, you can find the Safari/WebKit and OS version information in Safari &gt; About Safari and Apple (menu) &gt; About this Mac, respectively.

I&apos;m neither able to reproduce this bug using shipping Safari Version 8.0.2 (10600.2.5) on 10.10.1 (14B25) nor with the latest WebKit nightly r178255 on the same OS. I also was unable to reproduce this bug using Mac nightly r178109 (2015-01-08 15:33:34 GMT). That is, the expression &quot;(function(arg1) {}.bind(window)).length&quot; evaluates to 1 in Web Inspector.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1060805</commentid>
    <comment_count>3</comment_count>
    <who name="">sarimarton</who>
    <bug_when>2015-01-13 05:11:03 -0800</bug_when>
    <thetext>I&apos;m using PhantomJS 1.9.7 on Windows and Unix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1682007</commentid>
    <comment_count>4</comment_count>
    <who name="Alexey Shvayka">ashvayka</who>
    <bug_when>2020-08-21 11:49:24 -0700</bug_when>
    <thetext>(In reply to sarimarton from comment #0)
&gt; (function(arg1) {}.bind(window)).length results in 0 instead of 1.

(In reply to sarimarton from comment #3)
&gt; I&apos;m using PhantomJS 1.9.7 on Windows and Unix.

At that time, PhantomJS was shipped with a rather outdated version of WebKit.
As of v2.1.1 (macOS), Function.prototype.bind returns correct &quot;length&quot; of 1.

Also works as expected in Safari 13.1 and r265666.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>