Summary: | Implement MediaSessionManager to keep track of all MediaSessions | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Matt Rajca <mrajca> | ||||||||
Component: | Media | Assignee: | Nobody <webkit-unassigned> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | commit-queue, conrad_shultz, eric.carlson, jer.noble, mrajca, webkit-bug-importer | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | All | ||||||||||
OS: | All | ||||||||||
Bug Depends on: | |||||||||||
Bug Blocks: | 145411 | ||||||||||
Attachments: |
|
Description
Matt Rajca
2015-06-09 10:25:03 PDT
Created attachment 254580 [details]
Patch
Comment on attachment 254580 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=254580&action=review > Source/WebCore/Modules/mediasession/MediaSessionManager.cpp:49 > + m_sessions.remove(m_sessions.find(&session)); Normally it’s not good to use remove/find. I’d suggest using a HashSet or ListHashSet for this collection instead of a vector. Created attachment 254585 [details]
Patch
(In reply to comment #3) > Comment on attachment 254580 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=254580&action=review > > > Source/WebCore/Modules/mediasession/MediaSessionManager.cpp:49 > > + m_sessions.remove(m_sessions.find(&session)); > > Normally it’s not good to use remove/find. I’d suggest using a HashSet or > ListHashSet for this collection instead of a vector. Settled on HashSet since we don't care about the ordering of MediaSessions. Thanks! Comment on attachment 254585 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=254585&action=review > Source/WebCore/Modules/mediasession/MediaSessionManager.h:41 > + const HashSet<MediaSession*>& sessions() const { return m_sessions; } Is there any reason to not make this private? (In reply to comment #6) > Comment on attachment 254585 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=254585&action=review > > > Source/WebCore/Modules/mediasession/MediaSessionManager.h:41 > > + const HashSet<MediaSession*>& sessions() const { return m_sessions; } > > Is there any reason to not make this private? I have other uncommitted code here locally that requires it to be public, but that is probably going to get refactored anyway. I'll remove the accessor for now. Created attachment 254599 [details]
Patch
Comment on attachment 254599 [details] Patch Clearing flags on attachment: 254599 Committed r185389: <http://trac.webkit.org/changeset/185389> All reviewed patches have been landed. Closing bug. |