Changeset 70696 in webkit


Ignore:
Timestamp:
Oct 27, 2010 1:10:20 PM (13 years ago)
Author:
andersca@apple.com
Message:

WebPageProxy::isValid should return false if the page has been explicitly closed
https://bugs.webkit.org/show_bug.cgi?id=48458

Reviewed by Sam Weinig.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::isValid):
(WebKit::WebPageProxy::relaunch):
(WebKit::WebPageProxy::close):
(WebKit::WebPageProxy::processDidCrash):

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::isClosed):

Location:
trunk/WebKit2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit2/ChangeLog

    r70687 r70696  
     12010-10-27  Anders Carlsson  <andersca@apple.com>
     2
     3        Reviewed by Sam Weinig.
     4
     5        WebPageProxy::isValid should return false if the page has been explicitly closed
     6        https://bugs.webkit.org/show_bug.cgi?id=48458
     7
     8        * UIProcess/WebPageProxy.cpp:
     9        (WebKit::WebPageProxy::WebPageProxy):
     10        (WebKit::WebPageProxy::isValid):
     11        (WebKit::WebPageProxy::relaunch):
     12        (WebKit::WebPageProxy::close):
     13        (WebKit::WebPageProxy::processDidCrash):
     14        * UIProcess/WebPageProxy.h:
     15        (WebKit::WebPageProxy::isClosed):
     16
    1172010-10-27  Anders Carlsson  <andersca@apple.com>
    218
  • trunk/WebKit2/UIProcess/WebPageProxy.cpp

    r70676 r70696  
    8484    , m_textZoomFactor(1)
    8585    , m_pageZoomFactor(1)
    86     , m_valid(true)
    87     , m_closed(false)
     86    , m_isValid(true)
     87    , m_isClosed(false)
    8888    , m_pageID(pageID)
    8989{
     
    107107bool WebPageProxy::isValid()
    108108{
    109     return m_valid;
     109    // A page that has been explicitly closed is never valid.
     110    if (m_isClosed)
     111        return false;
     112
     113    return m_isValid;
    110114}
    111115
     
    150154void WebPageProxy::relaunch()
    151155{
    152     m_valid = true;
     156    m_isValid = true;
    153157    m_pageNamespace->context()->relaunchProcessIfNecessary();
    154158    m_pageNamespace->process()->addExistingWebPage(this, m_pageID);
     
    182186        return;
    183187
    184     m_closed = true;
     188    m_isClosed = true;
    185189
    186190    process()->disconnectFramesFromPage(this);
     
    12071211    ASSERT(m_pageClient);
    12081212
    1209     m_valid = false;
     1213    m_isValid = false;
    12101214
    12111215    if (m_mainFrame)
  • trunk/WebKit2/UIProcess/WebPageProxy.h

    r70676 r70696  
    125125    void close();
    126126    bool tryClose();
    127     bool isClosed() const { return m_closed; }
     127    bool isClosed() const { return m_isClosed; }
    128128
    129129    void loadURL(const String&);
     
    363363    double m_pageZoomFactor;
    364364   
    365     bool m_valid;
    366     bool m_closed;
     365    // If the process backing the web page is alive and kicking.
     366    bool m_isValid;
     367
     368    // Whether WebPageProxy::close() has been called on this page.
     369    bool m_isClosed;
    367370
    368371    uint64_t m_pageID;
Note: See TracChangeset for help on using the changeset viewer.