<?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>116039</bug_id>
          
          <creation_ts>2013-05-13 09:15:03 -0700</creation_ts>
          <short_desc>[WK2][Win] Fix ASSERT(DeleteTimerQueueTimer...)</short_desc>
          <delta_ts>2013-05-14 05:53:43 -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>WebKit2</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</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="Jocelyn Turcotte">jturcotte</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>hausmann</cc>
    
    <cc>jturcotte</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>888309</commentid>
    <comment_count>0</comment_count>
    <who name="Jocelyn Turcotte">jturcotte</who>
    <bug_when>2013-05-13 09:15:03 -0700</bug_when>
    <thetext>[WK2][Win] Fix ASSERT(DeleteTimerQueueTimer...)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>888310</commentid>
    <comment_count>1</comment_count>
      <attachid>201574</attachid>
    <who name="Jocelyn Turcotte">jturcotte</who>
    <bug_when>2013-05-13 09:16:41 -0700</bug_when>
    <thetext>Created attachment 201574
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>888324</commentid>
    <comment_count>2</comment_count>
      <attachid>201574</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2013-05-13 09:46:49 -0700</bug_when>
    <thetext>Comment on attachment 201574
Patch

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

&gt; Source/WebKit2/Platform/win/WorkQueueWin.cpp:231
&gt;      if (!::DeleteTimerQueueTimer(timerContext-&gt;queue-&gt;m_timerQueue, timerContext-&gt;timer, 0))
&gt; -        ASSERT_WITH_MESSAGE(false, &quot;::DeleteTimerQueueTimer failed with error %lu&quot;, ::GetLastError());
&gt; +        ASSERT_WITH_MESSAGE(::GetLastError() == ERROR_IO_PENDING, &quot;::DeleteTimerQueueTimer failed with error %lu&quot;, ::GetLastError());

OK, but that still doesn’t answer the question of whether the error is acceptable. Did the deletion fail in this case? Will the timer be left around?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>888340</commentid>
    <comment_count>3</comment_count>
    <who name="Jocelyn Turcotte">jturcotte</who>
    <bug_when>2013-05-13 10:15:44 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; OK, but that still doesn’t answer the question of whether the error is acceptable. Did the deletion fail in this case? Will the timer be left around?

Quoting the documentation:
&quot;If there are outstanding callback functions and CompletionEvent is NULL, the function will fail and set the error code to ERROR_IO_PENDING. This indicates that there are outstanding callback functions. Those callbacks either will execute or are in the middle of executing. The timer is cleaned up when the callback function is finished executing.&quot;

So if I read it right it should be properly cleaned in every case.
A bit of googling also reveals other projects not considering ERROR_IO_PENDING as an unexpected error in this situation.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>888696</commentid>
    <comment_count>4</comment_count>
      <attachid>201574</attachid>
    <who name="Benjamin Poulain">benjamin</who>
    <bug_when>2013-05-13 22:15:34 -0700</bug_when>
    <thetext>Comment on attachment 201574
Patch

The patch looks good given your last comment. But it looks like your comment should be in the code in this case. Otherwise anyone but you will find this assertion mysterious :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>888803</commentid>
    <comment_count>5</comment_count>
    <who name="Jocelyn Turcotte">jturcotte</who>
    <bug_when>2013-05-14 05:53:43 -0700</bug_when>
    <thetext>Committed r150068: &lt;http://trac.webkit.org/changeset/150068&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>201574</attachid>
            <date>2013-05-13 09:16:41 -0700</date>
            <delta_ts>2013-05-13 22:15:33 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>DeleteTimerQueueTimerAssert.patch</filename>
            <type>text/plain</type>
            <size>1586</size>
            <attacher name="Jocelyn Turcotte">jturcotte</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJLaXQyL0NoYW5nZUxvZyBiL1NvdXJjZS9XZWJLaXQyL0No
YW5nZUxvZwppbmRleCA0NDczZmFmLi4wOTUyNjkzIDEwMDY0NAotLS0gYS9Tb3VyY2UvV2ViS2l0
Mi9DaGFuZ2VMb2cKKysrIGIvU291cmNlL1dlYktpdDIvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMTYg
QEAKKzIwMTMtMDUtMTMgIEpvY2VseW4gVHVyY290dGUgIDxqb2NlbHluLnR1cmNvdHRlQGRpZ2lh
LmNvbT4KKworICAgICAgICBbV0syXVtXaW5dIEZpeCBBU1NFUlQoRGVsZXRlVGltZXJRdWV1ZVRp
bWVyLi4uKQorICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9
MTE2MDM5CisKKyAgICAgICAgUmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BTISkuCisKKyAgICAgICAg
QWNjb3JkaW5nIHRvIHRoZSBkb2N1bWVudGF0aW9uLCBEZWxldGVUaW1lclF1ZXVlVGltZXIgY2Fu
IGJlIGV4cGVjdGVkIHRvIHJldHVybgorICAgICAgICBmYWxzZSB3aXRoIGFuIEVSUk9SX0lPX1BF
TkRJTkcgZXJyb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aW1lciBmYWlsZWQgd2l0aCBlcnJvciAlbHUiLCA6OkdldExhc3RFcnJvcigpKTsKKyAgICAg
ICAgQVNTRVJUX1dJVEhfTUVTU0FHRSg6OkdldExhc3RFcnJvcigpID09IEVSUk9SX0lPX1BFTkRJ
TkcsICI6OkRlbGV0ZVRpbWVyUXVldWVUaW1lciBmYWlsZWQgd2l0aCBlcnJvciAlbHUiLCA6Okdl
dExhc3RFcnJvcigpKTsKIH0KIAogdm9pZCBXb3JrUXVldWU6OmRpc3BhdGNoQWZ0ZXJEZWxheShj
b25zdCBGdW5jdGlvbjx2b2lkKCk+JiBmdW5jdGlvbiwgZG91YmxlIGRlbGF5KQo=
</data>
<flag name="review"
          id="222936"
          type_id="1"
          status="+"
          setter="benjamin"
    />
    <flag name="commit-queue"
          id="222937"
          type_id="3"
          status="-"
          setter="benjamin"
    />
          </attachment>
      

    </bug>

</bugzilla>