debugger: Mark DapLocator::create_scenario as an async function (#32680)
Paves way for locators in extensions. Release Notes: - N/A
This commit is contained in:
parent
2c491d3a66
commit
d5b8c21a75
10 changed files with 290 additions and 218 deletions
|
@ -287,11 +287,17 @@ impl DapStore {
|
|||
adapter: DebugAdapterName,
|
||||
label: SharedString,
|
||||
cx: &mut App,
|
||||
) -> Option<DebugScenario> {
|
||||
DapRegistry::global(cx)
|
||||
.locators()
|
||||
.values()
|
||||
.find_map(|locator| locator.create_scenario(&build, &label, adapter.clone()))
|
||||
) -> Task<Option<DebugScenario>> {
|
||||
let locators = DapRegistry::global(cx).locators();
|
||||
|
||||
cx.background_spawn(async move {
|
||||
for locator in locators.values() {
|
||||
if let Some(scenario) = locator.create_scenario(&build, &label, &adapter).await {
|
||||
return Some(scenario);
|
||||
}
|
||||
}
|
||||
None
|
||||
})
|
||||
}
|
||||
|
||||
pub fn run_debug_locator(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue