Bug 237734 - Abandoned memory in NetworkStorageManager::m_temporaryBlobPathsByConnection
Summary: Abandoned memory in NetworkStorageManager::m_temporaryBlobPathsByConnection
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Website Storage (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sihui Liu
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-03-10 14:45 PST by Sihui Liu
Modified: 2022-03-10 21:42 PST (History)
3 users (show)

See Also:


Attachments
Patch (1.64 KB, patch)
2022-03-10 14:47 PST, Sihui Liu
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>