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

Ensure that AutoIsolateShutdown drops its reference to the DartIsolate on the intended task runner #25899

Merged
merged 1 commit into from
May 7, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions testing/dart_isolate_runner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ AutoIsolateShutdown::~AutoIsolateShutdown() {
Shutdown();
}
fml::AutoResetWaitableEvent latch;
fml::TaskRunner::RunNowOrPostTask(runner_,
[isolate = std::move(isolate_), &latch]() {
// Delete isolate on thread.
latch.Signal();
});
fml::TaskRunner::RunNowOrPostTask(runner_, [this, &latch]() {
// Delete isolate on thread.
isolate_.reset();
latch.Signal();
});
latch.Wait();
}

Expand Down