Skip to content

armgit / moli

Public Imported from GitHub
0

Best headless browser for AI agents. Lite, Fast, High-Compatibility. Built in Rust

fix(cdp): bound renderer navigation future stack usage

ldm00f2892533fc4
diff --git a/moli-protocol/src/domains/page.rs b/moli-protocol/src/domains/page.rs
index a96534db6..dccefb40c 100644
--- a/moli-protocol/src/domains/page.rs
+++ b/moli-protocol/src/domains/page.rs
@@ -1460,9 +1460,15 @@ async fn complete_renderer_navigation_step_background_events_async(
return;
}
PageCommandTaskStep::Pending(pending) => {
- step =
- complete_pending_page_command(conn, pending.wait().await, &mut command_context)
- .await;
+ // Navigation futures carry the response and renderer setup.
+ // Keep them out of each enclosing target-navigation future.
+ let completed = Box::pin(pending.wait()).await;
+ step = Box::pin(complete_pending_page_command(
+ conn,
+ completed,
+ &mut command_context,
+ ))
+ .await;
}
}
}