diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
commit | da4c7e7ed675c3bf405668739c3012d140856109 (patch) | |
tree | cdd868dba063fecba609a1d819de271f0d51b23e /dom/media/ipc/MFCDMChild.cpp | |
parent | Adding upstream version 125.0.3. (diff) | |
download | firefox-da4c7e7ed675c3bf405668739c3012d140856109.tar.xz firefox-da4c7e7ed675c3bf405668739c3012d140856109.zip |
Adding upstream version 126.0.upstream/126.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/media/ipc/MFCDMChild.cpp')
-rw-r--r-- | dom/media/ipc/MFCDMChild.cpp | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/dom/media/ipc/MFCDMChild.cpp b/dom/media/ipc/MFCDMChild.cpp index aedae5bc36..2ba2bdaf4e 100644 --- a/dom/media/ipc/MFCDMChild.cpp +++ b/dom/media/ipc/MFCDMChild.cpp @@ -148,7 +148,7 @@ void MFCDMChild::Shutdown() { } RefPtr<MFCDMChild::CapabilitiesPromise> MFCDMChild::GetCapabilities( - bool aIsHWSecured) { + MFCDMCapabilitiesRequest&& aRequest) { MOZ_ASSERT(mManagerThread); if (mShutdown) { @@ -160,23 +160,21 @@ RefPtr<MFCDMChild::CapabilitiesPromise> MFCDMChild::GetCapabilities( return CapabilitiesPromise::CreateAndReject(mState, __func__); } - auto doSend = [self = RefPtr{this}, aIsHWSecured, this]() { - SendGetCapabilities(aIsHWSecured) - ->Then( - mManagerThread, __func__, - [self, this](MFCDMCapabilitiesResult&& aResult) { - if (aResult.type() == MFCDMCapabilitiesResult::Tnsresult) { - mCapabilitiesPromiseHolder.RejectIfExists( - aResult.get_nsresult(), __func__); - return; - } - mCapabilitiesPromiseHolder.ResolveIfExists( - std::move(aResult.get_MFCDMCapabilitiesIPDL()), __func__); - }, - [self, this](const mozilla::ipc::ResponseRejectReason& aReason) { - mCapabilitiesPromiseHolder.RejectIfExists(NS_ERROR_FAILURE, - __func__); - }); + auto doSend = [self = RefPtr{this}, request = std::move(aRequest), this]() { + SendGetCapabilities(request)->Then( + mManagerThread, __func__, + [self, this](MFCDMCapabilitiesResult&& aResult) { + if (aResult.type() == MFCDMCapabilitiesResult::Tnsresult) { + mCapabilitiesPromiseHolder.RejectIfExists(aResult.get_nsresult(), + __func__); + return; + } + mCapabilitiesPromiseHolder.ResolveIfExists( + std::move(aResult.get_MFCDMCapabilitiesIPDL()), __func__); + }, + [self, this](const mozilla::ipc::ResponseRejectReason& aReason) { + mCapabilitiesPromiseHolder.RejectIfExists(NS_ERROR_FAILURE, __func__); + }); }; return InvokeAsync(doSend, __func__, mCapabilitiesPromiseHolder); |