[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

andersca at apple.com andersca at apple.com
Wed Dec 22 15:03:58 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit ee727b11812f1f431268f91e6b6de4723a74d6d0
Author: andersca at apple.com <andersca at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Oct 27 20:10:20 2010 +0000

    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):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70696 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 9d64e5f..a5e587e 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,5 +1,21 @@
 2010-10-27  Anders Carlsson  <andersca at apple.com>
 
+        Reviewed by Sam Weinig.
+
+        WebPageProxy::isValid should return false if the page has been explicitly closed
+        https://bugs.webkit.org/show_bug.cgi?id=48458
+
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::WebPageProxy):
+        (WebKit::WebPageProxy::isValid):
+        (WebKit::WebPageProxy::relaunch):
+        (WebKit::WebPageProxy::close):
+        (WebKit::WebPageProxy::processDidCrash):
+        * UIProcess/WebPageProxy.h:
+        (WebKit::WebPageProxy::isClosed):
+
+2010-10-27  Anders Carlsson  <andersca at apple.com>
+
         Reviewed by Adam Roben.
 
         Begin stubbing out the Download class
diff --git a/WebKit2/UIProcess/WebPageProxy.cpp b/WebKit2/UIProcess/WebPageProxy.cpp
index 50fa864..e3e0f80 100644
--- a/WebKit2/UIProcess/WebPageProxy.cpp
+++ b/WebKit2/UIProcess/WebPageProxy.cpp
@@ -83,8 +83,8 @@ WebPageProxy::WebPageProxy(WebPageNamespace* pageNamespace, uint64_t pageID)
     , m_backForwardList(WebBackForwardList::create(this))
     , m_textZoomFactor(1)
     , m_pageZoomFactor(1)
-    , m_valid(true)
-    , m_closed(false)
+    , m_isValid(true)
+    , m_isClosed(false)
     , m_pageID(pageID)
 {
 #ifndef NDEBUG
@@ -106,7 +106,11 @@ WebProcessProxy* WebPageProxy::process() const
 
 bool WebPageProxy::isValid()
 {
-    return m_valid;
+    // A page that has been explicitly closed is never valid.
+    if (m_isClosed)
+        return false;
+
+    return m_isValid;
 }
 
 void WebPageProxy::setPageClient(PageClient* pageClient)
@@ -149,7 +153,7 @@ void WebPageProxy::initializeFindClient(const WKPageFindClient* client)
 
 void WebPageProxy::relaunch()
 {
-    m_valid = true;
+    m_isValid = true;
     m_pageNamespace->context()->relaunchProcessIfNecessary();
     m_pageNamespace->process()->addExistingWebPage(this, m_pageID);
 
@@ -181,7 +185,7 @@ void WebPageProxy::close()
     if (!isValid())
         return;
 
-    m_closed = true;
+    m_isClosed = true;
 
     process()->disconnectFramesFromPage(this);
     m_mainFrame = 0;
@@ -1206,7 +1210,7 @@ void WebPageProxy::processDidCrash()
 {
     ASSERT(m_pageClient);
 
-    m_valid = false;
+    m_isValid = false;
 
     if (m_mainFrame)
         m_urlAtProcessExit = m_mainFrame->url();
diff --git a/WebKit2/UIProcess/WebPageProxy.h b/WebKit2/UIProcess/WebPageProxy.h
index 444fa07..b45ae97 100644
--- a/WebKit2/UIProcess/WebPageProxy.h
+++ b/WebKit2/UIProcess/WebPageProxy.h
@@ -124,7 +124,7 @@ public:
 
     void close();
     bool tryClose();
-    bool isClosed() const { return m_closed; }
+    bool isClosed() const { return m_isClosed; }
 
     void loadURL(const String&);
     void loadURLRequest(WebURLRequest*);
@@ -362,8 +362,11 @@ private:
     double m_textZoomFactor;
     double m_pageZoomFactor;
     
-    bool m_valid;
-    bool m_closed;
+    // If the process backing the web page is alive and kicking.
+    bool m_isValid;
+
+    // Whether WebPageProxy::close() has been called on this page.
+    bool m_isClosed;
 
     uint64_t m_pageID;
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list