Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 1bd9b8e

Browse files
Reset Shell::weak_factory_gpu_ on the raster thread (#20869)
1 parent 8ec8af7 commit 1bd9b8e

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

shell/common/shell.cc

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -400,13 +400,12 @@ Shell::~Shell() {
400400

401401
fml::TaskRunner::RunNowOrPostTask(
402402
task_runners_.GetRasterTaskRunner(),
403-
fml::MakeCopyable([rasterizer = std::move(rasterizer_),
404-
weak_factory_gpu = std::move(weak_factory_gpu_),
405-
&gpu_latch]() mutable {
406-
rasterizer.reset();
407-
weak_factory_gpu.reset();
408-
gpu_latch.Signal();
409-
}));
403+
fml::MakeCopyable(
404+
[this, rasterizer = std::move(rasterizer_), &gpu_latch]() mutable {
405+
rasterizer.reset();
406+
this->weak_factory_gpu_.reset();
407+
gpu_latch.Signal();
408+
}));
410409
gpu_latch.Wait();
411410

412411
fml::TaskRunner::RunNowOrPostTask(

0 commit comments

Comments
 (0)