[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 10:08:24 PDT 2022


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

--- Comment #8 from Chris Dumez <cdumez at apple.com> ---
(In reply to Chris Dumez from comment #7)
> (In reply to Yury Semikhatsky from comment #6)
> > (In reply to Chris Dumez from comment #5)
> > > Shouldn't sendWithAsyncReply() wake up the suspended destination WebProcess
> > > until it responds? This is at least how it works for us on iOS with process
> > > suspension.
> > > 
> > 
> > I believe in https://bugs.webkit.org/show_bug.cgi?id=241353 scenario
> > sendWithAsyncReply was called before the process was suspended, i.e. the
> > process got suspended while there already were pending async IPC calls.
> 
> Right, on iOS, whenever we call sendWithAsyncReply(), we basically grab (and
> capture) a token that prevents process suspension.

It's this backgroundActivity here:
```
    if (asyncReplyInfo && canSendMessage() && shouldStartProcessThrottlerActivity == ShouldStartProcessThrottlerActivity::Yes) {
        auto completionHandler = std::exchange(asyncReplyInfo->first, nullptr);
        asyncReplyInfo->first = [activity = throttler().backgroundActivity({ }), completionHandler = WTFMove(completionHandler)](IPC::Decoder* decoder) mutable {
            completionHandler(decoder);
        };
    }
```

-- 
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/2e6dc3be/attachment.htm>


More information about the webkit-unassigned mailing list