Bug 1691913 - Rename nsBaseHashtable::Put to InsertOrUpdate. r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika

This makes the naming more consistent with other functions called
Insert and/or Update. Also, it removes the ambiguity whether
Put expects that an entry already exists or not, in particular because
it differed from nsTHashtable::PutEntry in that regard.

Differential Revision: https://phabricator.services.mozilla.com/D105473
This commit is contained in:
Simon Giesecke
2021-02-26 09:11:46 +00:00
parent 7c075f27d9
commit 95c38cc6b8
298 changed files with 884 additions and 815 deletions

View File

@@ -3726,7 +3726,7 @@ void HTMLMediaElement::UpdateOutputTrackSources() {
track->QueueSetAutoend(false);
MOZ_DIAGNOSTIC_ASSERT(!mOutputTrackSources.GetWeak(id));
mOutputTrackSources.Put(id, RefPtr{source});
mOutputTrackSources.InsertOrUpdate(id, RefPtr{source});
// Add the new track source to any existing output streams
for (OutputMediaStream& ms : mOutputStreams) {