Bug 230236 - Implement network process crash recovery for BroadcastChannel
Summary: Implement network process crash recovery for BroadcastChannel
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks: 161472
  Show dependency treegraph
 
Reported: 2021-09-13 16:26 PDT by Chris Dumez
Modified: 2021-09-15 18:03 PDT (History)
6 users (show)

See Also:


Attachments
Patch (10.34 KB, patch)
2021-09-15 08:39 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (10.23 KB, patch)
2021-09-15 11:32 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2021-09-13 16:26:40 PDT
Implement network process crash recovery for BroadcastChannel. Currently, if the network process crashes and relaunches, pre-existing BroadcastChannels will be broken (communication won't be possible between WebProcesses).
Comment 1 Chris Dumez 2021-09-15 08:39:59 PDT
Created attachment 438247 [details]
Patch
Comment 2 Darin Adler 2021-09-15 11:20:33 PDT
Comment on attachment 438247 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=438247&action=review

> Source/WebKit/WebProcess/WebCoreSupport/WebBroadcastChannelRegistry.cpp:113
> +    for (auto& channelsPerOriginEntry : m_channelsPerOrigin) {
> +        auto& origin = channelsPerOriginEntry.key;
> +        auto& channelsForOrigin = channelsPerOriginEntry.value;

I believe we can write this with de-structuring and save many lines of code:

    for (auto& [origin, channelsForOrigin] : m_channelsPerOrigin) {

But I haven’t tried it. Seems like it would be better if it works.
Comment 3 Chris Dumez 2021-09-15 11:32:46 PDT
Created attachment 438267 [details]
Patch
Comment 4 EWS 2021-09-15 18:02:27 PDT
Committed r282483 (241731@main): <https://commits.webkit.org/241731@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 438267 [details].
Comment 5 Radar WebKit Bug Importer 2021-09-15 18:03:27 PDT
<rdar://problem/83176366>