mirror of
https://github.com/marcoallegretti/WEFT_OS.git
synced 2026-03-26 17:03:09 +00:00
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:
parent
9448cc5140
commit
c9e1eb5075
1 changed files with 3 additions and 0 deletions
|
|
@ -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;
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue