Bug 193702 - NetworkProcess destructor executes cache storage parameters callbacks, but it's a NeverDestroyed singleton
Summary: NetworkProcess destructor executes cache storage parameters callbacks, but it...
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-22 18:36 PST by Michael Catanzaro
Modified: 2019-01-23 08:58 PST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Catanzaro 2019-01-22 18:36:05 PST
NetworkProcess destructor executes cache storage parameters callbacks since r232863 "Make NetworkProcess get cache storage parameters at creation of the CacheStorage engine", but it's a NeverDestroyed singleton so the destructor is a trap and won't actually run. So the callbacks are not guaranteed to be executed. Youenn, how bad is this? :)
Comment 1 youenn fablet 2019-01-22 20:42:40 PST
This code is more for completeness. This might prove useful should NetworkProcess does no longer be a singleton.
I believe the current behavior to be ok: the callbacks should in theory be triggered when the IPC connection between UIProcess and NetworkProcess is closed. Since this will trigger the end of the NetworkProcess, this is ok to not execute them.

It would be a nice refactoring to use an Async reply, this would remove the need for that specific handling.
Comment 2 Michael Catanzaro 2019-01-23 08:58:13 PST
If the current behavior is OK, no need to keep a bug open for it.