Diff
Modified: trunk/Source/WebKit2/ChangeLog (184369 => 184370)
--- trunk/Source/WebKit2/ChangeLog 2015-05-15 04:36:27 UTC (rev 184369)
+++ trunk/Source/WebKit2/ChangeLog 2015-05-15 04:39:51 UTC (rev 184370)
@@ -1,3 +1,60 @@
+2015-05-14 Brady Eidson <beid...@apple.com>
+
+ Rename connectionDidClose and related methods to be more clear.
+ https://bugs.webkit.org/show_bug.cgi?id=145030
+
+ Reviewed by Darin Adler.
+
+ These methods were easy to confuse with "Connection::Client::didClose()", yet they
+ were about something much more explicit: A child process being shut down by the UI Process.
+
+ Let's call them as such.
+
+ * Shared/ChildProcessProxy.cpp:
+ (WebKit::ChildProcessProxy::shutDownProcess):
+ (WebKit::ChildProcessProxy::clearConnection): Deleted.
+ (WebKit::ChildProcessProxy::connectionDidClose): Deleted.
+ * Shared/ChildProcessProxy.h:
+
+ * UIProcess/Databases/DatabaseProcessProxy.cpp:
+ (WebKit::DatabaseProcessProxy::processWillShutDown):
+ * UIProcess/Databases/DatabaseProcessProxy.h:
+
+ * UIProcess/Network/NetworkProcessProxy.cpp:
+ (WebKit::NetworkProcessProxy::processWillShutDown):
+ * UIProcess/Network/NetworkProcessProxy.h:
+
+ * UIProcess/Plugins/PluginProcessProxy.cpp:
+ (WebKit::PluginProcessProxy::processWillShutDown):
+ * UIProcess/Plugins/PluginProcessProxy.h:
+
+ * UIProcess/WebFrameProxy.cpp:
+ (WebKit::WebFrameProxy::webProcessWillShutDown):
+ (WebKit::WebFrameProxy::disconnect): Deleted.
+ * UIProcess/WebFrameProxy.h:
+
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::webProcessWillShutDown):
+ (WebKit::WebPageProxy::connectionDidClose): Deleted.
+ * UIProcess/WebPageProxy.h:
+
+ * UIProcess/WebProcessLifetimeTracker.cpp:
+ (WebKit::WebProcessLifetimeTracker::webProcessWillShutDown):
+ (WebKit::WebProcessLifetimeTracker::connectionDidClose): Deleted.
+ * UIProcess/WebProcessLifetimeTracker.h:
+
+ * UIProcess/WebProcessProxy.cpp:
+ (WebKit::WebProcessProxy::processWillShutDown):
+ (WebKit::WebProcessProxy::shutDown):
+ (WebKit::WebProcessProxy::removeWebPage):
+ (WebKit::WebProcessProxy::didClose):
+ (WebKit::WebProcessProxy::disconnectFramesFromPage):
+ (WebKit::WebProcessProxy::shouldTerminate):
+ (WebKit::WebProcessProxy::requestTermination):
+ (WebKit::WebProcessProxy::connectionDidClose): Deleted.
+ (WebKit::WebProcessProxy::disconnect): Deleted.
+ * UIProcess/WebProcessProxy.h:
+
2015-05-14 Zhuo Li <zac...@apple.com>
Some CFNetwork SPI to reset HSTS hosts added since a date should not be used on Yosemite.
Modified: trunk/Source/WebKit2/Shared/ChildProcessProxy.cpp (184369 => 184370)
--- trunk/Source/WebKit2/Shared/ChildProcessProxy.cpp 2015-05-15 04:36:27 UTC (rev 184369)
+++ trunk/Source/WebKit2/Shared/ChildProcessProxy.cpp 2015-05-15 04:39:51 UTC (rev 184370)
@@ -159,13 +159,12 @@
m_processLauncher = nullptr;
}
-void ChildProcessProxy::clearConnection()
+void ChildProcessProxy::shutDownProcess()
{
if (!m_connection)
return;
- // FIXME: Call this after the connection has been invalidated.
- connectionDidClose(*m_connection);
+ processWillShutDown(*m_connection);
m_connection->invalidate();
m_connection = nullptr;
@@ -175,8 +174,4 @@
{
}
-void ChildProcessProxy::connectionDidClose(IPC::Connection&)
-{
-}
-
} // namespace WebKit
Modified: trunk/Source/WebKit2/Shared/ChildProcessProxy.h (184369 => 184370)
--- trunk/Source/WebKit2/Shared/ChildProcessProxy.h 2015-05-15 04:36:27 UTC (rev 184369)
+++ trunk/Source/WebKit2/Shared/ChildProcessProxy.h 2015-05-15 04:39:51 UTC (rev 184370)
@@ -73,7 +73,7 @@
bool sendMessage(std::unique_ptr<IPC::MessageEncoder>, unsigned messageSendFlags);
protected:
- void clearConnection();
+ void shutDownProcess();
void abortProcessLaunchIfNeeded();
// ProcessLauncher::Client
@@ -85,7 +85,7 @@
private:
virtual void getLaunchOptions(ProcessLauncher::LaunchOptions&) = 0;
virtual void connectionWillOpen(IPC::Connection&);
- virtual void connectionDidClose(IPC::Connection&);
+ virtual void processWillShutDown(IPC::Connection&) = 0;
Vector<std::pair<std::unique_ptr<IPC::MessageEncoder>, unsigned>> m_pendingMessages;
RefPtr<ProcessLauncher> m_processLauncher;
Modified: trunk/Source/WebKit2/UIProcess/Databases/DatabaseProcessProxy.cpp (184369 => 184370)
--- trunk/Source/WebKit2/UIProcess/Databases/DatabaseProcessProxy.cpp 2015-05-15 04:36:27 UTC (rev 184369)
+++ trunk/Source/WebKit2/UIProcess/Databases/DatabaseProcessProxy.cpp 2015-05-15 04:39:51 UTC (rev 184370)
@@ -72,6 +72,11 @@
platformGetLaunchOptions(launchOptions);
}
+void DatabaseProcessProxy::processWillShutDown(IPC::Connection& connection)
+{
+ ASSERT_UNUSED(connection, this->connection() == &connection);
+}
+
void DatabaseProcessProxy::didReceiveMessage(IPC::Connection& connection, IPC::MessageDecoder& decoder)
{
if (decoder.messageReceiverName() == Messages::DatabaseProcessProxy::messageReceiverName()) {
Modified: trunk/Source/WebKit2/UIProcess/Databases/DatabaseProcessProxy.h (184369 => 184370)
--- trunk/Source/WebKit2/UIProcess/Databases/DatabaseProcessProxy.h 2015-05-15 04:36:27 UTC (rev 184369)
+++ trunk/Source/WebKit2/UIProcess/Databases/DatabaseProcessProxy.h 2015-05-15 04:39:51 UTC (rev 184370)
@@ -59,6 +59,7 @@
// ChildProcessProxy
virtual void getLaunchOptions(ProcessLauncher::LaunchOptions&) override;
+ virtual void processWillShutDown(IPC::Connection&) override;
// IPC::Connection::Client
virtual void didReceiveMessage(IPC::Connection&, IPC::MessageDecoder&) override;
Modified: trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp (184369 => 184370)
--- trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp 2015-05-15 04:36:27 UTC (rev 184369)
+++ trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp 2015-05-15 04:39:51 UTC (rev 184370)
@@ -95,6 +95,11 @@
#endif
}
+void NetworkProcessProxy::processWillShutDown(IPC::Connection& connection)
+{
+ ASSERT_UNUSED(connection, this->connection() == &connection);
+}
+
void NetworkProcessProxy::getNetworkProcessConnection(PassRefPtr<Messages::WebProcessProxy::GetNetworkProcessConnection::DelayedReply> reply)
{
m_pendingConnectionReplies.append(reply);
Modified: trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.h (184369 => 184370)
--- trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.h 2015-05-15 04:36:27 UTC (rev 184369)
+++ trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.h 2015-05-15 04:39:51 UTC (rev 184370)
@@ -82,6 +82,7 @@
// ChildProcessProxy
virtual void getLaunchOptions(ProcessLauncher::LaunchOptions&) override;
virtual void connectionWillOpen(IPC::Connection&) override;
+ virtual void processWillShutDown(IPC::Connection&) override;
void platformGetLaunchOptions(ProcessLauncher::LaunchOptions&);
void networkProcessCrashedOrFailedToLaunch();
Modified: trunk/Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.cpp (184369 => 184370)
--- trunk/Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.cpp 2015-05-15 04:36:27 UTC (rev 184369)
+++ trunk/Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.cpp 2015-05-15 04:39:51 UTC (rev 184370)
@@ -82,6 +82,11 @@
platformGetLaunchOptions(launchOptions, m_pluginProcessAttributes);
}
+void PluginProcessProxy::processWillShutDown(IPC::Connection& connection)
+{
+ ASSERT_UNUSED(connection, this->connection() == &connection);
+}
+
// Asks the plug-in process to create a new connection to a web process. The connection identifier will be
// encoded in the given argument encoder and sent back to the connection of the given web process.
void PluginProcessProxy::getPluginProcessConnection(PassRefPtr<Messages::WebProcessProxy::GetPluginProcessConnection::DelayedReply> reply)
Modified: trunk/Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.h (184369 => 184370)
--- trunk/Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.h 2015-05-15 04:36:27 UTC (rev 184369)
+++ trunk/Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.h 2015-05-15 04:39:51 UTC (rev 184370)
@@ -111,6 +111,7 @@
virtual void getLaunchOptions(ProcessLauncher::LaunchOptions&) override;
void platformGetLaunchOptions(ProcessLauncher::LaunchOptions&, const PluginProcessAttributes&);
+ virtual void processWillShutDown(IPC::Connection&) override;
void pluginProcessCrashedOrFailedToLaunch();
Modified: trunk/Source/WebKit2/UIProcess/WebFrameProxy.cpp (184369 => 184370)
--- trunk/Source/WebKit2/UIProcess/WebFrameProxy.cpp 2015-05-15 04:36:27 UTC (rev 184369)
+++ trunk/Source/WebKit2/UIProcess/WebFrameProxy.cpp 2015-05-15 04:39:51 UTC (rev 184370)
@@ -55,7 +55,7 @@
WebProcessPool::statistics().wkFrameCount--;
}
-void WebFrameProxy::disconnect()
+void WebFrameProxy::webProcessWillShutDown()
{
m_page = 0;
Modified: trunk/Source/WebKit2/UIProcess/WebFrameProxy.h (184369 => 184370)
--- trunk/Source/WebKit2/UIProcess/WebFrameProxy.h 2015-05-15 04:36:27 UTC (rev 184369)
+++ trunk/Source/WebKit2/UIProcess/WebFrameProxy.h 2015-05-15 04:39:51 UTC (rev 184370)
@@ -73,7 +73,7 @@
uint64_t frameID() const { return m_frameID; }
WebPageProxy* page() const { return m_page; }
- void disconnect();
+ void webProcessWillShutDown();
bool isMainFrame() const;
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (184369 => 184370)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp 2015-05-15 04:36:27 UTC (rev 184369)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp 2015-05-15 04:39:51 UTC (rev 184370)
@@ -3516,11 +3516,9 @@
m_webProcessLifetimeTracker.connectionWillOpen(connection);
}
-void WebPageProxy::connectionDidClose(IPC::Connection& connection)
+void WebPageProxy::webProcessWillShutDown()
{
- ASSERT_UNUSED(connection, &connection == m_process->connection());
-
- m_webProcessLifetimeTracker.connectionDidClose(connection);
+ m_webProcessLifetimeTracker.webProcessWillShutDown();
}
void WebPageProxy::processDidFinishLaunching()
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (184369 => 184370)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2015-05-15 04:36:27 UTC (rev 184369)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2015-05-15 04:39:51 UTC (rev 184370)
@@ -964,7 +964,7 @@
void didCancelCheckingText(uint64_t requestID);
void connectionWillOpen(IPC::Connection&);
- void connectionDidClose(IPC::Connection&);
+ void webProcessWillShutDown();
void processDidFinishLaunching();
Modified: trunk/Source/WebKit2/UIProcess/WebProcessLifetimeTracker.cpp (184369 => 184370)
--- trunk/Source/WebKit2/UIProcess/WebProcessLifetimeTracker.cpp 2015-05-15 04:36:27 UTC (rev 184369)
+++ trunk/Source/WebKit2/UIProcess/WebProcessLifetimeTracker.cpp 2015-05-15 04:39:51 UTC (rev 184370)
@@ -60,7 +60,7 @@
observer->addWebPage(m_webPageProxy);
}
-void WebProcessLifetimeTracker::connectionDidClose(IPC::Connection&)
+void WebProcessLifetimeTracker::webProcessWillShutDown()
{
ASSERT(processIsRunning());
Modified: trunk/Source/WebKit2/UIProcess/WebProcessLifetimeTracker.h (184369 => 184370)
--- trunk/Source/WebKit2/UIProcess/WebProcessLifetimeTracker.h 2015-05-15 04:36:27 UTC (rev 184369)
+++ trunk/Source/WebKit2/UIProcess/WebProcessLifetimeTracker.h 2015-05-15 04:39:51 UTC (rev 184370)
@@ -45,7 +45,7 @@
void addObserver(WebProcessLifetimeObserver&);
void connectionWillOpen(IPC::Connection&);
- void connectionDidClose(IPC::Connection&);
+ void webProcessWillShutDown();
void pageWasInvalidated();
Modified: trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp (184369 => 184370)
--- trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp 2015-05-15 04:36:27 UTC (rev 184369)
+++ trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp 2015-05-15 04:39:51 UTC (rev 184370)
@@ -147,9 +147,9 @@
page->connectionWillOpen(connection);
}
-void WebProcessProxy::connectionDidClose(IPC::Connection& connection)
+void WebProcessProxy::processWillShutDown(IPC::Connection& connection)
{
- ASSERT(this->connection() == &connection);
+ ASSERT_UNUSED(connection, this->connection() == &connection);
for (const auto& callback : m_pendingFetchWebsiteDataCallbacks.values())
callback(WebsiteData());
@@ -164,14 +164,14 @@
m_pendingDeleteWebsiteDataForOriginsCallbacks.clear();
for (auto& page : m_pageMap.values())
- page->connectionDidClose(connection);
+ page->webProcessWillShutDown();
releaseRemainingIconsForPageURLs();
}
-void WebProcessProxy::disconnect()
+void WebProcessProxy::shutDown()
{
- clearConnection();
+ shutDownProcess();
if (m_webConnection) {
m_webConnection->invalidate();
@@ -185,7 +185,7 @@
copyValuesToVector(m_frameMap, frames);
for (size_t i = 0, size = frames.size(); i < size; ++i)
- frames[i]->disconnect();
+ frames[i]->webProcessWillShutDown();
m_frameMap.clear();
if (m_downloadProxyMap)
@@ -249,13 +249,13 @@
#if PLATFORM(IOS)
if (state() == State::Running) {
- // On iOS deploy a watchdog in the UI process, since the content may be suspended.
- // 30s should be sufficient for any outstanding activity to complete cleanly.
+ // On iOS deploy a watchdog in the UI process, since the child process may be suspended.
+ // If 30s is insufficient for any outstanding activity to complete cleanly, then it will be killed.
connection()->terminateSoon(30);
}
#endif
- disconnect();
+ shutDown();
}
void WebProcessProxy::addVisitedLinkProvider(VisitedLinkProvider& provider)
@@ -527,7 +527,7 @@
Vector<RefPtr<WebPageProxy>> pages;
copyValuesToVector(m_pageMap, pages);
- disconnect();
+ shutDown();
for (size_t i = 0, size = pages.size(); i < size; ++i)
pages[i]->processDidCrash();
@@ -628,7 +628,7 @@
copyValuesToVector(m_frameMap, frames);
for (size_t i = 0, size = frames.size(); i < size; ++i) {
if (frames[i]->page() == page)
- frames[i]->disconnect();
+ frames[i]->webProcessWillShutDown();
}
}
@@ -663,8 +663,8 @@
{
shouldTerminate = canTerminateChildProcess();
if (shouldTerminate) {
- // We know that the web process is going to terminate so disconnect it from the process pool.
- disconnect();
+ // We know that the web process is going to terminate so start shutting it down in the UI process.
+ shutDown();
}
}
@@ -765,7 +765,7 @@
if (webConnection())
webConnection()->didClose();
- disconnect();
+ shutDown();
}
void WebProcessProxy::enableSuddenTermination()
Modified: trunk/Source/WebKit2/UIProcess/WebProcessProxy.h (184369 => 184370)
--- trunk/Source/WebKit2/UIProcess/WebProcessProxy.h 2015-05-15 04:36:27 UTC (rev 184369)
+++ trunk/Source/WebKit2/UIProcess/WebProcessProxy.h 2015-05-15 04:39:51 UTC (rev 184370)
@@ -157,11 +157,11 @@
virtual void getLaunchOptions(ProcessLauncher::LaunchOptions&) override;
void platformGetLaunchOptions(ProcessLauncher::LaunchOptions&);
virtual void connectionWillOpen(IPC::Connection&) override;
- virtual void connectionDidClose(IPC::Connection&) override;
+ virtual void processWillShutDown(IPC::Connection&) override;
// Called when the web process has crashed or we know that it will terminate soon.
// Will potentially cause the WebProcessProxy object to be freed.
- void disconnect();
+ void shutDown();
// IPC message handlers.
void addBackForwardItem(uint64_t itemID, uint64_t pageID, const PageState&);