Skip to content

fix: a few regressions from previous PRs#23

Open
hila-f-qodo wants to merge 5 commits intodevin_pr_code_review_bench_100_devin2_base_fix_a_few_regressions_from_previous_prs_pr170from
devin_pr_code_review_bench_100_devin2_head_fix_a_few_regressions_from_previous_prs_pr170
Open

fix: a few regressions from previous PRs#23
hila-f-qodo wants to merge 5 commits intodevin_pr_code_review_bench_100_devin2_base_fix_a_few_regressions_from_previous_prs_pr170from
devin_pr_code_review_bench_100_devin2_head_fix_a_few_regressions_from_previous_prs_pr170

Conversation

@hila-f-qodo
Copy link
Copy Markdown

@hila-f-qodo hila-f-qodo commented Jan 26, 2026

Benchmark PR from qodo-benchmark#170


Open with Devin

Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

View issue and 4 additional flags in Devin Review.

Open in Devin Review

*self.window_id.lock().unwrap(),
self.webview_id,
WebviewMessage::DeleteCookie(cookie.clone().into_owned()),
WebviewMessage::SetCookie(cookie.into_owned()),
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 delete_cookie sends SetCookie message instead of DeleteCookie

The delete_cookie function incorrectly sends WebviewMessage::SetCookie instead of WebviewMessage::DeleteCookie, causing cookies to be set/updated rather than deleted.

Click to expand

Impact

When a user calls delete_cookie() to remove a cookie from the webview, the cookie will NOT be deleted. Instead, it will be set or updated with the provided cookie data. This is the opposite of the intended behavior.

Root Cause

The change at line 1718 replaced WebviewMessage::DeleteCookie(cookie.clone().into_owned()) with WebviewMessage::SetCookie(cookie.into_owned()).

Evidence

The DeleteCookie message variant exists and is properly handled:

  • crates/tauri-runtime-wry/src/lib.rs:1410: DeleteCookie(tauri_runtime::Cookie<'static>),
  • crates/tauri-runtime-wry/src/lib.rs:3737-3740: Handler that calls webview.delete_cookie(&cookie)

But the dispatch function sends the wrong message:

fn delete_cookie(&self, cookie: Cookie<'_>) -> Result<()> {
    send_user_message(
      &self.context,
      Message::Webview(
        *self.window_id.lock().unwrap(),
        self.webview_id,
        WebviewMessage::SetCookie(cookie.into_owned()), // BUG: Should be DeleteCookie
      ),
    )?;
    Ok(())
}

Recommendation: Change WebviewMessage::SetCookie(cookie.into_owned()) to WebviewMessage::DeleteCookie(cookie.into_owned()) to correctly dispatch the delete cookie message.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants