Bug 1733109 - local copy 'handle' of the variable 'aPrincipalHandle' is never modified; consider avoiding the copy in HTMLMediaElement.cpp. r=alwu

Depends on D126942

Differential Revision: https://phabricator.services.mozilla.com/D126943
This commit is contained in:
Paul Adenot 2021-09-30 12:36:17 +00:00
Родитель 0f7d0e3beb
Коммит 915a3a4d1a
1 изменённых файлов: 1 добавлений и 2 удалений

Просмотреть файл

@ -6164,9 +6164,8 @@ void HTMLMediaElement::UpdateSrcStreamVideoPrincipal(
nsTArray<RefPtr<VideoStreamTrack>> videoTracks;
mSrcStream->GetVideoTracks(videoTracks);
PrincipalHandle handle(aPrincipalHandle);
for (const RefPtr<VideoStreamTrack>& track : videoTracks) {
if (PrincipalHandleMatches(handle, track->GetPrincipal()) &&
if (PrincipalHandleMatches(aPrincipalHandle, track->GetPrincipal()) &&
!track->Ended()) {
// When the PrincipalHandle for the VideoFrameContainer changes to that of
// a live track in mSrcStream we know that a removed track was displayed