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

Commit 406c4da

Browse files
Ensure that AutoIsolateShutdown drops its reference to the DartIsolate on the intended task runner (#25899)
1 parent 7424400 commit 406c4da

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

testing/dart_isolate_runner.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ AutoIsolateShutdown::~AutoIsolateShutdown() {
1717
Shutdown();
1818
}
1919
fml::AutoResetWaitableEvent latch;
20-
fml::TaskRunner::RunNowOrPostTask(runner_,
21-
[isolate = std::move(isolate_), &latch]() {
22-
// Delete isolate on thread.
23-
latch.Signal();
24-
});
20+
fml::TaskRunner::RunNowOrPostTask(runner_, [this, &latch]() {
21+
// Delete isolate on thread.
22+
isolate_.reset();
23+
latch.Signal();
24+
});
2525
latch.Wait();
2626
}
2727

0 commit comments

Comments
 (0)