<?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>159020</bug_id>
          
          <creation_ts>2016-06-22 02:36:14 -0700</creation_ts>
          <short_desc>JSDOMIterator forEach should support second optional parameter</short_desc>
          <delta_ts>2016-06-22 10:50:32 -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>WebCore JavaScript</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=131443</see_also>
          <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>1</everconfirmed>
          <reporter name="youenn fablet">youennf</reporter>
          <assigned_to name="youenn fablet">youennf</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>cdumez</cc>
    
    <cc>jiewen_tan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1204478</commentid>
    <comment_count>0</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2016-06-22 02:36:14 -0700</bug_when>
    <thetext>The second optional parameter should be the thisValue when calling the callback.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1204480</commentid>
    <comment_count>1</comment_count>
      <attachid>281830</attachid>
    <who name="youenn fablet">youennf</who>
    <bug_when>2016-06-22 02:42:04 -0700</bug_when>
    <thetext>Created attachment 281830
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1204512</commentid>
    <comment_count>2</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2016-06-22 08:50:38 -0700</bug_when>
    <thetext>I am working on confirming that this fixes yahoo.jp.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1204513</commentid>
    <comment_count>3</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2016-06-22 08:52:37 -0700</bug_when>
    <thetext>Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1204520</commentid>
    <comment_count>4</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2016-06-22 09:33:33 -0700</bug_when>
    <thetext>Hmm, yahoo.co.jp is still broken with this patch but the JS error is different:

[Error] TypeError: undefined is not an object (evaluating &apos;o.removeClass&apos;)
	(anonymous function) (mtop-page-top.js:662:1513)
	f (mtop-page-top.js:14:886)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1204521</commentid>
    <comment_count>5</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2016-06-22 09:38:22 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; Hmm, yahoo.co.jp is still broken with this patch but the JS error is
&gt; different:
&gt; 
&gt; [Error] TypeError: undefined is not an object (evaluating &apos;o.removeClass&apos;)
&gt; 	(anonymous function) (mtop-page-top.js:662:1513)
&gt; 	f (mtop-page-top.js:14:886)

Do you have a link to mtop-page-top.js?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1204522</commentid>
    <comment_count>6</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2016-06-22 09:41:40 -0700</bug_when>
    <thetext>(In reply to comment #5)
&gt; (In reply to comment #4)
&gt; &gt; Hmm, yahoo.co.jp is still broken with this patch but the JS error is
&gt; &gt; different:
&gt; &gt; 
&gt; &gt; [Error] TypeError: undefined is not an object (evaluating &apos;o.removeClass&apos;)
&gt; &gt; 	(anonymous function) (mtop-page-top.js:662:1513)
&gt; &gt; 	f (mtop-page-top.js:14:886)
&gt; 
&gt; Do you have a link to mtop-page-top.js?

Full URL:
http://i.yimg.jp/images/mtop/4.5.38/js/standalone/mtop-page-top.js

Note that commenting out the &quot;iterable&lt;Node&gt;;&quot; in NodeList.idl does not seem to help either :/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1204524</commentid>
    <comment_count>7</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2016-06-22 09:49:48 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; (In reply to comment #5)
&gt; &gt; (In reply to comment #4)
&gt; &gt; &gt; Hmm, yahoo.co.jp is still broken with this patch but the JS error is
&gt; &gt; &gt; different:
&gt; &gt; &gt; 
&gt; &gt; &gt; [Error] TypeError: undefined is not an object (evaluating &apos;o.removeClass&apos;)
&gt; &gt; &gt; 	(anonymous function) (mtop-page-top.js:662:1513)
&gt; &gt; &gt; 	f (mtop-page-top.js:14:886)
&gt; &gt; 
&gt; &gt; Do you have a link to mtop-page-top.js?
&gt; 
&gt; Full URL:
&gt; http://i.yimg.jp/images/mtop/4.5.38/js/standalone/mtop-page-top.js
&gt; 
&gt; Note that commenting out the &quot;iterable&lt;Node&gt;;&quot; in NodeList.idl does not seem
&gt; to help either :/

Commenting out &quot;iterable&lt;FontFace&gt;;&quot; on FontFaceSet does not unbreak yahoo.co.jp either :( So I believe I have commented out all the iterables and the site is still broken.

It is possible that:
1. There are several bugs and the iterable one hid another one that landed later on.
2. The patch for iterable support changed the behavior of code not strictly related to iterable</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1204525</commentid>
    <comment_count>8</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2016-06-22 09:50:46 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; (In reply to comment #5)
&gt; &gt; (In reply to comment #4)
&gt; &gt; &gt; Hmm, yahoo.co.jp is still broken with this patch but the JS error is
&gt; &gt; &gt; different:
&gt; &gt; &gt; 
&gt; &gt; &gt; [Error] TypeError: undefined is not an object (evaluating &apos;o.removeClass&apos;)
&gt; &gt; &gt; 	(anonymous function) (mtop-page-top.js:662:1513)
&gt; &gt; &gt; 	f (mtop-page-top.js:14:886)
&gt; &gt; 
&gt; &gt; Do you have a link to mtop-page-top.js?
&gt; 
&gt; Full URL:
&gt; http://i.yimg.jp/images/mtop/4.5.38/js/standalone/mtop-page-top.js
&gt; 
&gt; Note that commenting out the &quot;iterable&lt;Node&gt;;&quot; in NodeList.idl does not seem
&gt; to help either :/

Is the page working if only forEach property is removed from JSNodeListPrototypeTableValues in JSNodeList.cpp?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1204527</commentid>
    <comment_count>9</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2016-06-22 09:54:41 -0700</bug_when>
    <thetext>(In reply to comment #8)
&gt; (In reply to comment #6)
&gt; &gt; (In reply to comment #5)
&gt; &gt; &gt; (In reply to comment #4)
&gt; &gt; &gt; &gt; Hmm, yahoo.co.jp is still broken with this patch but the JS error is
&gt; &gt; &gt; &gt; different:
&gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; [Error] TypeError: undefined is not an object (evaluating &apos;o.removeClass&apos;)
&gt; &gt; &gt; &gt; 	(anonymous function) (mtop-page-top.js:662:1513)
&gt; &gt; &gt; &gt; 	f (mtop-page-top.js:14:886)
&gt; &gt; &gt; 
&gt; &gt; &gt; Do you have a link to mtop-page-top.js?
&gt; &gt; 
&gt; &gt; Full URL:
&gt; &gt; http://i.yimg.jp/images/mtop/4.5.38/js/standalone/mtop-page-top.js
&gt; &gt; 
&gt; &gt; Note that commenting out the &quot;iterable&lt;Node&gt;;&quot; in NodeList.idl does not seem
&gt; &gt; to help either :/
&gt; 
&gt; Is the page working if only forEach property is removed from
&gt; JSNodeListPrototypeTableValues in JSNodeList.cpp?

Not sure I understand the question, I commented out the whole &quot;iterable&lt;Node&gt;;&quot; in NodeList so there is no forEach property in JSNodeList.cpp already.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1204529</commentid>
    <comment_count>10</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2016-06-22 09:56:52 -0700</bug_when>
    <thetext>&gt; Not sure I understand the question, I commented out the whole
&gt; &quot;iterable&lt;Node&gt;;&quot; in NodeList so there is no forEach property in
&gt; JSNodeList.cpp already.

iterable&lt;Node&gt; also triggers methods like keys, values which may or may not be used in the code.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1204534</commentid>
    <comment_count>11</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2016-06-22 09:59:33 -0700</bug_when>
    <thetext>(In reply to comment #10)
&gt; &gt; Not sure I understand the question, I commented out the whole
&gt; &gt; &quot;iterable&lt;Node&gt;;&quot; in NodeList so there is no forEach property in
&gt; &gt; JSNodeList.cpp already.
&gt; 
&gt; iterable&lt;Node&gt; also triggers methods like keys, values which may or may not
&gt; be used in the code.

Hmm, ok but the site was working before &lt;http://trac.webkit.org/changeset/200619&gt; where you added iterable&lt;&gt; on NodeList.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1204542</commentid>
    <comment_count>12</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2016-06-22 10:03:06 -0700</bug_when>
    <thetext>(In reply to comment #11)
&gt; (In reply to comment #10)
&gt; &gt; &gt; Not sure I understand the question, I commented out the whole
&gt; &gt; &gt; &quot;iterable&lt;Node&gt;;&quot; in NodeList so there is no forEach property in
&gt; &gt; &gt; JSNodeList.cpp already.
&gt; &gt; 
&gt; &gt; iterable&lt;Node&gt; also triggers methods like keys, values which may or may not
&gt; &gt; be used in the code.
&gt; 
&gt; Hmm, ok but the site was working before
&gt; &lt;http://trac.webkit.org/changeset/200619&gt; where you added iterable&lt;&gt; on
&gt; NodeList.

Can you describe what means &quot;the site is working&quot; vs &quot;the site is not working&quot;?
That might help me trying to investigate further the issue on my local machine.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1204544</commentid>
    <comment_count>13</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2016-06-22 10:06:53 -0700</bug_when>
    <thetext>(In reply to comment #12)
&gt; (In reply to comment #11)
&gt; &gt; (In reply to comment #10)
&gt; &gt; &gt; &gt; Not sure I understand the question, I commented out the whole
&gt; &gt; &gt; &gt; &quot;iterable&lt;Node&gt;;&quot; in NodeList so there is no forEach property in
&gt; &gt; &gt; &gt; JSNodeList.cpp already.
&gt; &gt; &gt; 
&gt; &gt; &gt; iterable&lt;Node&gt; also triggers methods like keys, values which may or may not
&gt; &gt; &gt; be used in the code.
&gt; &gt; 
&gt; &gt; Hmm, ok but the site was working before
&gt; &gt; &lt;http://trac.webkit.org/changeset/200619&gt; where you added iterable&lt;&gt; on
&gt; &gt; NodeList.
&gt; 
&gt; Can you describe what means &quot;the site is working&quot; vs &quot;the site is not
&gt; working&quot;?
&gt; That might help me trying to investigate further the issue on my local
&gt; machine.

This was explained on the other bug. The site content at the bottom of the page no longer loads, we just see a spinner. You may be able to reproduce in a simulator.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1204548</commentid>
    <comment_count>14</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2016-06-22 10:08:33 -0700</bug_when>
    <thetext>(In reply to comment #9)
&gt; (In reply to comment #8)
&gt; &gt; (In reply to comment #6)
&gt; &gt; &gt; (In reply to comment #5)
&gt; &gt; &gt; &gt; (In reply to comment #4)
&gt; &gt; &gt; &gt; &gt; Hmm, yahoo.co.jp is still broken with this patch but the JS error is
&gt; &gt; &gt; &gt; &gt; different:
&gt; &gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; &gt; [Error] TypeError: undefined is not an object (evaluating &apos;o.removeClass&apos;)
&gt; &gt; &gt; &gt; &gt; 	(anonymous function) (mtop-page-top.js:662:1513)
&gt; &gt; &gt; &gt; &gt; 	f (mtop-page-top.js:14:886)
&gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; Do you have a link to mtop-page-top.js?
&gt; &gt; &gt; 
&gt; &gt; &gt; Full URL:
&gt; &gt; &gt; http://i.yimg.jp/images/mtop/4.5.38/js/standalone/mtop-page-top.js
&gt; &gt; &gt; 
&gt; &gt; &gt; Note that commenting out the &quot;iterable&lt;Node&gt;;&quot; in NodeList.idl does not seem
&gt; &gt; &gt; to help either :/
&gt; &gt; 
&gt; &gt; Is the page working if only forEach property is removed from
&gt; &gt; JSNodeListPrototypeTableValues in JSNodeList.cpp?
&gt; 
&gt; Not sure I understand the question, I commented out the whole
&gt; &quot;iterable&lt;Node&gt;;&quot; in NodeList so there is no forEach property in
&gt; JSNodeList.cpp already.

I tried dropping just the forEach property and it did not help.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1204556</commentid>
    <comment_count>15</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2016-06-22 10:18:32 -0700</bug_when>
    <thetext>(In reply to comment #13)
&gt; (In reply to comment #12)
&gt; &gt; (In reply to comment #11)
&gt; &gt; &gt; (In reply to comment #10)
&gt; &gt; &gt; &gt; &gt; Not sure I understand the question, I commented out the whole
&gt; &gt; &gt; &gt; &gt; &quot;iterable&lt;Node&gt;;&quot; in NodeList so there is no forEach property in
&gt; &gt; &gt; &gt; &gt; JSNodeList.cpp already.
&gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; iterable&lt;Node&gt; also triggers methods like keys, values which may or may not
&gt; &gt; &gt; &gt; be used in the code.
&gt; &gt; &gt; 
&gt; &gt; &gt; Hmm, ok but the site was working before
&gt; &gt; &gt; &lt;http://trac.webkit.org/changeset/200619&gt; where you added iterable&lt;&gt; on
&gt; &gt; &gt; NodeList.
&gt; &gt; 
&gt; &gt; Can you describe what means &quot;the site is working&quot; vs &quot;the site is not
&gt; &gt; working&quot;?
&gt; &gt; That might help me trying to investigate further the issue on my local
&gt; &gt; machine.
&gt; 
&gt; This was explained on the other bug. The site content at the bottom of the
&gt; page no longer loads, we just see a spinner. You may be able to reproduce in
&gt; a simulator.

I tried on mini browser this morning but was not sure what to search for.
I will try again.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1204557</commentid>
    <comment_count>16</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2016-06-22 10:20:19 -0700</bug_when>
    <thetext>(In reply to comment #15)
&gt; (In reply to comment #13)
&gt; &gt; (In reply to comment #12)
&gt; &gt; &gt; (In reply to comment #11)
&gt; &gt; &gt; &gt; (In reply to comment #10)
&gt; &gt; &gt; &gt; &gt; &gt; Not sure I understand the question, I commented out the whole
&gt; &gt; &gt; &gt; &gt; &gt; &quot;iterable&lt;Node&gt;;&quot; in NodeList so there is no forEach property in
&gt; &gt; &gt; &gt; &gt; &gt; JSNodeList.cpp already.
&gt; &gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; &gt; iterable&lt;Node&gt; also triggers methods like keys, values which may or may not
&gt; &gt; &gt; &gt; &gt; be used in the code.
&gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; Hmm, ok but the site was working before
&gt; &gt; &gt; &gt; &lt;http://trac.webkit.org/changeset/200619&gt; where you added iterable&lt;&gt; on
&gt; &gt; &gt; &gt; NodeList.
&gt; &gt; &gt; 
&gt; &gt; &gt; Can you describe what means &quot;the site is working&quot; vs &quot;the site is not
&gt; &gt; &gt; working&quot;?
&gt; &gt; &gt; That might help me trying to investigate further the issue on my local
&gt; &gt; &gt; machine.
&gt; &gt; 
&gt; &gt; This was explained on the other bug. The site content at the bottom of the
&gt; &gt; page no longer loads, we just see a spinner. You may be able to reproduce in
&gt; &gt; a simulator.
&gt; 
&gt; I tried on mini browser this morning but was not sure what to search for.
&gt; I will try again.

FYI, I am doing more testing. It seems I can no longer reproduce for some reason. Trying to figure out what I changed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1204559</commentid>
    <comment_count>17</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2016-06-22 10:22:13 -0700</bug_when>
    <thetext>(In reply to comment #15)
&gt; (In reply to comment #13)
&gt; &gt; (In reply to comment #12)
&gt; &gt; &gt; (In reply to comment #11)
&gt; &gt; &gt; &gt; (In reply to comment #10)
&gt; &gt; &gt; &gt; &gt; &gt; Not sure I understand the question, I commented out the whole
&gt; &gt; &gt; &gt; &gt; &gt; &quot;iterable&lt;Node&gt;;&quot; in NodeList so there is no forEach property in
&gt; &gt; &gt; &gt; &gt; &gt; JSNodeList.cpp already.
&gt; &gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; &gt; iterable&lt;Node&gt; also triggers methods like keys, values which may or may not
&gt; &gt; &gt; &gt; &gt; be used in the code.
&gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; Hmm, ok but the site was working before
&gt; &gt; &gt; &gt; &lt;http://trac.webkit.org/changeset/200619&gt; where you added iterable&lt;&gt; on
&gt; &gt; &gt; &gt; NodeList.
&gt; &gt; &gt; 
&gt; &gt; &gt; Can you describe what means &quot;the site is working&quot; vs &quot;the site is not
&gt; &gt; &gt; working&quot;?
&gt; &gt; &gt; That might help me trying to investigate further the issue on my local
&gt; &gt; &gt; machine.
&gt; &gt; 
&gt; &gt; This was explained on the other bug. The site content at the bottom of the
&gt; &gt; page no longer loads, we just see a spinner. You may be able to reproduce in
&gt; &gt; a simulator.
&gt; 
&gt; I tried on mini browser this morning but was not sure what to search for.
&gt; I will try again.

This is on iOS with the mobile site.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1204561</commentid>
    <comment_count>18</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2016-06-22 10:32:02 -0700</bug_when>
    <thetext>So I cannot reproduce the bottom of the site not loading anymore. However, I can confirm that the forEach() JS exceptions are present without the patch attached to this bug and that they&apos;re gone with the patch.

Therefore, I think yahoo.co.jp does require the support for the second parameter on forEach and we should land your patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1204563</commentid>
    <comment_count>19</comment_count>
      <attachid>281830</attachid>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2016-06-22 10:34:15 -0700</bug_when>
    <thetext>Comment on attachment 281830
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=281830&amp;action=review

&gt; LayoutTests/fast/dom/nodeListIterator.html:51
&gt; +                shouldBe(&apos;thisValue&apos;, &apos;window&apos;);

Looking at the spec (http://heycam.github.io/webidl/#es-forEach), shouldn&apos;t this be undefined rather than window?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1204564</commentid>
    <comment_count>20</comment_count>
      <attachid>281830</attachid>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2016-06-22 10:34:45 -0700</bug_when>
    <thetext>Comment on attachment 281830
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=281830&amp;action=review

&gt;&gt; LayoutTests/fast/dom/nodeListIterator.html:51
&gt;&gt; +                shouldBe(&apos;thisValue&apos;, &apos;window&apos;);
&gt; 
&gt; Looking at the spec (http://heycam.github.io/webidl/#es-forEach), shouldn&apos;t this be undefined rather than window?

Referring to step 4.4 Invoke callback with thisArg (or undefined, if the argument was not supplied) as the callback this value and value, key and O as its arguments.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1204565</commentid>
    <comment_count>21</comment_count>
      <attachid>281830</attachid>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2016-06-22 10:36:34 -0700</bug_when>
    <thetext>Comment on attachment 281830
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=281830&amp;action=review

&gt;&gt;&gt; LayoutTests/fast/dom/nodeListIterator.html:51
&gt;&gt;&gt; +                shouldBe(&apos;thisValue&apos;, &apos;window&apos;);
&gt;&gt; 
&gt;&gt; Looking at the spec (http://heycam.github.io/webidl/#es-forEach), shouldn&apos;t this be undefined rather than window?
&gt; 
&gt; Referring to step 4.4 Invoke callback with thisArg (or undefined, if the argument was not supplied) as the callback this value and value, key and O as its arguments.

Hmm, Chrome seems to agree with you though..</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1204567</commentid>
    <comment_count>22</comment_count>
      <attachid>281830</attachid>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2016-06-22 10:42:05 -0700</bug_when>
    <thetext>Comment on attachment 281830
Patch

Nevermind, I am mis-interpreting the spec. You do call JSC::call() with undefined as thisValue in this case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1204568</commentid>
    <comment_count>23</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2016-06-22 10:49:53 -0700</bug_when>
    <thetext>Note that on Chrome, a few checks are failing:
FAIL iterator.next().value should be [object HTMLDivElement] (of type object). Was 0 (of type number).
FAIL iterator.next().value should be [object HTMLOListElement] (of type object). Was 1 (of type number).

I have checked yet who is right.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1204569</commentid>
    <comment_count>24</comment_count>
      <attachid>281830</attachid>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2016-06-22 10:50:27 -0700</bug_when>
    <thetext>Comment on attachment 281830
Patch

Clearing flags on attachment: 281830

Committed r202334: &lt;http://trac.webkit.org/changeset/202334&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1204570</commentid>
    <comment_count>25</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2016-06-22 10:50:32 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>281830</attachid>
            <date>2016-06-22 02:42:04 -0700</date>
            <delta_ts>2016-06-22 10:50:27 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-159020-20160622114155.patch</filename>
            <type>text/plain</type>
            <size>5270</size>
            <attacher name="youenn fablet">youennf</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjAyMzI1CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXggODc2OTJiYjYwOTY5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tL25vZGVMaXN0SXRlcmF0b3IuaHRt
bAorKysgYi9MYXlvdXRUZXN0cy9mYXN0L2RvbS9ub2RlTGlzdEl0ZXJhdG9yLmh0bWwKQEAgLTM5
LDE1ICszOSwyOSBAQAogICAgICAgICAgICAgdmFyIG5vZGU7CiAgICAgICAgICAgICB2YXIgZm9y
RWFjaEluZGV4OwogICAgICAgICAgICAgdmFyIGZvckVhY2hDb250YWluZXI7CisgICAgICAgICAg
ICB2YXIgdGhpc1ZhbHVlOwogICAgICAgICAgICAgbm9kZUxpc3QuZm9yRWFjaChmdW5jdGlvbihu
LCBpLCBjKSB7CiAgICAgICAgICAgICAgICAgbm9kZSA9IG47CiAgICAgICAgICAgICAgICAgZm9y
RWFjaEluZGV4ID0gaTsKICAgICAgICAgICAgICAgICBmb3JFYWNoQ29udGFpbmVyID0gYzsKKyAg
ICAgICAgICAgICAgICB0aGlzVmFsdWUgPSB0aGlzOwogICAgICAgICAgICAgICAgIHNob3VsZEJl
KCdmb3JFYWNoQ29udGFpbmVyJywgJ25vZGVMaXN0Jyk7CiAgICAgICAgICAgICAgICAgc2hvdWxk
QmUoJ2ZvckVhY2hJbmRleCcsICdpbmRleCcpOwogICAgICAgICAgICAgICAgIHNob3VsZEJlKCdu
b2RlJywgJ2NoaWxkcmVuW2luZGV4KytdJyk7CisgICAgICAgICAgICAgICAgc2hvdWxkQmUoJ3Ro
aXNWYWx1ZScsICd3aW5kb3cnKTsKICAgICAgICAgICAgIH0pOwotICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorCisgICAg
ICAgICAgICBub2RlTGlzdC5mb3JFYWNoKGZ1bmN0aW9uKCkgeworICAgICAgICAgICAgICAgIHRo
aXNWYWx1ZSA9IHRoaXM7CisgICAgICAgICAgICAgICAgc2hvdWxkQmUoJ3RoaXNWYWx1ZScsICd3
aW5kb3cnKTsKKyAgICAgICAgICAgIH0sIHVuZGVmaW5lZCk7CisKKyAgICAgICAgICAgIHZhciBn
aXZlblRoaXNWYWx1ZSA9IG5vZGVMaXN0OworICAgICAgICAgICAgbm9kZUxpc3QuZm9yRWFjaChm
dW5jdGlvbigpIHsKKyAgICAgICAgICAgICAgICB0aGlzVmFsdWUgPSB0aGlzOworICAgICAgICAg
ICAgICAgIHNob3VsZEJlKCd0aGlzVmFsdWUnLCAnZ2l2ZW5UaGlzVmFsdWUnKTsKKyAgICAgICAg
ICAgIH0sIGdpdmVuVGhpc1ZhbHVlKTsKKwogICAgICAgICAgICAgdmFyIGl0ZXJhdG9yID0gbm9k
ZUxpc3Qua2V5cygpOwogICAgICAgICAgICAgc2hvdWxkQmUoJ2l0ZXJhdG9yLm5leHQoKS52YWx1
ZScsICdjaGlsZHJlblswXScpOwogICAgICAgICAgICAgc2hvdWxkQmUoJ2l0ZXJhdG9yLm5leHQo
KS52YWx1ZScsICdjaGlsZHJlblsxXScpOwo=
</data>

          </attachment>
      

    </bug>

</bugzilla>