WebKit Bugzilla
Attachment 368997 Details for
Bug 197580
: Unresponsive Service Worker processes should get killed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-197580-20190503145743.patch (text/plain), 3.34 KB, created by
Chris Dumez
on 2019-05-03 14:57:44 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Chris Dumez
Created:
2019-05-03 14:57:44 PDT
Size:
3.34 KB
patch
obsolete
>Subversion Revision: 244918 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 5200b51b836528df35780edb583d3e620476336f..a93113def14c7159bd075888eb217f5fc5a33b51 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,21 @@ >+2019-05-03 Chris Dumez <cdumez@apple.com> >+ >+ Unresponsive Service Worker processes should get killed >+ https://bugs.webkit.org/show_bug.cgi?id=197580 >+ <rdar://problem/50458239> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Enable the background responsiveness logic for service worker processes so that they get >+ killed if they becomes unresponsive. The logic was previously not enabling the timer for >+ service worker processes because it required having a page. >+ >+ * UIProcess/BackgroundProcessResponsivenessTimer.cpp: >+ (WebKit::BackgroundProcessResponsivenessTimer::shouldBeActive const): >+ * UIProcess/WebProcessProxy.cpp: >+ (WebKit::WebProcessProxy::didBecomeUnresponsive): >+ (WebKit::WebProcessProxy::didFinishLaunching): >+ > 2019-05-03 Brent Fulgham <bfulgham@apple.com> > > Use more efficient path resolution logic >diff --git a/Source/WebKit/UIProcess/BackgroundProcessResponsivenessTimer.cpp b/Source/WebKit/UIProcess/BackgroundProcessResponsivenessTimer.cpp >index ea4d9d76e28ed4f2cb41d1ee4973b207712e1a29..548a8bbc0215a734503997c1d9da291b9215c33a 100644 >--- a/Source/WebKit/UIProcess/BackgroundProcessResponsivenessTimer.cpp >+++ b/Source/WebKit/UIProcess/BackgroundProcessResponsivenessTimer.cpp >@@ -132,6 +132,9 @@ void BackgroundProcessResponsivenessTimer::setResponsive(bool isResponsive) > bool BackgroundProcessResponsivenessTimer::shouldBeActive() const > { > #if !PLATFORM(IOS_FAMILY) >+ // Service worker process are always in the background. >+ if (m_webProcessProxy.isServiceWorkerProcess()) >+ return true; > return !m_webProcessProxy.visiblePageCount() && m_webProcessProxy.pageCount(); > #else > // Disable background process responsiveness checking on iOS since such processes usually get suspended. >diff --git a/Source/WebKit/UIProcess/WebProcessProxy.cpp b/Source/WebKit/UIProcess/WebProcessProxy.cpp >index c37208d8dd124616efcb7c3611095848739e5196..d4f37d7cb5295caf5574851554558699e1492917 100644 >--- a/Source/WebKit/UIProcess/WebProcessProxy.cpp >+++ b/Source/WebKit/UIProcess/WebProcessProxy.cpp >@@ -723,6 +723,12 @@ void WebProcessProxy::didBecomeUnresponsive() > bool isWebProcessResponsive = false; > for (auto& callback : isResponsiveCallbacks) > callback(isWebProcessResponsive); >+ >+ // If the service worker process becomes unresponsive, kill it ourselves since there are no native clients to do it. >+ if (isServiceWorkerProcess()) { >+ RELEASE_LOG_ERROR(PerformanceLogging, "%p - WebProcessProxy::didBecomeUnresponsive() Terminating Service Worker process with pid %d because it is unresponsive", this, processIdentifier()); >+ terminate(); >+ } > } > > void WebProcessProxy::didBecomeResponsive() >@@ -766,6 +772,7 @@ void WebProcessProxy::didFinishLaunching(ProcessLauncher* launcher, IPC::Connect > m_webConnection = WebConnectionToWebProcess::create(this); > > m_processPool->processDidFinishLaunching(this); >+ m_backgroundResponsivenessTimer.updateState(); > > for (auto* visitedLinkStore : m_visitedLinkStoresWithUsers.keys()) > visitedLinkStore->addProcess(*this);
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 197580
: 368997