WebKit Bugzilla
Attachment 369980 Details for
Bug 197856
: Add assertions to help diagnose crash at WebProcessProxy::processPool()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for landing
bug-197856-20190515121014.patch (text/plain), 4.27 KB, created by
Sihui Liu
on 2019-05-15 12:10:15 PDT
(
hide
)
Description:
Patch for landing
Filename:
MIME Type:
Creator:
Sihui Liu
Created:
2019-05-15 12:10:15 PDT
Size:
4.27 KB
patch
obsolete
>Subversion Revision: 245315 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 44ebe141a21d969570e6f01c9efee99c9a9eb179..5a0edf935e02669e3ebed94341372135cedc7d79 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,19 @@ >+2019-05-14 Sihui Liu <sihui_liu@apple.com> >+ >+ Add assertions to help diagnose crash at WebProcessProxy::processPool() >+ https://bugs.webkit.org/show_bug.cgi?id=197856 >+ <rdar://problem/49341366> >+ >+ Reviewed by Chris Dumez. >+ >+ * UIProcess/WebProcessCache.cpp: >+ (WebKit::WebProcessCache::CachedProcess::CachedProcess): >+ * UIProcess/WebProcessLifetimeObserver.cpp: >+ (WebKit::WebProcessLifetimeObserver::addWebPage): >+ (WebKit::WebProcessLifetimeObserver::removeWebPage): >+ * UIProcess/WebProcessLifetimeObserver.h: >+ (WebKit::WebProcessLifetimeObserver::hasProcess const): >+ > 2019-05-14 Ross Kirsling <ross.kirsling@sony.com> > > Unreviewed restoration of non-unified build. >diff --git a/Source/WebKit/UIProcess/WebProcessCache.cpp b/Source/WebKit/UIProcess/WebProcessCache.cpp >index 797d7e5cca8a75261068ba6dd7271aebc5480d6b..88177b1485bdfeb1cfd6c127586d8b5b7dee9f73 100644 >--- a/Source/WebKit/UIProcess/WebProcessCache.cpp >+++ b/Source/WebKit/UIProcess/WebProcessCache.cpp >@@ -246,6 +246,8 @@ WebProcessCache::CachedProcess::CachedProcess(Ref<WebProcessProxy>&& process) > : m_process(WTFMove(process)) > , m_evictionTimer(RunLoop::main(), this, &CachedProcess::evictionTimerFired) > { >+ RELEASE_ASSERT(!m_process->pageCount()); >+ RELEASE_ASSERT_WITH_MESSAGE(!m_process->websiteDataStore().hasProcess(process.ptr()), "Only processes with pages should be registered with the data store"); > m_process->setIsInProcessCache(true); > m_evictionTimer.startOneShot(cachedProcessLifetime); > } >diff --git a/Source/WebKit/UIProcess/WebProcessLifetimeObserver.cpp b/Source/WebKit/UIProcess/WebProcessLifetimeObserver.cpp >index 3d75abdcb27032c0e1f71db2939badd52e334d5b..c8023de41616475010f428239a7bed07b17f85d7 100644 >--- a/Source/WebKit/UIProcess/WebProcessLifetimeObserver.cpp >+++ b/Source/WebKit/UIProcess/WebProcessLifetimeObserver.cpp >@@ -26,6 +26,7 @@ > #include "config.h" > #include "WebProcessLifetimeObserver.h" > >+#include "Logging.h" > #include "WebPageProxy.h" > #include "WebProcessProxy.h" > >@@ -42,9 +43,13 @@ WebProcessLifetimeObserver::~WebProcessLifetimeObserver() > void WebProcessLifetimeObserver::addWebPage(WebPageProxy& webPageProxy, WebProcessProxy& process) > { > ASSERT(process.state() == WebProcessProxy::State::Running); >+ RELEASE_ASSERT(!process.isInProcessCache()); >+ RELEASE_ASSERT(!process.isPrewarmed()); > >- if (m_processes.add(&process).isNewEntry) >+ if (m_processes.add(&process).isNewEntry) { >+ RELEASE_LOG(Loading, "%p - WebProcessLifetimeObserver::addWebPage: webPID = %i, pageID = %" PRIu64, this, process.processIdentifier(), webPageProxy.pageID()); > webProcessWillOpenConnection(process, *process.connection()); >+ } > > webPageWillOpenConnection(webPageProxy, *process.connection()); > } >@@ -57,8 +62,10 @@ void WebProcessLifetimeObserver::removeWebPage(WebPageProxy& webPageProxy, WebPr > > webPageDidCloseConnection(webPageProxy, *process.connection()); > >- if (m_processes.remove(&process)) >+ if (m_processes.remove(&process)) { >+ RELEASE_LOG(Loading, "%p - WebProcessLifetimeObserver::removeWebPage: webPID = %i, pageID = %" PRIu64, this, process.processIdentifier(), webPageProxy.pageID()); > webProcessDidCloseConnection(process, *process.connection()); >+ } > } > > WTF::IteratorRange<HashCountedSet<WebProcessProxy*>::const_iterator::Keys> WebProcessLifetimeObserver::processes() const >diff --git a/Source/WebKit/UIProcess/WebProcessLifetimeObserver.h b/Source/WebKit/UIProcess/WebProcessLifetimeObserver.h >index 61ce22b6f6608b64a28323ff146cf467d51bf218..66939734561e4201a20f42a366ddd02a44704e95 100644 >--- a/Source/WebKit/UIProcess/WebProcessLifetimeObserver.h >+++ b/Source/WebKit/UIProcess/WebProcessLifetimeObserver.h >@@ -48,6 +48,8 @@ public: > > WTF::IteratorRange<HashCountedSet<WebProcessProxy*>::const_iterator::Keys> processes() const; > >+ bool hasProcess(WebProcessProxy* process) const { return m_processes.contains(process); } >+ > private: > friend class WebProcessLifetimeTracker; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 197856
:
369795
|
369890
|
369900
| 369980