commit 1d4569b701e516aeac490140b832a4fc07f28a5b
parent 7f00ba9fac58965794eea098d93c16d13a99a4ca
Author: Jamie Nicol <jnicol@mozilla.com>
Date: Wed, 26 Nov 2025 13:54:25 +0000
Bug 2002422 - Fix liveToken usage in GPUProcessHost. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D274103
Diffstat:
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/gfx/ipc/GPUProcessHost.cpp b/gfx/ipc/GPUProcessHost.cpp
@@ -119,9 +119,10 @@ void GPUProcessHost::OnChannelConnected(base::ProcessId peer_pid) {
GeckoChildProcessHost::OnChannelConnected(peer_pid);
NS_DispatchToMainThread(NS_NewRunnableFunction(
- "GPUProcessHost::OnChannelConnected", [this, liveToken = mLiveToken]() {
- if (*mLiveToken && mLaunchPhase == LaunchPhase::Waiting) {
- InitAfterConnect(true);
+ "GPUProcessHost::OnChannelConnected",
+ [self = this, liveToken = mLiveToken]() {
+ if (*liveToken && self->mLaunchPhase == LaunchPhase::Waiting) {
+ self->InitAfterConnect(true);
}
}));
}
@@ -157,10 +158,10 @@ void GPUProcessHost::InitAfterConnect(bool aSucceeded) {
true>::CreateAndResolve(csm, __func__);
})
->Map(GetCurrentSerialEventTarget(), __func__,
- [this, liveToken = mLiveToken](
+ [self = this, liveToken = mLiveToken](
java::CompositorSurfaceManager::GlobalRef&& aCsm) {
if (*liveToken) {
- mCompositorSurfaceManager = aCsm;
+ self->mCompositorSurfaceManager = aCsm;
}
return Ok{};
});
@@ -169,9 +170,9 @@ void GPUProcessHost::InitAfterConnect(bool aSucceeded) {
GPUChild::InitPromiseType::All(GetCurrentSerialEventTarget(), initPromises)
->Then(GetCurrentSerialEventTarget(), __func__,
- [this, liveToken = mLiveToken]() {
+ [self = this, liveToken = mLiveToken]() {
if (*liveToken) {
- this->OnAsyncInitComplete();
+ self->OnAsyncInitComplete();
}
});
} else {