Bug 237734

Summary: Abandoned memory in NetworkStorageManager::m_temporaryBlobPathsByConnection
Product: WebKit Reporter: Sihui Liu <sihui_liu>
Component: Website StorageAssignee: Sihui Liu <sihui_liu>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, sihui_liu, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Sihui Liu 2022-03-10 14:45:05 PST
...
Comment 1 Sihui Liu 2022-03-10 14:47:43 PST
Created attachment 454404 [details]
Patch
Comment 2 Chris Dumez 2022-03-10 14:50:58 PST
Comment on attachment 454404 [details]
Patch

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

> Source/WebKit/NetworkProcess/storage/NetworkStorageManager.cpp:214
> +            protectedThis->m_temporaryBlobPathsByConnection.remove(connection);

Can't we do this before the work queue dispatch(), instead of re-dispatching to the main thread here?
Comment 3 Sihui Liu 2022-03-10 14:53:50 PST
(In reply to Chris Dumez from comment #2)
> Comment on attachment 454404 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=454404&action=review
> 
> > Source/WebKit/NetworkProcess/storage/NetworkStorageManager.cpp:214
> > +            protectedThis->m_temporaryBlobPathsByConnection.remove(connection);
> 
> Can't we do this before the work queue dispatch(), instead of re-dispatching
> to the main thread here?

This technically should be removed after we notify storage thread; and we need to dispatch to the main thread to deter NetworkStorageManager anyways
Comment 4 EWS 2022-03-10 21:41:00 PST
Committed r291145 (248305@main): <https://commits.webkit.org/248305@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 454404 [details].
Comment 5 Radar WebKit Bug Importer 2022-03-10 21:42:16 PST
<rdar://problem/90142912>