<?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>65885</bug_id>
          
          <creation_ts>2011-08-08 15:56:28 -0700</creation_ts>
          <short_desc>Array.prototype.indexOf called on undefined should throw</short_desc>
          <delta_ts>2011-08-09 09:51:31 -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>DUPLICATE</resolution>
          <dup_id>64679</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Paul Irish">paulirish</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>mhahnenberg</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>448330</commentid>
    <comment_count>0</comment_count>
    <who name="Paul Irish">paulirish</who>
    <bug_when>2011-08-08 15:56:28 -0700</bug_when>
    <thetext>[].indexOf.call(undefined, 6);

^ should throw a TypeError according to spec....

from: http://es5.github.com/#x15.4.4.14

1. Let O be the result of calling ToObject passing the `this` value as the argument.

and from the ToObject definition http://es5.github.com/#x9.9 ...

if ArgumentType is Undefined, then Throw a TypeError exception</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>448334</commentid>
    <comment_count>1</comment_count>
    <who name="Paul Irish">paulirish</who>
    <bug_when>2011-08-08 15:59:12 -0700</bug_when>
    <thetext>Current behavior: JSC returns -1. V8 throws TypeError.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>448628</commentid>
    <comment_count>2</comment_count>
    <who name="Mark Hahnenberg">mhahnenberg</who>
    <bug_when>2011-08-09 09:51:31 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 64679 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>