summaryrefslogtreecommitdiffstats
path: root/dom/media/gmp/ChromiumCDMParent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/media/gmp/ChromiumCDMParent.cpp')
-rw-r--r--dom/media/gmp/ChromiumCDMParent.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/dom/media/gmp/ChromiumCDMParent.cpp b/dom/media/gmp/ChromiumCDMParent.cpp
index 5d4534f..5d8a3e2 100644
--- a/dom/media/gmp/ChromiumCDMParent.cpp
+++ b/dom/media/gmp/ChromiumCDMParent.cpp
@@ -61,8 +61,6 @@ RefPtr<ChromiumCDMParent::InitPromise> ChromiumCDMParent::Init(
!aMainThread ? "true" : "false")),
__func__);
}
- mCDMCallback = aCDMCallback;
- mMainThread = aMainThread;
RefPtr<ChromiumCDMParent::InitPromise> promise =
mInitPromise.Ensure(__func__);
@@ -70,7 +68,7 @@ RefPtr<ChromiumCDMParent::InitPromise> ChromiumCDMParent::Init(
SendInit(aAllowDistinctiveIdentifier, aAllowPersistentState)
->Then(
AbstractThread::GetCurrent(), __func__,
- [self](bool aSuccess) {
+ [self, aCDMCallback](bool aSuccess) {
if (!aSuccess) {
GMP_LOG(
"ChromiumCDMParent::Init() failed with callback from "
@@ -84,6 +82,7 @@ RefPtr<ChromiumCDMParent::InitPromise> ChromiumCDMParent::Init(
}
GMP_LOG(
"ChromiumCDMParent::Init() succeeded with callback from child");
+ self->mCDMCallback = aCDMCallback;
self->mInitPromise.ResolveIfExists(true /* unused */, __func__);
},
[self](ResponseRejectReason aReason) {