Skip to content

Silence WebKit error on deallocated views#1335

Merged
cyanzhong merged 1 commit intomainfrom
develop
Apr 6, 2026
Merged

Silence WebKit error on deallocated views#1335
cyanzhong merged 1 commit intomainfrom
develop

Conversation

@cyanzhong
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR reduces noisy WebKit error logging that can occur when a WKWebView is torn down while an evaluateJavaScript call is still completing.

Changes:

  • Update WKWebView.invoke(path:message:completion:) to weakly capture the web view and early-return when it has been deallocated, preventing error logging during teardown.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@cyanzhong cyanzhong merged commit 6856a15 into main Apr 6, 2026
5 checks passed
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.

2 participants