<?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>176017</bug_id>
          
          <creation_ts>2017-08-28 01:49:12 -0700</creation_ts>
          <short_desc>Speedometer 2.0: jQuery test fails occasionally</short_desc>
          <delta_ts>2017-08-30 20:16:58 -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>Tools / Tests</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>PC</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=176142</see_also>
          <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>
          
          <blocked>172339</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Shiyu Zhang">shiyu.zhang</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>addyo</cc>
    
    <cc>buildbot</cc>
    
    <cc>cdumez</cc>
    
    <cc>commit-queue</cc>
    
    <cc>lforschler</cc>
    
    <cc>mathias</cc>
    
    <cc>rniwa</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1342777</commentid>
    <comment_count>0</comment_count>
      <attachid>319169</attachid>
    <who name="Shiyu Zhang">shiyu.zhang</who>
    <bug_when>2017-08-28 01:49:12 -0700</bug_when>
    <thetext>Created attachment 319169
A possible fix for jQuery test

Speedometer 2.0 crashes at jQuery test with high possibility on my laptop (i5-5300U, win8, Chrome R60). 

Currently, jQuery test generates the DOM tree in its index.html and loads app.js, which binds events to the DOM nodes, at the end of the index.html. Speedometer framework starts &quot;Adding items&quot; action after the &quot;new-todo&quot; DOM node is ready. In jQuery test, there&apos;s a chance that Speedometer starts &quot;Adding items&quot; as soon as the &quot;new-todo&quot; node is ready while app.js has not been loaded completely and no event is binded to the DOM node yet. A possible fix patch is in the attachment.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1343031</commentid>
    <comment_count>1</comment_count>
    <who name="Addy Osmani">addyo</who>
    <bug_when>2017-08-28 19:26:22 -0700</bug_when>
    <thetext>Thanks for highlighting this as a potential issue. Imo, Speedometer attempting to inject items before app.js is loaded is a bug (however this is the first time I&apos;ve come across it). My only concern with the proposed solution is whether this pattern for readiness is consistent with how developers use jQuery.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1343066</commentid>
    <comment_count>2</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2017-08-28 23:45:57 -0700</bug_when>
    <thetext>The fix looks good. Could you create a patch in accordance with https://webkit.org/contributing-code/ ?

The easiest way to do this would be to run &quot;./Tools/Scripts/wekbit-patch upload 176017 --commit-queue&quot; at the top level directory, and then edit the change log with a description of your change.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1343067</commentid>
    <comment_count>3</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2017-08-28 23:54:32 -0700</bug_when>
    <thetext>In the future, please cc me on any of Speedometer related bugs. I don&apos;t actively look for bugs so I&apos;d totally miss a bug like this, and nobody else working on Speedometer 2.0 can legitimately review your patch since they&apos;re not a WebKit reviewer.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1343383</commentid>
    <comment_count>4</comment_count>
      <attachid>319321</attachid>
    <who name="Shiyu Zhang">shiyu.zhang</who>
    <bug_when>2017-08-29 18:45:32 -0700</bug_when>
    <thetext>Created attachment 319321
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1343385</commentid>
    <comment_count>5</comment_count>
    <who name="Shiyu Zhang">shiyu.zhang</who>
    <bug_when>2017-08-29 18:55:15 -0700</bug_when>
    <thetext>Thanks for reviewing the bug. I have created the patch, PTAL.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1343450</commentid>
    <comment_count>6</comment_count>
    <who name="Shiyu Zhang">shiyu.zhang</who>
    <bug_when>2017-08-29 21:37:58 -0700</bug_when>
    <thetext>I just noticed that BackboneJS suite may meet the same bug as well. The deleteButtons.length in resources/test.js for BackboneJS suite could be zero sometimes as I observed. This is even worse since unlike jQuery suite, BackboneJS suite will never crash even if deleteButtons.length is zero, which makes this bug difficult to be detected. Shall I file another bug to fix this issue?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1343750</commentid>
    <comment_count>7</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2017-08-30 15:40:35 -0700</bug_when>
    <thetext>(In reply to Shiyu Zhang from comment #6)
&gt; I just noticed that BackboneJS suite may meet the same bug as well. The
&gt; deleteButtons.length in resources/test.js for BackboneJS suite could be zero
&gt; sometimes as I observed. This is even worse since unlike jQuery suite,
&gt; BackboneJS suite will never crash even if deleteButtons.length is zero,
&gt; which makes this bug difficult to be detected. Shall I file another bug to
&gt; fix this issue?

Yes, please file a new bug and make it a blocker to 172339.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1343751</commentid>
    <comment_count>8</comment_count>
      <attachid>319321</attachid>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2017-08-30 15:41:38 -0700</bug_when>
    <thetext>Comment on attachment 319321
Patch

In the future, please also set cq flag to ? (to ask to be landed via commit queue).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1343753</commentid>
    <comment_count>9</comment_count>
      <attachid>319321</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2017-08-30 15:45:30 -0700</bug_when>
    <thetext>Comment on attachment 319321
Patch

Clearing flags on attachment: 319321

Committed r221401: &lt;http://trac.webkit.org/changeset/221401&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1343754</commentid>
    <comment_count>10</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2017-08-30 15:45:31 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1343756</commentid>
    <comment_count>11</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2017-08-30 15:46:29 -0700</bug_when>
    <thetext>&lt;rdar://problem/34174394&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>319169</attachid>
            <date>2017-08-28 01:49:12 -0700</date>
            <delta_ts>2017-08-29 18:45:27 -0700</delta_ts>
            <desc>A possible fix for jQuery test</desc>
            <filename>fix-jquery.pat</filename>
            <type>text/plain</type>
            <size>1453</size>
            <attacher name="Shiyu Zhang">shiyu.zhang</attacher>
            
              <data encoding="base64">SW5kZXg6IHJlc291cmNlcy90ZXN0cy5qcwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSByZXNvdXJjZXMvdGVzdHMu
anMJKHJldmlzaW9uIDIyMTEzMCkKKysrIHJlc291cmNlcy90ZXN0cy5qcwkod29ya2luZyBjb3B5
KQpAQCAtMzI2LDkgKzMyNiwxMCBAQAogICAgIG5hbWU6ICdqUXVlcnktVG9kb01WQycsCiAgICAg
dXJsOiAndG9kb212Yy9hcmNoaXRlY3R1cmUtZXhhbXBsZXMvanF1ZXJ5L2luZGV4Lmh0bWwnLAog
ICAgIHByZXBhcmU6IGZ1bmN0aW9uIChydW5uZXIsIGNvbnRlbnRXaW5kb3csIGNvbnRlbnREb2N1
bWVudCkgewotICAgICAgICByZXR1cm4gcnVubmVyLndhaXRGb3JFbGVtZW50KCcjb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gICAgIGR1bW15Tm9kZVRvTm90aWZ5QXBwSXNSZWFkeS5p
ZCA9ICdhcHBJc1JlYWR5JzsKKyAgICAgICAgICAgIGRvY3VtZW50LmJvZHkuYXBwZW5kQ2hpbGQo
ZHVtbXlOb2RlVG9Ob3RpZnlBcHBJc1JlYWR5KTsKICAgICAgICAgfSwKICAgICAgICAgYmluZEV2
ZW50czogZnVuY3Rpb24gKCkgewogICAgICAgICAgICAgJCgnI25ldy10b2RvJykub24oJ2tleXVw
JywgdGhpcy5jcmVhdGUuYmluZCh0aGlzKSk7Cg==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>319321</attachid>
            <date>2017-08-29 18:45:32 -0700</date>
            <delta_ts>2017-08-30 15:45:30 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-176017-20170830174517.patch</filename>
            <type>text/plain</type>
            <size>2508</size>
            <attacher name="Shiyu Zhang">shiyu.zhang</attacher>
            
              <data encoding="base64">SW5kZXg6IFBlcmZvcm1hbmNlVGVzdHMvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFBlcmZvcm1h
bmNlVGVzdHMvQ2hhbmdlTG9nCShyZXZpc2lvbiAyMjEzMzIpCisrKyBQZXJmb3JtYW5jZVRlc3Rz
L0NoYW5nZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDE3IEBACisyMDE3LTA4LTMwICBT
aGl5dSBaaGFuZyAgPHNoaXl1LnpoYW5nQGludGVsLmNvbT4KKworICAgICAgICBTcGVlZG9tZXRl
ciAyLjA6IGpRdWVyeSB0ZXN0IGZhaWxzIG9jY2FzaW9uYWxseQorICAgICAgICBodHRwczovL2J1
Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9MTc2MDE3CisKKyAgICAgICAgUmV2aWV3ZWQg
YnkgTk9CT0R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bGVzL2pxdWVyeS9pbmRleC5odG1sJywKICAgICBwcmVwYXJlOiBmdW5jdGlvbiAo
cnVubmVyLCBjb250ZW50V2luZG93LCBjb250ZW50RG9jdW1lbnQpIHsKLSAgICAgICAgcmV0dXJu
IHJ1bm5lci53YWl0Rm9yRWxlbWVudCgnI25ldy10b2RvJykudGhlbihmdW5jdGlvbiAoZWxlbWVu
dCkgewotICAgICAgICAgICAgZWxlbWVudC5mb2N1cygpOwotICAgICAgICAgICAgcmV0dXJuIGVs
ZW1lbnQ7CisgICAgICAgIHJldHVybiBydW5uZXIud2FpdEZvckVsZW1lbnQoJyNhcHBJc1JlYWR5
JykudGhlbihmdW5jdGlvbiAoZWxlbWVudCkgeworICAgICAgICAgICAgdmFyIG5ld1RvZG8gPSBj
b250ZW50RG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ25ldy10b2RvJyk7CisgICAgICAgICAgICBu
ZXdUb2RvLmZvY3VzKCk7CisgICAgICAgICAgICByZXR1cm4gbmV3VG9kbzsKICAgICAgICAgfSk7
CiAgICAgfSwKICAgICB0ZXN0czogWwpJbmRleDogUGVyZm9ybWFuY2VUZXN0cy9TcGVlZG9tZXRl
ci9yZXNvdXJjZXMvdG9kb212Yy9hcmNoaXRlY3R1cmUtZXhhbXBsZXMvanF1ZXJ5L2pzL2FwcC5q
cwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09Ci0tLSBQZXJmb3JtYW5jZVRlc3RzL1NwZWVkb21ldGVyL3Jlc291cmNlcy90
b2RvbXZjL2FyY2hpdGVjdHVyZS1leGFtcGxlcy9qcXVlcnkvanMvYXBwLmpzCShyZXZpc2lvbiAy
MjEyOTcpCisrKyBQZXJmb3JtYW5jZVRlc3RzL1NwZWVkb21ldGVyL3Jlc291cmNlcy90b2RvbXZj
L2FyY2hpdGVjdHVyZS1leGFtcGxlcy9qcXVlcnkvanMvYXBwLmpzCSh3b3JraW5nIGNvcHkpCkBA
IC00Niw2ICs0NiwxMCBAQCBqUXVlcnkoZnVuY3Rpb24gKCQpIHsKICAgICAgICAgICAgICAgICAg
ICAgdGhpcy5yZW5kZXIoKTsKICAgICAgICAgICAgICAgICB9LmJpbmQodGhpcykKICAgICAgICAg
ICAgIH0pLmluaXQoJy9hbGwnKTsKKworICAgICAgICAgICAgdmFyIGR1bW15Tm9kZVRvTm90aWZ5
QXBwSXNSZWFkeSA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ2RpdicpOworICAgICAgICAgICAg
ZHVtbXlOb2RlVG9Ob3RpZnlBcHBJc1JlYWR5LmlkID0gJ2FwcElzUmVhZHknOworICAgICAgICAg
ICAgZG9jdW1lbnQuYm9keS5hcHBlbmRDaGlsZChkdW1teU5vZGVUb05vdGlmeUFwcElzUmVhZHkp
OwogICAgICAgICB9LAogICAgICAgICBiaW5kRXZlbnRzOiBmdW5jdGlvbiAoKSB7CiAgICAgICAg
ICAgICAkKCcjbmV3LXRvZG8nKS5vbigna2V5dXAnLCB0aGlzLmNyZWF0ZS5iaW5kKHRoaXMpKTsK
</data>

          </attachment>
      

    </bug>

</bugzilla>