Bug 1143478 - Rename mozilla::Pair to CompactPair. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D64511
This commit is contained in:
@@ -4006,7 +4006,7 @@ HTMLMediaElement::HTMLMediaElement(
|
||||
mTracksCaptured(nullptr, "HTMLMediaElement::mTracksCaptured"),
|
||||
mErrorSink(new ErrorSink(this)),
|
||||
mAudioChannelWrapper(new AudioChannelAgentCallback(this)),
|
||||
mSink(MakePair(nsString(), RefPtr<AudioDeviceInfo>())),
|
||||
mSink(std::pair(nsString(), RefPtr<AudioDeviceInfo>())),
|
||||
mShowPoster(IsVideo()) {
|
||||
MOZ_ASSERT(mMainThreadEventTarget);
|
||||
MOZ_ASSERT(mAbstractMainThread);
|
||||
@@ -4999,9 +4999,9 @@ nsresult HTMLMediaElement::FinishDecoderSetup(MediaDecoder* aDecoder) {
|
||||
NotifyDecoderPrincipalChanged();
|
||||
|
||||
// Set sink device if we have one. Otherwise the default is used.
|
||||
if (mSink.second()) {
|
||||
if (mSink.second) {
|
||||
mDecoder
|
||||
->SetSink(mSink.second())
|
||||
->SetSink(mSink.second)
|
||||
#ifdef DEBUG
|
||||
->Then(mAbstractMainThread, __func__,
|
||||
[](const GenericPromise::ResolveOrRejectValue& aValue) {
|
||||
@@ -5079,7 +5079,7 @@ void HTMLMediaElement::UpdateSrcMediaStreamPlaying(uint32_t aFlags) {
|
||||
mMediaStreamRenderer->Start();
|
||||
}
|
||||
|
||||
if (mSink.second()) {
|
||||
if (mSink.second) {
|
||||
NS_WARNING(
|
||||
"setSinkId() when playing a MediaStream is not supported yet and "
|
||||
"will be ignored");
|
||||
@@ -7550,7 +7550,7 @@ already_AddRefed<Promise> HTMLMediaElement::SetSinkId(const nsAString& aSinkId,
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (mSink.first().Equals(aSinkId)) {
|
||||
if (mSink.first.Equals(aSinkId)) {
|
||||
promise->MaybeResolveWithUndefined();
|
||||
return promise.forget();
|
||||
}
|
||||
@@ -7591,7 +7591,7 @@ already_AddRefed<Promise> HTMLMediaElement::SetSinkId(const nsAString& aSinkId,
|
||||
[promise, self = RefPtr<HTMLMediaElement>(this),
|
||||
sinkId](const SinkInfoPromise::ResolveOrRejectValue& aValue) {
|
||||
if (aValue.IsResolve()) {
|
||||
self->mSink = MakePair(sinkId, aValue.ResolveValue());
|
||||
self->mSink = std::pair(sinkId, aValue.ResolveValue());
|
||||
promise->MaybeResolveWithUndefined();
|
||||
} else {
|
||||
switch (aValue.RejectValue()) {
|
||||
|
||||
Reference in New Issue
Block a user