When the shared PlatformMediaSessionManager is created and accessed for the first time, some media libraries are loaded. There should be no need to access the shared PlatformMediaSessionManager if no manager has been created in Document::visibilityStateChanged().
rdar://problem/65005038
Created attachment 404245 [details] Patch
Comment on attachment 404245 [details] Patch Thanks for reviewing!
Committed r264359: <https://trac.webkit.org/changeset/264359> All reviewed patches have been landed. Closing bug and clearing flags on attachment 404245 [details].
Comment on attachment 404245 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=404245&action=review > Source/WebCore/dom/Document.cpp:1761 > + if (PlatformMediaSessionManager::sharedManagerIfExists()) { > + if (!PlatformMediaSessionManager::sharedManager().isInterrupted()) > + MediaStreamTrack::updateCaptureAccordingToMutedState(*this); > + } if (auto mediaSessionManager = PlatformMediaSessionManager::sharedManagerIfExists()) if (mediaSessionManager->isInterrupted()) ....
(In reply to Simon Fraser (smfr) from comment #5) > Comment on attachment 404245 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=404245&action=review > > > Source/WebCore/dom/Document.cpp:1761 > > + if (PlatformMediaSessionManager::sharedManagerIfExists()) { > > + if (!PlatformMediaSessionManager::sharedManager().isInterrupted()) > > + MediaStreamTrack::updateCaptureAccordingToMutedState(*this); > > + } > > if (auto mediaSessionManager = > PlatformMediaSessionManager::sharedManagerIfExists()) > if (mediaSessionManager->isInterrupted()) > .... Yes, that is better, I will a new patch :) Thanks for reviewing!
Reopening to attach new patch.
Created attachment 404263 [details] Patch
Committed r264370: <https://trac.webkit.org/changeset/264370> All reviewed patches have been landed. Closing bug and clearing flags on attachment 404263 [details].