Bug 236629 - Make sure there is a default Networking process to provide the Launch Services database
Summary: Make sure there is a default Networking process to provide the Launch Service...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Per Arne Vollan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-02-14 19:19 PST by Per Arne Vollan
Modified: 2022-02-25 12:10 PST (History)
5 users (show)

See Also:


Attachments
Patch (1.51 KB, patch)
2022-02-14 19:25 PST, Per Arne Vollan
no flags Details | Formatted Diff | Diff
Patch (1.89 KB, patch)
2022-02-14 19:36 PST, Per Arne Vollan
no flags Details | Formatted Diff | Diff
Patch (1.52 KB, patch)
2022-02-14 19:37 PST, Per Arne Vollan
no flags Details | Formatted Diff | Diff
Patch (1.98 KB, patch)
2022-02-14 19:40 PST, Per Arne Vollan
no flags Details | Formatted Diff | Diff
Patch (574 bytes, patch)
2022-02-15 08:04 PST, Per Arne Vollan
no flags Details | Formatted Diff | Diff
Patch (658 bytes, patch)
2022-02-15 17:26 PST, Per Arne Vollan
no flags Details | Formatted Diff | Diff
Patch (3.05 KB, patch)
2022-02-15 19:29 PST, Per Arne Vollan
no flags Details | Formatted Diff | Diff
Patch (3.54 KB, patch)
2022-02-16 14:14 PST, Per Arne Vollan
no flags Details | Formatted Diff | Diff
Patch (3.56 KB, patch)
2022-02-17 06:46 PST, Per Arne Vollan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Per Arne Vollan 2022-02-14 19:19:09 PST
The WebContent processes relies on getting the Launch Services database from the Networking process. We should make sure there always is a Networking process to provide the database.
Comment 1 Per Arne Vollan 2022-02-14 19:25:52 PST
Created attachment 451981 [details]
Patch
Comment 2 Per Arne Vollan 2022-02-14 19:36:24 PST
Created attachment 451982 [details]
Patch
Comment 3 Per Arne Vollan 2022-02-14 19:37:20 PST
Created attachment 451983 [details]
Patch
Comment 4 Per Arne Vollan 2022-02-14 19:40:16 PST
Created attachment 451985 [details]
Patch
Comment 5 Per Arne Vollan 2022-02-15 08:04:27 PST
Created attachment 452025 [details]
Patch
Comment 6 Radar WebKit Bug Importer 2022-02-15 16:21:11 PST
<rdar://problem/88993803>
Comment 7 Per Arne Vollan 2022-02-15 17:26:23 PST
Created attachment 452113 [details]
Patch
Comment 8 Per Arne Vollan 2022-02-15 19:29:15 PST
Created attachment 452124 [details]
Patch
Comment 9 Chris Dumez 2022-02-15 19:41:41 PST
Comment on attachment 452124 [details]
Patch

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

> Tools/TestWebKitAPI/Tests/WebKitCocoa/NetworkProcess.mm:-155
> -    while ([WKWebsiteDataStore _defaultNetworkProcessExists])

This seems like a bad regression. It is important for the network process to go away once it is no longer needed. Otherwise, any app that would use a WKWebView to display a simple help page once would carry an extra process and all its associated memory, forever.

You are essentially disabling this important API test and I don’t think it is ok.
Comment 10 Per Arne Vollan 2022-02-16 08:27:26 PST
(In reply to Chris Dumez from comment #9)
> Comment on attachment 452124 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=452124&action=review
> 
> > Tools/TestWebKitAPI/Tests/WebKitCocoa/NetworkProcess.mm:-155
> > -    while ([WKWebsiteDataStore _defaultNetworkProcessExists])
> 
> This seems like a bad regression. It is important for the network process to
> go away once it is no longer needed. Otherwise, any app that would use a
> WKWebView to display a simple help page once would carry an extra process
> and all its associated memory, forever.
> 

Will it go away, though? There will still be a reference to the NetworkProcessProxy from a Website data store, preventing the Network process form exiting, I believe. I have checked the test above in the debugger, and the Network process does not exit when spinning the run loop after the test (also without the code change in this patch). Or perhaps I am mistaken?

Perhaps we should reset all references to the Network process proxy in the remaining Website data stores when the last Web process pool is deleted? I think that would make the Network process exit in the above test.
Comment 11 Per Arne Vollan 2022-02-16 14:14:37 PST
Created attachment 452248 [details]
Patch
Comment 12 Per Arne Vollan 2022-02-17 06:46:32 PST
Created attachment 452361 [details]
Patch
Comment 13 Brent Fulgham 2022-02-25 11:19:27 PST
Comment on attachment 452361 [details]
Patch

r=me
Comment 14 Per Arne Vollan 2022-02-25 11:21:53 PST
Comment on attachment 452361 [details]
Patch

Thanks for reviewing!
Comment 15 EWS 2022-02-25 12:10:11 PST
Committed r290521 (247804@main): <https://commits.webkit.org/247804@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 452361 [details].