Backed out changeset a08637fb30c8 (bug 1143478) for causing bustages in /builds/worker/checkouts/gecko/ipc/mscom/Registration.cpp CLOSED TREE
This commit is contained in:
@@ -4004,7 +4004,7 @@ HTMLMediaElement::HTMLMediaElement(
|
||||
mTracksCaptured(nullptr, "HTMLMediaElement::mTracksCaptured"),
|
||||
mErrorSink(new ErrorSink(this)),
|
||||
mAudioChannelWrapper(new AudioChannelAgentCallback(this)),
|
||||
mSink(std::pair(nsString(), RefPtr<AudioDeviceInfo>())),
|
||||
mSink(MakePair(nsString(), RefPtr<AudioDeviceInfo>())),
|
||||
mShowPoster(IsVideo()) {
|
||||
MOZ_ASSERT(mMainThreadEventTarget);
|
||||
MOZ_ASSERT(mAbstractMainThread);
|
||||
@@ -4997,9 +4997,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) {
|
||||
@@ -5077,7 +5077,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");
|
||||
@@ -7547,7 +7547,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();
|
||||
}
|
||||
@@ -7588,7 +7588,7 @@ already_AddRefed<Promise> HTMLMediaElement::SetSinkId(const nsAString& aSinkId,
|
||||
[promise, self = RefPtr<HTMLMediaElement>(this),
|
||||
sinkId](const SinkInfoPromise::ResolveOrRejectValue& aValue) {
|
||||
if (aValue.IsResolve()) {
|
||||
self->mSink = std::pair(sinkId, aValue.ResolveValue());
|
||||
self->mSink = MakePair(sinkId, aValue.ResolveValue());
|
||||
promise->MaybeResolveWithUndefined();
|
||||
} else {
|
||||
switch (aValue.RejectValue()) {
|
||||
|
||||
Reference in New Issue
Block a user