Bug 210006

Summary: [GPUP] Remove unnecessary RemoteCDMInstanceSessionIdentifier argument from RemoteCDMFactory::addSession()
Product: WebKit Reporter: David Kilzer (:ddkilzer) <ddkilzer>
Component: WebKit2Assignee: David Kilzer (:ddkilzer) <ddkilzer>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, eric.carlson, ews-watchlist, glenn, jer.noble, philipj, sergio, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 209712    
Bug Blocks:    
Attachments:
Description Flags
Patch v1 none

Description David Kilzer (:ddkilzer) 2020-04-04 09:57:12 PDT
Remove unnecessary RemoteCDMInstanceSessionIdentifier argument from RemoteCDMFactory::addSession().

I noticed this when fixing Bug 209712.
Comment 1 David Kilzer (:ddkilzer) 2020-04-04 10:00:39 PDT
Created attachment 395452 [details]
Patch v1
Comment 2 Darin Adler 2020-04-04 16:23:50 PDT
Comment on attachment 395452 [details]
Patch v1

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

> Source/WebKit/WebProcess/GPU/media/RemoteCDMFactory.cpp:84
> +    m_sessions.set(session->identifier(), WTFMove(session));

This also means that we could use a HashSet instead of a HashMap.
Comment 3 Darin Adler 2020-04-04 16:24:22 PDT
Comment on attachment 395452 [details]
Patch v1

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

>> Source/WebKit/WebProcess/GPU/media/RemoteCDMFactory.cpp:84
>> +    m_sessions.set(session->identifier(), WTFMove(session));
> 
> This also means that we could use a HashSet instead of a HashMap.

That’s a slightly more challenging refactoring, but it’s one that would save memory.
Comment 4 EWS 2020-04-04 16:45:00 PDT
Committed r259539: <https://trac.webkit.org/changeset/259539>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 395452 [details].
Comment 5 Radar WebKit Bug Importer 2020-04-04 16:45:16 PDT
<rdar://problem/61304706>