Summary: | Completion handler of NetworkProcess::prepareToSuspend may not be invoked promptly | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Sihui Liu <sihui_liu> | ||||||
Component: | WebKit Misc. | Assignee: | Sihui Liu <sihui_liu> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | cdumez, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Sihui Liu
2021-07-20 12:16:24 PDT
Created attachment 433891 [details]
Patch
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. Created attachment 433901 [details]
Patch
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]. |