Skip to content

Commit f1fe2d6

Browse files
fix: cookies_for_url deadlock (#15504)
1 parent 66f873d commit f1fe2d6

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri-runtime-wry": "patch:bug"
3+
---
4+
5+
Fix `cookies_for_url` can cause deadlocks if called with another windowing/webview method

crates/tauri-runtime-wry/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1778,12 +1778,11 @@ impl<T: UserEvent> WebviewDispatch<T> for WryWebviewDispatcher<T> {
17781778
}
17791779

17801780
fn cookies_for_url(&self, url: Url) -> Result<Vec<Cookie<'static>>> {
1781-
let current_window_id = self.window_id.lock().unwrap();
17821781
let (tx, rx) = channel();
17831782
send_user_message(
17841783
&self.context,
17851784
Message::Webview(
1786-
*current_window_id,
1785+
*self.window_id.lock().unwrap(),
17871786
self.webview_id,
17881787
WebviewMessage::CookiesForUrl(url, tx),
17891788
),

0 commit comments

Comments
 (0)