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

Commit f5b6cbe

Browse files
committed
Ensure that AutoIsolateShutdown drops its reference to the DartIsolate on the intended task runner
See flutter/flutter#80964
1 parent 9cb935f commit f5b6cbe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

testing/dart_isolate_runner.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ AutoIsolateShutdown::~AutoIsolateShutdown() {
1818
}
1919
fml::AutoResetWaitableEvent latch;
2020
fml::TaskRunner::RunNowOrPostTask(runner_,
21-
[isolate = std::move(isolate_), &latch]() {
21+
[this, &latch]() {
2222
// Delete isolate on thread.
23+
isolate_.reset();
2324
latch.Signal();
2425
});
2526
latch.Wait();

0 commit comments

Comments
 (0)