fix(servo-shell): guard create_app_webview against duplicate session_id

A broadcast LaunchAck can arrive in addition to any direct response,
causing create_app_webview to be called twice for the same session.
Without the guard the second call silently overwrites the existing
WebView entry without destroying it. Early-return if the session is
already tracked.
This commit is contained in:
Marco Allegretti 2026-03-11 18:31:35 +01:00
parent 9448cc5140
commit c9e1eb5075

View file

@ -133,6 +133,9 @@ impl App {
}
fn create_app_webview(&mut self, session_id: u64, app_id: &str) {
if self.app_webviews.contains_key(&session_id) {
return;
}
let (Some(servo), Some(rc)) = (&self.servo, &self.rendering_context) else {
return;
};