Bug 208273

Summary: MediaResourceLoader objects are leaking on reddit.com
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: MediaAssignee: Peng Liu <peng.liu6>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, commit-queue, eric.carlson, ggaren, jer.noble, peng.liu6, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Logging patch to demonstrate leak
none
Memgraph
none
Patch none

Description Chris Dumez 2020-02-26 15:56:11 PST
Steps to reproduce:
1. Adding logging in MediaResourceLoader constructor / destructor (ideally with a static count)
2. Go to reddit.com and scroll down for a while
-> Notice that we keep constructing MediaResourceLoader objects but that they are never destroyed
3. Navigate tab to about:blank (tab keeps using the same process)
4. Send a memory pressure signal: notifyutil -p org.WebKit.lowMemory
-> Notice that the MediaResourceLoader still do not get destroyed.
Comment 1 Chris Dumez 2020-02-26 15:56:37 PST
Created attachment 391794 [details]
Logging patch to demonstrate leak
Comment 2 Chris Dumez 2020-02-26 15:57:04 PST
Created attachment 391795 [details]
Memgraph
Comment 3 Peng Liu 2020-02-26 19:31:56 PST
Created attachment 391833 [details]
Patch
Comment 4 Chris Dumez 2020-02-27 08:30:44 PST
(In reply to Peng Liu from comment #3)
> Created attachment 391833 [details]
> Patch

Thanks for fixing!
Comment 5 Radar WebKit Bug Importer 2020-02-27 11:19:57 PST
<rdar://problem/59854658>
Comment 6 WebKit Commit Bot 2020-02-27 12:12:41 PST
Comment on attachment 391833 [details]
Patch

Clearing flags on attachment: 391833

Committed r257581: <https://trac.webkit.org/changeset/257581>
Comment 7 WebKit Commit Bot 2020-02-27 12:12:42 PST
All reviewed patches have been landed.  Closing bug.