[webkit-changes] [WebKit/WebKit] e89c9b: Don't drop the GPUProcess media assertion too prom...

Chris Dumez noreply at github.com
Fri Jul 14 12:41:41 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e89c9b432a4e8cb4c58b34af91129b039108275f
      https://github.com/WebKit/WebKit/commit/e89c9b432a4e8cb4c58b34af91129b039108275f
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2023-07-14 (Fri, 14 Jul 2023)

  Changed paths:
    M Source/WebKit/UIProcess/WebProcessPool.cpp
    M Source/WebKit/UIProcess/WebProcessPool.h

  Log Message:
  -----------
  Don't drop the GPUProcess media assertion too promptly after playback ends
https://bugs.webkit.org/show_bug.cgi?id=259219
rdar://112003621

Reviewed by Jer Noble and Eric Carlson.

Don't drop the GPUProcess media assertion too promptly after playback ends,
instead, drop it on a timer.

There is a race where both the GPUProcess and the UIProcess get notified of a
WebProcess exiting in parallel. When notified, the UIProcess would drop the
media assertion on the GPUProcess, which could get it to suspend while the
GPUProcess is STILL shutting down the media stack.

Dropping the media assertion on a timer makes it so that the GPUProcess is now
extremely unlikely to lose the race and will have properly shut down the media
stack by the time it gets suspended.

* Source/WebKit/UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::clearAudibleActivity):
(WebKit::WebProcessPool::updateAudibleMediaAssertions):
* Source/WebKit/UIProcess/WebProcessPool.h:

Canonical link: https://commits.webkit.org/266069@main




More information about the webkit-changes mailing list