[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:20:43 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit c207acf11182ecd354ef95b9bd66569106591b37
Author: andersca at apple.com <andersca at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Nov 1 19:16:45 2010 +0000
Tear down the related WebProcessProxy when a WebContext is deallocated
https://bugs.webkit.org/show_bug.cgi?id=48769
Reviewed by John Sullivan.
WebKit2:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::~WebContext):
Call WebProcessManager::contextWasDestroyed.
(WebKit::WebContext::didNavigateWithNavigationData):
(WebKit::WebContext::didPerformClientRedirect):
(WebKit::WebContext::didPerformServerRedirect):
(WebKit::WebContext::didUpdateHistoryTitle):
It is valid for a frame to have a null page here, if the frame has outlived
its page.
* UIProcess/WebProcessManager.cpp:
(WebKit::WebProcessManager::contextWasDestroyed):
Remove the context from the map.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::~WebProcessProxy):
It's OK for the connection to be non-null here if the process goes away because
the context has been deallocated.
WebKitTools:
* TestWebKitAPI/Tests/WebKit2/FailedLoad.cpp:
(TestWebKitAPI::didFailProvisionalLoadWithErrorForFrame):
We don't support empty URLs anymore, update test to expect a null URL instead.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71044 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 9488ec8..f88dda9 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,30 @@
+2010-11-01 Anders Carlsson <andersca at apple.com>
+
+ Reviewed by John Sullivan.
+
+ Tear down the related WebProcessProxy when a WebContext is deallocated
+ https://bugs.webkit.org/show_bug.cgi?id=48769
+
+ * UIProcess/WebContext.cpp:
+ (WebKit::WebContext::~WebContext):
+ Call WebProcessManager::contextWasDestroyed.
+
+ (WebKit::WebContext::didNavigateWithNavigationData):
+ (WebKit::WebContext::didPerformClientRedirect):
+ (WebKit::WebContext::didPerformServerRedirect):
+ (WebKit::WebContext::didUpdateHistoryTitle):
+ It is valid for a frame to have a null page here, if the frame has outlived
+ its page.
+
+ * UIProcess/WebProcessManager.cpp:
+ (WebKit::WebProcessManager::contextWasDestroyed):
+ Remove the context from the map.
+
+ * UIProcess/WebProcessProxy.cpp:
+ (WebKit::WebProcessProxy::~WebProcessProxy):
+ It's OK for the connection to be non-null here if the process goes away because
+ the context has been deallocated.
+
2010-11-01 Brady Eidson <beidson at apple.com>
Windows build fix.
diff --git a/WebKit2/UIProcess/WebContext.cpp b/WebKit2/UIProcess/WebContext.cpp
index 5efc791..1884b62 100644
--- a/WebKit2/UIProcess/WebContext.cpp
+++ b/WebKit2/UIProcess/WebContext.cpp
@@ -105,6 +105,8 @@ WebContext::~WebContext()
ASSERT(m_pageNamespaces.isEmpty());
m_preferences->removeContext(this);
removeLanguageChangeObserver(this);
+
+ WebProcessManager::shared().contextWasDestroyed(this);
#ifndef NDEBUG
webContextCounter.decrement();
@@ -286,25 +288,33 @@ void WebContext::didReceiveSynchronousMessageFromInjectedBundle(const String& me
void WebContext::didNavigateWithNavigationData(WebFrameProxy* frame, const WebNavigationDataStore& store)
{
- ASSERT(frame->page());
+ if (!frame->page())
+ return;
+
m_historyClient.didNavigateWithNavigationData(this, frame->page(), store, frame);
}
void WebContext::didPerformClientRedirect(WebFrameProxy* frame, const String& sourceURLString, const String& destinationURLString)
{
- ASSERT(frame->page());
+ if (!frame->page())
+ return;
+
m_historyClient.didPerformClientRedirect(this, frame->page(), sourceURLString, destinationURLString, frame);
}
void WebContext::didPerformServerRedirect(WebFrameProxy* frame, const String& sourceURLString, const String& destinationURLString)
{
- ASSERT(frame->page());
+ if (!frame->page())
+ return;
+
m_historyClient.didPerformServerRedirect(this, frame->page(), sourceURLString, destinationURLString, frame);
}
void WebContext::didUpdateHistoryTitle(WebFrameProxy* frame, const String& title, const String& url)
{
- ASSERT(frame->page());
+ if (!frame->page())
+ return;
+
m_historyClient.didUpdateHistoryTitle(this, frame->page(), title, url, frame);
}
diff --git a/WebKit2/UIProcess/WebProcessManager.cpp b/WebKit2/UIProcess/WebProcessManager.cpp
index ad78215..94556f8 100644
--- a/WebKit2/UIProcess/WebProcessManager.cpp
+++ b/WebKit2/UIProcess/WebProcessManager.cpp
@@ -87,4 +87,9 @@ void WebProcessManager::processDidClose(WebProcessProxy* process, WebContext* co
ASSERT_NOT_REACHED();
}
+void WebProcessManager::contextWasDestroyed(WebContext* context)
+{
+ m_processMap.remove(context);
+}
+
} // namespace WebKit
diff --git a/WebKit2/UIProcess/WebProcessManager.h b/WebKit2/UIProcess/WebProcessManager.h
index 77d0109..320829e 100644
--- a/WebKit2/UIProcess/WebProcessManager.h
+++ b/WebKit2/UIProcess/WebProcessManager.h
@@ -39,6 +39,8 @@ public:
WebProcessProxy* getWebProcess(WebContext*);
void processDidClose(WebProcessProxy*, WebContext*);
+ void contextWasDestroyed(WebContext*);
+
private:
WebProcessManager();
diff --git a/WebKit2/UIProcess/WebProcessProxy.cpp b/WebKit2/UIProcess/WebProcessProxy.cpp
index 8b0ac99..ac31133 100644
--- a/WebKit2/UIProcess/WebProcessProxy.cpp
+++ b/WebKit2/UIProcess/WebProcessProxy.cpp
@@ -63,7 +63,10 @@ WebProcessProxy::WebProcessProxy(WebContext* context)
WebProcessProxy::~WebProcessProxy()
{
- ASSERT(!m_connection);
+ ASSERT(m_pageMap.isEmpty());
+
+ if (m_connection)
+ m_connection->invalidate();
for (size_t i = 0; i < m_pendingMessages.size(); ++i)
m_pendingMessages[i].releaseArguments();
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index d11d585..b047da8 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,14 @@
+2010-11-01 Anders Carlsson <andersca at apple.com>
+
+ Reviewed by John Sullivan.
+
+ Tear down the related WebProcessProxy when a WebContext is deallocated
+ https://bugs.webkit.org/show_bug.cgi?id=48769
+
+ * TestWebKitAPI/Tests/WebKit2/FailedLoad.cpp:
+ (TestWebKitAPI::didFailProvisionalLoadWithErrorForFrame):
+ We don't support empty URLs anymore, update test to expect a null URL instead.
+
2010-11-01 Søren Gjesse <sgjesse at chromium.org>
Reviewed by Andreas Kling.
diff --git a/WebKitTools/TestWebKitAPI/Tests/WebKit2/FailedLoad.cpp b/WebKitTools/TestWebKitAPI/Tests/WebKit2/FailedLoad.cpp
index b7db746..0ccee5a 100644
--- a/WebKitTools/TestWebKitAPI/Tests/WebKit2/FailedLoad.cpp
+++ b/WebKitTools/TestWebKitAPI/Tests/WebKit2/FailedLoad.cpp
@@ -41,10 +41,7 @@ static void didFailProvisionalLoadWithErrorForFrame(WKPageRef page, WKFrameRef f
TEST_ASSERT(WKFrameGetFrameLoadState(frame) == kWKFrameLoadStateFinished);
WKURLRef url = WKFrameCopyProvisionalURL(frame);
- WKURLRef emptyURL = WKURLCreateWithUTF8CString("");
- TEST_ASSERT(WKURLIsEqual(url, emptyURL));
- WKRelease(url);
- WKRelease(emptyURL);
+ TEST_ASSERT(!url);
testDone = true;
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list