<?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>46689</bug_id>
          
          <creation_ts>2010-09-27 19:32:29 -0700</creation_ts>
          <short_desc>[v8] fast/dom/HTMLElement/class-list.html fails</short_desc>
          <delta_ts>2010-09-29 14:01:56 -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>Platform</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <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="Hajime Morrita">morrita</reporter>
          <assigned_to name="Erik Arvidsson">arv</assigned_to>
          <cc>antonm</cc>
    
    <cc>dglazkov</cc>
    
    <cc>japhet</cc>
    
    <cc>morrita</cc>
    
    <cc>tkent</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>286016</commentid>
    <comment_count>0</comment_count>
    <who name="Hajime Morrita">morrita</who>
    <bug_when>2010-09-27 19:32:29 -0700</bug_when>
    <thetext>It&apos;s flaky on chromium buildbot.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>286087</commentid>
    <comment_count>1</comment_count>
    <who name="Erik Arvidsson">arv</who>
    <bug_when>2010-09-27 23:23:30 -0700</bug_when>
    <thetext>I only managed to reproduce this on DRT (it does not happen on TestShell nor Chromium). I should try it on

The test tests the following:

assert(classList[-1] === undefined);
assert(classList[-1] === undefined);

However, the second call incorrectly triggers the indexed getter which should return null for UInt32 that are larger than the length - 1. Why this happens on the second call is a mystery to me. I haven&apos;t been able to get a debugger attached to DRT.

I would really appreciate some help from someone with some V8 binding foo.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>286095</commentid>
    <comment_count>2</comment_count>
    <who name="Kent Tamura">tkent</who>
    <bug_when>2010-09-27 23:38:12 -0700</bug_when>
    <thetext>Is it flaky?  It looks 100% fail.

http://test-results.appspot.com/dashboards/flakiness_dashboard.html#showExpectations=true&amp;tests=class-list.html&amp;useWebKitCanary=true</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>286137</commentid>
    <comment_count>3</comment_count>
    <who name="anton muhin">antonm</who>
    <bug_when>2010-09-28 02:49:32 -0700</bug_when>
    <thetext>(In reply to comment #1)
&gt; I only managed to reproduce this on DRT (it does not happen on TestShell nor Chromium). I should try it on
&gt; 
&gt; The test tests the following:
&gt; 
&gt; assert(classList[-1] === undefined);
&gt; assert(classList[-1] === undefined);
&gt; 
&gt; However, the second call incorrectly triggers the indexed getter which should return null for UInt32 that are larger than the length - 1. Why this happens on the second call is a mystery to me. I haven&apos;t been able to get a debugger attached to DRT.

What is the platform?

&gt; 
&gt; I would really appreciate some help from someone with some V8 binding foo.

Is it the exact JS code which triggers the problem?  v8 might compile different code if the code is in a loop, for example.

If you could send a minimal test case in JS with instructions how to run it, I&apos;ll try to debug it on my box.

I&apos;d try to see (with printf unless there will be found the way to attach a debugger) the whole stack: how v8 invokes the callback (we should go either via runtime or small compiled stub).

In any event, Erik, feel free to ping me on IM, I&apos;d be glad to help.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>286232</commentid>
    <comment_count>4</comment_count>
      <attachid>69050</attachid>
    <who name="Erik Arvidsson">arv</who>
    <bug_when>2010-09-28 08:01:54 -0700</bug_when>
    <thetext>Created attachment 69050
Test case</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>286235</commentid>
    <comment_count>5</comment_count>
    <who name="anton muhin">antonm</who>
    <bug_when>2010-09-28 08:04:11 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; Created an attachment (id=69050) [details]
&gt; Test case

It looks empty</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>286237</commentid>
    <comment_count>6</comment_count>
    <who name="Erik Arvidsson">arv</who>
    <bug_when>2010-09-28 08:06:49 -0700</bug_when>
    <thetext>This happens on all platforms according to http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=class-list.html&amp;useWebKitCanary=true

I only managed to repro this using DRT and it works as expected on TestShell and Chromium (I&apos;m on a Mac).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>286238</commentid>
    <comment_count>7</comment_count>
    <who name="Erik Arvidsson">arv</who>
    <bug_when>2010-09-28 08:08:30 -0700</bug_when>
    <thetext>(In reply to comment #5)
&gt; (In reply to comment #4)
&gt; &gt; Created an attachment (id=69050) [details] [details]
&gt; &gt; Test case
&gt; 
&gt; It looks empty

You need a build from yesterday or you&apos;ll see script errors.

However I managed to reproduce this with MediaList. I&apos;ll add another test that shows the same bug with a media list.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>286245</commentid>
    <comment_count>8</comment_count>
      <attachid>69052</attachid>
    <who name="Erik Arvidsson">arv</who>
    <bug_when>2010-09-28 08:11:46 -0700</bug_when>
    <thetext>Created attachment 69052
Another related test

This shows that MediaList has the same indexed getter bug in DRT as DOMTokenList.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>286855</commentid>
    <comment_count>9</comment_count>
    <who name="anton muhin">antonm</who>
    <bug_when>2010-09-29 07:08:37 -0700</bug_when>
    <thetext>It&apos;s actually V8 issue.  The cure should be on the way: http://codereview.chromium.org/3520006/show</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>286903</commentid>
    <comment_count>10</comment_count>
    <who name="anton muhin">antonm</who>
    <bug_when>2010-09-29 09:09:13 -0700</bug_when>
    <thetext>https://code.google.com/p/v8/source/detail?r=5553 committed to bleeding_edge, should reach Chromium ToT early next week (if everything goes smooth).

r5554--5556 brings the fix to various v8 branches and should eventually go into Chrome 7 and maybe even Chrome 6.

Erik, may you check if this fixes the issue and close the bug if it&apos;s the case?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>287110</commentid>
    <comment_count>11</comment_count>
    <who name="Erik Arvidsson">arv</who>
    <bug_when>2010-09-29 14:01:56 -0700</bug_when>
    <thetext>I verified that the fix works.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>69050</attachid>
            <date>2010-09-28 08:01:54 -0700</date>
            <delta_ts>2010-09-28 08:01:54 -0700</delta_ts>
            <desc>Test case</desc>
            <filename>class-list-indexed-getter-bug.html</filename>
            <type>text/html</type>
            <size>263</size>
            <attacher name="Erik Arvidsson">arv</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxwcmUgaWQ9b3V0PjwvcHJlPgo8c2NyaXB0PgpmdW5jdGlvbiBwcmlu
dChzKSB7CiAgZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ291dCcpLmFwcGVuZENoaWxkKGRvY3Vt
ZW50LmNyZWF0ZVRleHROb2RlKHMgKyAnXG4nKSk7Cn0KCnZhciBlbGVtZW50ID0gZG9jdW1lbnQu
Y3JlYXRlRWxlbWVudCgnZGl2Jyk7CnByaW50KGVsZW1lbnQuY2xhc3NMaXN0Wy0xXSk7CnByaW50
KGVsZW1lbnQuY2xhc3NMaXN0Wy0xXSk7Cgo8L3NjcmlwdD4=
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>69052</attachid>
            <date>2010-09-28 08:11:46 -0700</date>
            <delta_ts>2010-09-28 08:11:46 -0700</delta_ts>
            <desc>Another related test</desc>
            <filename>media-list-indexed-getter-bug.html</filename>
            <type>text/html</type>
            <size>332</size>
            <attacher name="Erik Arvidsson">arv</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxzdHlsZT48L3N0eWxlPgoKPHA+VGhpcyBzaG91bGQgcHJpbnQgdW5k
ZWZpbmVkIGFuZCB1bmRlZmluZWQuPC9wPgo8aHI+Cgo8cHJlIGlkPW91dD48L3ByZT4KPHNjcmlw
dD4KZnVuY3Rpb24gcHJpbnQocykgewogIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCdvdXQnKS5h
cHBlbmRDaGlsZChkb2N1bWVudC5jcmVhdGVUZXh0Tm9kZShzICsgJ1xuJykpOwp9Cgp2YXIgc3R5
bGVTaGVldCA9IGRvY3VtZW50LnN0eWxlU2hlZXRzWzBdOwpwcmludChzdHlsZVNoZWV0Lm1lZGlh
Wy0xXSk7CnByaW50KHN0eWxlU2hlZXQubWVkaWFbLTFdKTsKCjwvc2NyaXB0Pgo=
</data>

          </attachment>
      

    </bug>

</bugzilla>