Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ASSERTION FAILED: isMainRunLoop() under RemoteRenderingBackend::releaseRemoteGPU() #13416

Closed

Conversation

cdumez
Copy link
Contributor

@cdumez cdumez commented May 3, 2023

5bdeed8

ASSERTION FAILED: isMainRunLoop() under RemoteRenderingBackend::releaseRemoteGPU()
https://bugs.webkit.org/show_bug.cgi?id=256272

Reviewed by NOBODY (OOPS!).

RemoteRenderingBackend::releaseRemoteGPU() runs off the main thread and was calling
tryExitIfUnusedAndUnderMemoryPressure() on this same thread, which wasn't safe and
would hit an assertion in debug. Make sure we dispatch to the main thread before
calling tryExitIfUnusedAndUnderMemoryPressure().

* Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp:
(WebKit::RemoteRenderingBackend::releaseRemoteGPU):

6e30f36

If a page changes its title while in the background, allow the page to run in the background
https://bugs.webkit.org/show_bug.cgi?id=256259
rdar://103388697

Reviewed by NOBODY (OOPS!).

If a page changes its title while in the background, allow the page to run in the
background, as long as the app is foreground. Previously, the page changing its
title would buy its an extra 8 minutes of background running time. We are now
more permissive and allow the page to run indefinitely in the background when we
detect this (as long as the application is foreground).

* Source/WebKit/UIProcess/ProcessThrottler.cpp:
(WebKit::ProcessThrottler::ProcessThrottler):
(WebKit::ProcessThrottler::dropSuspendedAssertionTimerFired):
(WebKit::ProcessThrottler::pageAllowedToRunInTheBackgroundToken):
(WebKit::ProcessThrottler::numberOfPagesAllowedToRunInTheBackgroundChanged):
(WebKit::ProcessThrottler::delaySuspension): Deleted.
* Source/WebKit/UIProcess/ProcessThrottler.h:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::ProcessActivityState::reset):
(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::didReceiveTitleForFrame):
(WebKit::WebPageProxy::resetStateAfterProcessExited):
(WebKit::WebPageProxy::pageWillLikelyUseNotifications):
(WebKit::WebPageProxy::showNotification):
(WebKit::WebPageProxy::ProcessActivityState::takeLikelyToUseNotificationsActivity): Deleted.
(WebKit::WebPageProxy::ProcessActivityState::dropLikelyToUseNotificationsActivity): Deleted.
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/WebPageProxyInternals.h:

5bdeed8

Misc iOS, tvOS & watchOS macOS Linux Windows
  πŸ§ͺ style   πŸ›  ios   πŸ›  mac   πŸ›  wpe   πŸ›  wincairo
  πŸ›  ios-sim   πŸ›  mac-AS-debug   πŸ§ͺ wpe-wk2
  πŸ§ͺ webkitperl   πŸ§ͺ ios-wk2   πŸ§ͺ api-mac   πŸ›  gtk
  πŸ§ͺ ios-wk2-wpt   πŸ§ͺ mac-wk1   πŸ§ͺ gtk-wk2
  πŸ§ͺ api-ios   πŸ§ͺ mac-wk2   πŸ§ͺ api-gtk
  πŸ›  tv   πŸ§ͺ mac-AS-debug-wk2
  πŸ›  tv-sim   πŸ§ͺ mac-wk2-stress
  πŸ›  watch
  πŸ›  watch-sim

cdumez added 2 commits May 3, 2023 13:15
…o run in the background

https://bugs.webkit.org/show_bug.cgi?id=256259
rdar://103388697

Reviewed by NOBODY (OOPS!).

If a page changes its title while in the background, allow the page to run in the
background, as long as the app is foreground. Previously, the page changing its
title would buy its an extra 8 minutes of background running time. We are now
more permissive and allow the page to run indefinitely in the background when we
detect this (as long as the application is foreground).

* Source/WebKit/UIProcess/ProcessThrottler.cpp:
(WebKit::ProcessThrottler::ProcessThrottler):
(WebKit::ProcessThrottler::dropSuspendedAssertionTimerFired):
(WebKit::ProcessThrottler::pageAllowedToRunInTheBackgroundToken):
(WebKit::ProcessThrottler::numberOfPagesAllowedToRunInTheBackgroundChanged):
(WebKit::ProcessThrottler::delaySuspension): Deleted.
* Source/WebKit/UIProcess/ProcessThrottler.h:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::ProcessActivityState::reset):
(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::didReceiveTitleForFrame):
(WebKit::WebPageProxy::resetStateAfterProcessExited):
(WebKit::WebPageProxy::pageWillLikelyUseNotifications):
(WebKit::WebPageProxy::showNotification):
(WebKit::WebPageProxy::ProcessActivityState::takeLikelyToUseNotificationsActivity): Deleted.
(WebKit::WebPageProxy::ProcessActivityState::dropLikelyToUseNotificationsActivity): Deleted.
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/WebPageProxyInternals.h:
…seRemoteGPU()

https://bugs.webkit.org/show_bug.cgi?id=256272

Reviewed by NOBODY (OOPS!).

RemoteRenderingBackend::releaseRemoteGPU() runs off the main thread and was calling
tryExitIfUnusedAndUnderMemoryPressure() on this same thread, which wasn't safe and
would hit an assertion in debug. Make sure we dispatch to the main thread before
calling tryExitIfUnusedAndUnderMemoryPressure().

* Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp:
(WebKit::RemoteRenderingBackend::releaseRemoteGPU):
@cdumez cdumez self-assigned this May 3, 2023
@cdumez cdumez added the WebGPU For bugs in WebGPU label May 3, 2023
@cdumez cdumez closed this May 3, 2023
@cdumez
Copy link
Contributor Author

cdumez commented May 3, 2023

Messed up my branches. now tracked by #13417.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WebGPU For bugs in WebGPU
Projects
None yet
2 participants