Skip to content

Commit

Permalink
In tests run dart code on ui(rather than on platform) thread. (flutte…
Browse files Browse the repository at this point in the history
  • Loading branch information
aam authored Apr 13, 2020
1 parent d863249 commit 053da38
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions testing/dart_isolate_runner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ void RunDartCodeInIsolate(DartVMRef& vm_ref,
const std::vector<std::string>& args,
const std::string& fixtures_path,
fml::WeakPtr<IOManager> io_manager) {
FML_CHECK(task_runners.GetPlatformTaskRunner()->RunsTasksOnCurrentThread());
FML_CHECK(task_runners.GetUITaskRunner()->RunsTasksOnCurrentThread());

if (!vm_ref) {
return;
Expand Down Expand Up @@ -163,7 +163,7 @@ std::unique_ptr<AutoIsolateShutdown> RunDartCodeInIsolate(
std::unique_ptr<AutoIsolateShutdown> result;
fml::AutoResetWaitableEvent latch;
fml::TaskRunner::RunNowOrPostTask(
task_runners.GetPlatformTaskRunner(), fml::MakeCopyable([&]() mutable {
task_runners.GetUITaskRunner(), fml::MakeCopyable([&]() mutable {
RunDartCodeInIsolate(vm_ref, result, settings, task_runners, entrypoint,
args, fixtures_path, io_manager);
latch.Signal();
Expand Down

0 comments on commit 053da38

Please sign in to comment.