[fuchsia] Close runtime_dir when launching components (flutter/engine#34342)

The runner is supposed to either serve the runtime_dir, or close the
channel immediately. Otherwise consumers will get blocked indefinitely.

BUG: fxbug.dev/103480
This commit is contained in:
Dangyi Liu
2022-06-28 11:21:42 -07:00
committed by GitHub
parent 249ae96480
commit e6e8693c0c
2 changed files with 8 additions and 0 deletions

View File

@@ -133,6 +133,10 @@ DartComponentControllerV2::DartComponentControllerV2(
idle_wait_.set_trigger(ZX_TIMER_SIGNALED);
idle_wait_.Begin(async_get_default_dispatcher());
}
// Close the runtime_dir channel if we don't intend to serve it. Otherwise any
// access to the runtime_dir will hang forever.
start_info_.clear_runtime_dir();
}
DartComponentControllerV2::~DartComponentControllerV2() {

View File

@@ -136,6 +136,10 @@ DartTestComponentControllerV2::DartTestComponentControllerV2(
idle_wait_.set_trigger(ZX_TIMER_SIGNALED);
idle_wait_.Begin(async_get_default_dispatcher());
}
// Close the runtime_dir channel if we don't intend to serve it. Otherwise any
// access to the runtime_dir will hang forever.
start_info_.clear_runtime_dir();
}
DartTestComponentControllerV2::~DartTestComponentControllerV2() {