RESOLVED FIXED 228119
Completion handler of NetworkProcess::prepareToSuspend may not be invoked promptly
https://bugs.webkit.org/show_bug.cgi?id=228119
Summary Completion handler of NetworkProcess::prepareToSuspend may not be invoked pro...
Sihui Liu
Reported 2021-07-20 12:16:24 PDT
...
Attachments
Patch (12.67 KB, patch)
2021-07-20 12:31 PDT, Sihui Liu
no flags
Patch (12.61 KB, patch)
2021-07-20 14:36 PDT, Sihui Liu
no flags
Sihui Liu
Comment 1 2021-07-20 12:31:22 PDT
Chris Dumez
Comment 2 2021-07-20 12:49:25 PDT
Comment on attachment 433891 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=433891&action=review > Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:1455 > + sharedStatisticsQueue()->dispatch([suspensionIdentifier = globalSuspensionIdentifier, completionHandler = WTFMove(completionHandler)] () mutable { Could use `suspensionIdentifier = ++globalSuspensionIdentifier`, and then you wouldn't need the `++globalSuspensionIdentifier;` line above. > Source/WebKit/NetworkProcess/NetworkProcess.cpp:2227 > + RunLoop::main().dispatchAfter(5_s, [this, weakThis = makeWeakPtr(*this), suspensionIdentifier = m_suspensionIdentifier] { ditto. > Source/WebKit/NetworkProcess/WebStorage/StorageManagerSet.cpp:184 > + m_queue->dispatch([this, protectedThis = makeRef(*this), suspensionIdentifier = m_suspensionIdentifier, completionHandler = WTFMove(completionHandler)] () mutable { ditto. > Source/WebKit/NetworkProcess/WebStorage/StorageManagerSet.h:106 > + uint64_t m_suspensionIdentifier WTF_GUARDED_BY_LOCK(m_suspensionLock) { 0 }; nit: extra space.
Sihui Liu
Comment 3 2021-07-20 14:36:26 PDT
EWS
Comment 4 2021-07-20 16:08:34 PDT
Committed r280110 (239827@main): <https://commits.webkit.org/239827@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 433901 [details].
Radar WebKit Bug Importer
Comment 5 2021-07-20 16:09:27 PDT
Note You need to log in before you can comment on or make changes to this bug.