Bug 1184468 - Use nsBaseHashtable::Values. r=xpcom-reviewers,nika

Differential Revision: https://phabricator.services.mozilla.com/D108587
This commit is contained in:
Simon Giesecke
2021-03-24 17:56:49 +00:00
parent c8f7e1b458
commit 9e995a79e8
112 changed files with 447 additions and 627 deletions

View File

@@ -3452,8 +3452,8 @@ void HTMLMediaElement::GetAllEnabledMediaTracks(
}
void HTMLMediaElement::SetCapturedOutputStreamsEnabled(bool aEnabled) {
for (auto& entry : mOutputTrackSources) {
entry.GetData()->SetEnabled(aEnabled);
for (const auto& entry : mOutputTrackSources.Values()) {
entry->SetEnabled(aEnabled);
}
}
@@ -3463,8 +3463,8 @@ HTMLMediaElement::OutputMuteState HTMLMediaElement::OutputTracksMuted() {
}
void HTMLMediaElement::UpdateOutputTracksMuting() {
for (auto& entry : mOutputTrackSources) {
entry.GetData()->SetMutedByElement(OutputTracksMuted());
for (const auto& entry : mOutputTrackSources.Values()) {
entry->SetMutedByElement(OutputTracksMuted());
}
}
@@ -3814,8 +3814,8 @@ already_AddRefed<DOMMediaStream> HTMLMediaElement::CaptureStreamInternal(
mAudioCaptured = true;
}
for (const auto& entry : mOutputTrackSources) {
const RefPtr<MediaElementTrackSource>& source = entry.GetData();
for (const RefPtr<MediaElementTrackSource>& source :
mOutputTrackSources.Values()) {
if (source->Track()->mType == MediaSegment::VIDEO) {
// Only add video tracks if we're a video element and the output stream
// wants video.
@@ -6221,8 +6221,8 @@ void HTMLMediaElement::NotifyDecoderPrincipalChanged() {
if (isSameOrigin) {
principal = NodePrincipal();
}
for (const auto& entry : mOutputTrackSources) {
entry.GetData()->SetPrincipal(principal);
for (const auto& entry : mOutputTrackSources.Values()) {
entry->SetPrincipal(principal);
}
mDecoder->SetOutputTracksPrincipal(principal);
}