Changeset 85908 in webkit


Ignore:
Timestamp:
May 5, 2011 6:00:22 PM (13 years ago)
Author:
weinig@apple.com
Message:

2011-05-05 Sam Weinig <sam@webkit.org>

Reviewed by Anders Carlsson.

REGRESSION (r85689): Unresponsive timer firing when closing background tabs
<rdar://problem/9385988>
https://bugs.webkit.org/show_bug.cgi?id=60325

When calling WKPageTryClose(), if the page close succeeded, the notification to stop
the responsiveness timer would be dropped because the page was closed by the time it
got to the UIProcess.

  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::closePage):
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in: Add parameter to closePage stipulating whether or not to stop the responsiveness timer.
  • WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::tryClose): (WebKit::WebPage::sendClose): Instead of sending a StopResponsivenessTimer message after sending the ClosePage message, add a bit to the ClosePage message.
Location:
trunk/Source/WebKit2
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r85901 r85908  
     12011-05-05  Sam Weinig  <sam@webkit.org>
     2
     3        Reviewed by Anders Carlsson.
     4
     5        REGRESSION (r85689): Unresponsive timer firing when closing background tabs
     6        <rdar://problem/9385988>
     7        https://bugs.webkit.org/show_bug.cgi?id=60325
     8
     9        When calling WKPageTryClose(), if the page close succeeded, the notification to stop
     10        the responsiveness timer would be dropped because the page was closed by the time it
     11        got to the UIProcess.
     12
     13        * UIProcess/WebPageProxy.cpp:
     14        (WebKit::WebPageProxy::closePage):
     15        * UIProcess/WebPageProxy.h:
     16        * UIProcess/WebPageProxy.messages.in:
     17        Add parameter to closePage stipulating whether or not to stop the responsiveness timer.
     18
     19        * WebProcess/WebPage/WebPage.cpp:
     20        (WebKit::WebPage::tryClose):
     21        (WebKit::WebPage::sendClose):
     22        Instead of sending a StopResponsivenessTimer message after sending the ClosePage message,
     23        add a bit to the ClosePage message.
     24
    1252011-05-05  Dan Bernstein  <mitz@apple.com>
    226
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp

    r85860 r85908  
    19331933}
    19341934
    1935 void WebPageProxy::closePage()
    1936 {
     1935void WebPageProxy::closePage(bool stopResponsivenessTimer)
     1936{
     1937    if (stopResponsivenessTimer)
     1938        process()->responsivenessTimer()->stop();
     1939
    19371940    m_uiClient.close(this);
    19381941}
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.h

    r85860 r85908  
    572572    void createNewPage(const WebCore::WindowFeatures&, uint32_t modifiers, int32_t mouseButton, uint64_t& newPageID, WebPageCreationParameters&);
    573573    void showPage();
    574     void closePage();
     574    void closePage(bool stopResponsivenessTimer);
    575575    void runJavaScriptAlert(uint64_t frameID, const String&);
    576576    void runJavaScriptConfirm(uint64_t frameID, const String&, bool& result);
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in

    r85795 r85908  
    2525    CreateNewPage(WebCore::WindowFeatures windowFeatures, uint32_t modifiers, int32_t mouseButton) -> (uint64_t newPageID, WebKit::WebPageCreationParameters newPageParameters)
    2626    ShowPage()
    27     ClosePage()
     27    ClosePage(bool stopResponsivenessTimer)
    2828    RunJavaScriptAlert(uint64_t frameID, WTF::String message) -> ()
    2929    RunJavaScriptConfirm(uint64_t frameID, WTF::String message) -> (bool result)
  • trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp

    r85878 r85908  
    444444    SendStopResponsivenessTimer stopper(this);
    445445
    446     if (!m_mainFrame->coreFrame()->loader()->shouldClose())
    447         return;
    448 
    449     sendClose();
     446    if (!m_mainFrame->coreFrame()->loader()->shouldClose()) {
     447        send(Messages::WebPageProxy::StopResponsivenessTimer());
     448        return;
     449    }
     450
     451    send(Messages::WebPageProxy::ClosePage(true));
    450452}
    451453
    452454void WebPage::sendClose()
    453455{
    454     send(Messages::WebPageProxy::ClosePage());
     456    send(Messages::WebPageProxy::ClosePage(false));
    455457}
    456458
Note: See TracChangeset for help on using the changeset viewer.