<?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>121232</bug_id>
          
          <creation_ts>2013-09-12 10:06:14 -0700</creation_ts>
          <short_desc>If UI delegate abort window.close() then second window.close() is a no-op</short_desc>
          <delta_ts>2016-08-11 02:19:31 -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>WebKit API</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></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="Allan Odgaard">CEC49BC5-C186-483E-A513-9DF2DEEAE27E</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>bfulgham</cc>
    
    <cc>pvollan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>928359</commentid>
    <comment_count>0</comment_count>
    <who name="Allan Odgaard">CEC49BC5-C186-483E-A513-9DF2DEEAE27E</who>
    <bug_when>2013-09-12 10:06:14 -0700</bug_when>
    <thetext>In WebView::closeWindowSoon() (WebView.cpp) m_closeWindowTimer is set to a timer, unless it’s already non-zero, in which case the function immediately returns.

Since m_closeWindowTimer is never set back to zero (even after the timer has fired), it means that if the HTML calls window.close() and the UI delegate decides not to dispose the web view, then any future call to window.close() will be a no-op.

A fix is likely to let WebView::closeWindowTimerFired() set “m_closeWindowTimer = 0;” (WebView.cpp)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>932606</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2013-09-24 10:03:06 -0700</bug_when>
    <thetext>Good catch.

Allan, would you be willing to submit a patch with a fix? Please see &lt;http://www.webkit.org/coding/contributing.html&gt; for some pointers and guidelines.

Changing platform from Mac to Windows, as the quoted code is in Windows WebKit.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>935378</commentid>
    <comment_count>2</comment_count>
      <attachid>213159</attachid>
    <who name="Allan Odgaard">CEC49BC5-C186-483E-A513-9DF2DEEAE27E</who>
    <bug_when>2013-10-02 03:18:16 -0700</bug_when>
    <thetext>Created attachment 213159
Fix missing zeroing of timer</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>935379</commentid>
    <comment_count>3</comment_count>
    <who name="Allan Odgaard">CEC49BC5-C186-483E-A513-9DF2DEEAE27E</who>
    <bug_when>2013-10-02 03:20:18 -0700</bug_when>
    <thetext>It should be a one line change which I attached a patch for.

I didn’t do any changelog, run tests, etc. as I do not have a build environment for WebKit. I ran into the issue working with the system’s standard WebView on OS X 10.8.4 and read through the source of WebKit to figure out why it didn’t behave as expected.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>935380</commentid>
    <comment_count>4</comment_count>
    <who name="Allan Odgaard">CEC49BC5-C186-483E-A513-9DF2DEEAE27E</who>
    <bug_when>2013-10-02 03:24:08 -0700</bug_when>
    <thetext>Disregard that patch, it leaks the timer.

Will update.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>935383</commentid>
    <comment_count>5</comment_count>
      <attachid>213161</attachid>
    <who name="Allan Odgaard">CEC49BC5-C186-483E-A513-9DF2DEEAE27E</who>
    <bug_when>2013-10-02 03:30:28 -0700</bug_when>
    <thetext>Created attachment 213161
Fix missing zeroing of timer (2)

This deletes the timer and replaces the previous patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1219097</commentid>
    <comment_count>6</comment_count>
    <who name="Allan Odgaard">CEC49BC5-C186-483E-A513-9DF2DEEAE27E</who>
    <bug_when>2016-08-10 13:17:55 -0700</bug_when>
    <thetext>Bump</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1219117</commentid>
    <comment_count>7</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2016-08-10 14:00:43 -0700</bug_when>
    <thetext>The patch is not marked for review, and doesn&apos;t have a ChangeLog.

While we are grateful for a contribution in any form, following the normal process can make it move faster.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1219287</commentid>
    <comment_count>8</comment_count>
    <who name="Allan Odgaard">CEC49BC5-C186-483E-A513-9DF2DEEAE27E</who>
    <bug_when>2016-08-11 02:19:31 -0700</bug_when>
    <thetext>As I am unfamiliar with your normal process and does not have a WebKit build environment (the patch was submitted only because it was requested from me), I would be grateful if someone else can follow the required steps to get this bug fixed.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>213159</attachid>
            <date>2013-10-02 03:18:16 -0700</date>
            <delta_ts>2013-10-02 03:18:16 -0700</delta_ts>
            <desc>Fix missing zeroing of timer</desc>
            <filename>WebView.patch</filename>
            <type>text/plain</type>
            <size>340</size>
            <attacher name="Allan Odgaard">CEC49BC5-C186-483E-A513-9DF2DEEAE27E</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJLaXQvd2luL1dlYlZpZXcuY3BwCj09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFNvdXJj
ZS9XZWJLaXQvd2luL1dlYlZpZXcuY3BwCShyZXZpc2lvbiAxNTU1MjUpCisrKyBTb3VyY2UvV2Vi
S2l0L3dpbi9XZWJWaWV3LmNwcAkod29ya2luZyBjb3B5KQpAQCAtMTI3Niw2ICsxMjc2LDcgQEAK
IAogdm9pZCBXZWJWaWV3OjpjbG9zZVdpbmRvd1RpbWVyRmlyZWQoKQogeworICAgIG1fY2xvc2VX
aW5kb3dUaW1lciA9IDA7CiAgICAgY2xvc2VXaW5kb3coKTsKICAgICBSZWxlYXNlKCk7CiB9Cg==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>213161</attachid>
            <date>2013-10-02 03:30:28 -0700</date>
            <delta_ts>2013-10-02 03:30:28 -0700</delta_ts>
            <desc>Fix missing zeroing of timer (2)</desc>
            <filename>webkit.patch</filename>
            <type>text/plain</type>
            <size>372</size>
            <attacher name="Allan Odgaard">CEC49BC5-C186-483E-A513-9DF2DEEAE27E</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJLaXQvd2luL1dlYlZpZXcuY3BwCj09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFNvdXJj
ZS9XZWJLaXQvd2luL1dlYlZpZXcuY3BwCShyZXZpc2lvbiAxNTU1MjUpCisrKyBTb3VyY2UvV2Vi
S2l0L3dpbi9XZWJWaWV3LmNwcAkod29ya2luZyBjb3B5KQpAQCAtMTI3Niw2ICsxMjc2LDggQEAK
IAogdm9pZCBXZWJWaWV3OjpjbG9zZVdpbmRvd1RpbWVyRmlyZWQoKQogeworICAgIGRlbGV0ZSBt
X2Nsb3NlV2luZG93VGltZXI7CisgICAgbV9jbG9zZVdpbmRvd1RpbWVyID0gMDsKICAgICBjbG9z
ZVdpbmRvdygpOwogICAgIFJlbGVhc2UoKTsKIH0K
</data>

          </attachment>
      

    </bug>

</bugzilla>