Title: [242652] trunk/Source/WebKit
- Revision
- 242652
- Author
- cdu...@apple.com
- Date
- 2019-03-08 11:54:02 -0800 (Fri, 08 Mar 2019)
Log Message
Add assertions to help debug a WebProcessCache crash
https://bugs.webkit.org/show_bug.cgi?id=195469
Reviewed by Brady Eidson.
I suspect the process's registrableDomain in null when evictProcess() gets
called, thus crashing when lookup it up in the HashMap. Confirm this and
how this could happen via assertions.
* UIProcess/WebProcessCache.cpp:
(WebKit::WebProcessCache::evictProcess):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::didStartProvisionalLoadForMainFrame):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (242651 => 242652)
--- trunk/Source/WebKit/ChangeLog 2019-03-08 19:51:07 UTC (rev 242651)
+++ trunk/Source/WebKit/ChangeLog 2019-03-08 19:54:02 UTC (rev 242652)
@@ -1,3 +1,19 @@
+2019-03-08 Chris Dumez <cdu...@apple.com>
+
+ Add assertions to help debug a WebProcessCache crash
+ https://bugs.webkit.org/show_bug.cgi?id=195469
+
+ Reviewed by Brady Eidson.
+
+ I suspect the process's registrableDomain in null when evictProcess() gets
+ called, thus crashing when lookup it up in the HashMap. Confirm this and
+ how this could happen via assertions.
+
+ * UIProcess/WebProcessCache.cpp:
+ (WebKit::WebProcessCache::evictProcess):
+ * UIProcess/WebProcessProxy.cpp:
+ (WebKit::WebProcessProxy::didStartProvisionalLoadForMainFrame):
+
2019-03-08 Brady Eidson <beid...@apple.com>
Rename AssertionState::Download.
Modified: trunk/Source/WebKit/UIProcess/WebProcessCache.cpp (242651 => 242652)
--- trunk/Source/WebKit/UIProcess/WebProcessCache.cpp 2019-03-08 19:51:07 UTC (rev 242651)
+++ trunk/Source/WebKit/UIProcess/WebProcessCache.cpp 2019-03-08 19:54:02 UTC (rev 242652)
@@ -186,6 +186,7 @@
void WebProcessCache::evictProcess(WebProcessProxy& process)
{
+ RELEASE_ASSERT(!process.registrableDomain().isEmpty());
auto it = m_processesPerRegistrableDomain.find(process.registrableDomain());
ASSERT(it != m_processesPerRegistrableDomain.end());
ASSERT(&it->value->process() == &process);
Modified: trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp (242651 => 242652)
--- trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp 2019-03-08 19:51:07 UTC (rev 242651)
+++ trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp 2019-03-08 19:54:02 UTC (rev 242652)
@@ -1427,6 +1427,8 @@
void WebProcessProxy::didStartProvisionalLoadForMainFrame(const URL& url)
{
+ RELEASE_ASSERT(!isInProcessCache());
+
// This process has been used for several registrable domains already.
if (m_registrableDomain && m_registrableDomain->isNull())
return;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes