<?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>185208</bug_id>
          
          <creation_ts>2018-05-02 10:53:08 -0700</creation_ts>
          <short_desc>JSCore does not support &quot;null&quot; as a [Symbol.iterator] property of a typedArray</short_desc>
          <delta_ts>2020-06-07 05:35:16 -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>Safari 11</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>212771</dup_id>
          
          <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 name="Mariana Moura">mam7</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ashvayka</cc>
    
    <cc>fpizlo</cc>
    
    <cc>isol2</cc>
    
    <cc>keith_miller</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>ysuzuki</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1419735</commentid>
    <comment_count>0</comment_count>
    <who name="Mariana Moura">mam7</who>
    <bug_when>2018-05-02 10:53:08 -0700</bug_when>
    <thetext>Hi there, 

there is an inconsistency when iterator value of a typedArray is &quot;null&quot;.

Tag: 606.1.9.4
OS: Ubuntu 16.04 x86_64

According to GetMethod (object, @@iterator) ES6 specification (https://www.ecma-international.org/ecma-262/8.0/index.html#sec-typedarray-object), if the iterator value is either &quot;undefined&quot; or &quot;null&quot;, the method should return &quot;undefined&quot;, but JSCore does not support this property as &quot;null&quot;.

Steps to reproduce:
    let typedArray = new Int8Array(
  {
    [Symbol.iterator]: null
  }
)

Actual results:
Exception: TypeError: Type error

Expected results:
Pass without failures

Other JavaScript engines such as V8, SpiderMonkey and Chakra works as expected.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1452114</commentid>
    <comment_count>1</comment_count>
    <who name="">isol2</who>
    <bug_when>2018-08-21 09:22:59 -0700</bug_when>
    <thetext>cinfuzz</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1508487</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2019-02-21 02:57:32 -0800</bug_when>
    <thetext>&lt;rdar://problem/48270655&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1660052</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Shvayka">ashvayka</who>
    <bug_when>2020-06-07 05:35:16 -0700</bug_when>
    <thetext>(In reply to Mariana Moura from comment #0)
&gt; According to GetMethod (object, @@iterator) ES6 specification
&gt; (https://www.ecma-international.org/ecma-262/8.0/index.html#sec-typedarray-
&gt; object), if the iterator value is either &quot;undefined&quot; or &quot;null&quot;, the method
&gt; should return &quot;undefined&quot;, but JSCore does not support this property as
&gt; &quot;null&quot;.

r262567 fixed GetMethod with iterators, including %TypedArray% constructor case.
test262 coverage: https://github.com/tc39/test262/pull/2639.

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

    </bug>

</bugzilla>