Skip to content

Conversation

@seer-by-sentry
Copy link
Contributor

Resolved / Related Issues

To prevent extra work, all changes to the Files codebase must link to an approved issue marked as Ready to build. Please insert the issue number following the hashtag with the issue number that this Pull Request resolves.

Steps used to test these changes

Stability is a top priority for Files and all changes are required to go through testing before being merged into the repo. Please include a list of steps that you used to test this PR.

  1. The issue was that: WebView2 event handler accesses disposed BlogPostWebView.CoreWebView2 instead of valid sender.CoreWebView2, causing NullReferenceException.
  2. Use the sender parameter in the CoreWebView2Initialized event handler instead of directly referencing BlogPostWebView.
  3. This change improves code clarity and avoids potential issues if the WebView2 instance changes.
  4. This fix was generated by Seer in Sentry, triggered by Yair. 👁️ Run ID: 1345253
  5. Not quite right? Click here to continue debugging with Seer.

@yaira2 yaira2 marked this pull request as ready for review September 11, 2025 21:21
@yaira2 yaira2 added the ready to merge Pull requests that are approved and ready to merge label Sep 11, 2025
@yaira2 yaira2 requested a review from Copilot September 11, 2025 21:23
Copy link
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 fixes a NullReferenceException in the WebView2 event handler by using the sender parameter instead of directly accessing BlogPostWebView.CoreWebView2. This change prevents accessing a potentially disposed WebView2 instance and improves code robustness.

  • Replaces direct BlogPostWebView.CoreWebView2 references with sender.CoreWebView2 in the event handler
  • Uses the sender parameter consistently for WebView2 configuration and script injection
  • Maintains existing functionality while fixing the disposal-related crash

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@yaira2 yaira2 merged commit d52a657 into main Sep 11, 2025
9 checks passed
@yaira2 yaira2 deleted the seer/refactor-webview2-sender branch September 11, 2025 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready to merge Pull requests that are approved and ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants