Title: [171303] trunk/Source/WebKit2
- Revision
- 171303
- Author
- [email protected]
- Date
- 2014-07-21 10:14:15 -0700 (Mon, 21 Jul 2014)
Log Message
DatabaseProcess doesn't relaunch after crashing.
<rdar://problem/17717343> and https://bugs.webkit.org/show_bug.cgi?id=135117
Reviewed by Alexey Proskuryakov.
* UIProcess/Databases/DatabaseProcessProxy.cpp:
(WebKit::DatabaseProcessProxy::didClose): Tell the WebContext.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::databaseProcessCrashed): Notify supplements, then clear the DatabaseProcessProxy pointer.
* UIProcess/WebContext.h:
* UIProcess/WebContextSupplement.h:
(WebKit::WebContextSupplement::processDidClose): Added. No users right now, but the patch in bug 135035 will need this.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (171302 => 171303)
--- trunk/Source/WebKit2/ChangeLog 2014-07-21 16:50:23 UTC (rev 171302)
+++ trunk/Source/WebKit2/ChangeLog 2014-07-21 17:14:15 UTC (rev 171303)
@@ -1,3 +1,20 @@
+2014-07-21 Brady Eidson <[email protected]>
+
+ DatabaseProcess doesn't relaunch after crashing.
+ <rdar://problem/17717343> and https://bugs.webkit.org/show_bug.cgi?id=135117
+
+ Reviewed by Alexey Proskuryakov.
+
+ * UIProcess/Databases/DatabaseProcessProxy.cpp:
+ (WebKit::DatabaseProcessProxy::didClose): Tell the WebContext.
+
+ * UIProcess/WebContext.cpp:
+ (WebKit::WebContext::databaseProcessCrashed): Notify supplements, then clear the DatabaseProcessProxy pointer.
+ * UIProcess/WebContext.h:
+
+ * UIProcess/WebContextSupplement.h:
+ (WebKit::WebContextSupplement::processDidClose): Added. No users right now, but the patch in bug 135035 will need this.
+
2014-07-20 KwangHyuk Kim <[email protected]>
Fix warnings caused by unused parameter.
Modified: trunk/Source/WebKit2/UIProcess/Databases/DatabaseProcessProxy.cpp (171302 => 171303)
--- trunk/Source/WebKit2/UIProcess/Databases/DatabaseProcessProxy.cpp 2014-07-21 16:50:23 UTC (rev 171302)
+++ trunk/Source/WebKit2/UIProcess/Databases/DatabaseProcessProxy.cpp 2014-07-21 17:14:15 UTC (rev 171303)
@@ -80,6 +80,22 @@
void DatabaseProcessProxy::didClose(IPC::Connection*)
{
+ // The database process must have crashed or exited, so send any pending sync replies we might have.
+ while (!m_pendingConnectionReplies.isEmpty()) {
+ auto reply = m_pendingConnectionReplies.takeFirst();
+
+#if OS(DARWIN)
+ reply->send(IPC::Attachment(0, MACH_MSG_TYPE_MOVE_SEND));
+#elif USE(UNIX_DOMAIN_SOCKETS)
+ reply->send(IPC::Attachment());
+#else
+ notImplemented();
+#endif
+ }
+
+ // Tell WebContext to forget about this database process. This may cause us to be deleted.
+ m_webContext->databaseProcessCrashed(this);
+
}
void DatabaseProcessProxy::didReceiveInvalidMessage(IPC::Connection*, IPC::StringReference messageReceiverName, IPC::StringReference messageName)
Modified: trunk/Source/WebKit2/UIProcess/WebContext.cpp (171302 => 171303)
--- trunk/Source/WebKit2/UIProcess/WebContext.cpp 2014-07-21 16:50:23 UTC (rev 171302)
+++ trunk/Source/WebKit2/UIProcess/WebContext.cpp 2014-07-21 17:14:15 UTC (rev 171303)
@@ -488,6 +488,17 @@
m_databaseProcess->getDatabaseProcessConnection(reply);
}
+
+void WebContext::databaseProcessCrashed(DatabaseProcessProxy* databaseProcessProxy)
+{
+ ASSERT(m_databaseProcess);
+ ASSERT(databaseProcessProxy == m_databaseProcess.get());
+
+ for (auto& supplement : m_supplements)
+ supplement.value->processDidClose(databaseProcessProxy);
+
+ m_databaseProcess = nullptr;
+}
#endif
void WebContext::willStartUsingPrivateBrowsing()
Modified: trunk/Source/WebKit2/UIProcess/WebContext.h (171302 => 171303)
--- trunk/Source/WebKit2/UIProcess/WebContext.h 2014-07-21 16:50:23 UTC (rev 171302)
+++ trunk/Source/WebKit2/UIProcess/WebContext.h 2014-07-21 17:14:15 UTC (rev 171303)
@@ -302,6 +302,7 @@
#if ENABLE(DATABASE_PROCESS)
void ensureDatabaseProcess();
void getDatabaseProcessConnection(PassRefPtr<Messages::WebProcessProxy::GetDatabaseProcessConnection::DelayedReply>);
+ void databaseProcessCrashed(DatabaseProcessProxy*);
#endif
#if PLATFORM(COCOA)
Modified: trunk/Source/WebKit2/UIProcess/WebContextSupplement.h (171302 => 171303)
--- trunk/Source/WebKit2/UIProcess/WebContextSupplement.h 2014-07-21 16:50:23 UTC (rev 171302)
+++ trunk/Source/WebKit2/UIProcess/WebContextSupplement.h 2014-07-21 17:14:15 UTC (rev 171303)
@@ -28,6 +28,7 @@
namespace WebKit {
+class DatabaseProcessProxy;
class NetworkProcessProxy;
class WebContext;
class WebProcessProxy;
@@ -55,6 +56,10 @@
{
}
+ virtual void processDidClose(DatabaseProcessProxy*)
+ {
+ }
+
virtual bool shouldTerminate(WebProcessProxy*) const
{
return true;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes