[Webkit-unassigned] [Bug 241583] Make sure WebPageProxy doesn't leak though strong references in async IPC callbacks

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jul 1 13:27:38 PDT 2022


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

--- Comment #10 from Chris Dumez <cdumez at apple.com> ---
(In reply to Yury Semikhatsky from comment #9)
> (In reply to Chris Dumez from comment #7)
> > Right, on iOS, whenever we call sendWithAsyncReply(), we basically grab (and
> > capture) a token that prevents process suspension.
> 
> Do you mean checking ProcessThrottler::shouldBeRunnable() before suspending
> the process? It should be a safe check to do before suspending the process
> on linux. I don't see corresponding code that suspends the process and calls
> the throttler on iOS, can you point me to that?

On iOS, WebKit does not suspend processes, it is the operating system that suspends processes unless they're holding what we call a process assertion. The backgoundActivity that we capture in the lambdas is just a counter that controls whether or not we should hold a process assertion for the process.

WPE could adopt ProcessAssertion / ProcessThrottler to control suspension similarly to what we do (although they'd do the suspension themselves when releasing the process assertion).

Alternatively, WPE could do their own thing but that works in a similar way. Basically, they'd need an object they can hold (and capture in lambdas) that can delay process suspension until released.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220701/92c9afec/attachment.htm>


More information about the webkit-unassigned mailing list