Changeset 192528 in webkit


Ignore:
Timestamp:
Nov 17, 2015 1:31:57 PM (8 years ago)
Author:
ggaren@apple.com
Message:

A window with a hung tab waits 5s before closing
https://bugs.webkit.org/show_bug.cgi?id=151319

Reviewed by Anders Carlsson.

I manually tested that I did not break unload events upon window close
by running run-webkit-httpd and invoking a 1x1 image load of
http://127.0.0.1:8000/navigation/resources/save-Ping.php from an unload
handler.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::tryClose): Use the sudden termination bit to
close without waiting for a response.

  • UIProcess/WebProcessProxy.h:

(WebKit::WebProcessProxy::isSuddenTerminationEnabled): Expose the bit.

Location:
trunk/Source/WebKit2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r192510 r192528  
     12015-11-17  Geoffrey Garen  <ggaren@apple.com>
     2
     3        A window with a hung tab waits 5s before closing
     4        https://bugs.webkit.org/show_bug.cgi?id=151319
     5
     6        Reviewed by Anders Carlsson.
     7
     8        I manually tested that I did not break unload events upon window close
     9        by running run-webkit-httpd and invoking a 1x1 image load of
     10        http://127.0.0.1:8000/navigation/resources/save-Ping.php from an unload
     11        handler.
     12
     13        * UIProcess/WebPageProxy.cpp:
     14        (WebKit::WebPageProxy::tryClose): Use the sudden termination bit to
     15        close without waiting for a response.
     16
     17        * UIProcess/WebProcessProxy.h:
     18        (WebKit::WebProcessProxy::isSuddenTerminationEnabled): Expose the bit.
     19
    1202015-11-17  Carlos Garcia Campos  <cgarcia@igalia.com>
    221
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp

    r192437 r192528  
    862862        return true;
    863863
     864    // Close without delay if the process allows it. Our goal is to terminate
     865    // the process, so we check a per-process status bit.
     866    if (m_process->isSuddenTerminationEnabled())
     867        return true;
     868
    864869    m_process->send(Messages::WebPage::TryClose(), m_pageID);
    865870    m_process->responsivenessTimer().start();
  • trunk/Source/WebKit2/UIProcess/WebProcessProxy.h

    r191959 r192528  
    132132    void enableSuddenTermination();
    133133    void disableSuddenTermination();
     134    bool isSuddenTerminationEnabled() { return !m_numberOfTimesSuddenTerminationWasDisabled; }
    134135
    135136    void requestTermination();
Note: See TracChangeset for help on using the changeset viewer.