Bug 193702

Summary: NetworkProcess destructor executes cache storage parameters callbacks, but it's a NeverDestroyed singleton
Product: WebKit Reporter: Michael Catanzaro <mcatanzaro>
Component: WebKit2Assignee: Nobody <webkit-unassigned>
Status: RESOLVED WONTFIX    
Severity: Normal CC: achristensen, ap, mcatanzaro, youennf
Priority: P2    
Version: WebKit Nightly Build   
Hardware: PC   
OS: Linux   
See Also: https://bugs.webkit.org/show_bug.cgi?id=186166

Michael Catanzaro
Reported 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? :)
Attachments
youenn fablet
Comment 1 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.
Michael Catanzaro
Comment 2 2019-01-23 08:58:13 PST
If the current behavior is OK, no need to keep a bug open for it.
Note You need to log in before you can comment on or make changes to this bug.