Skip to content
This repository has been archived by the owner on Jan 30, 2025. It is now read-only.

Fix NPE on NavigateFrame #1106

Merged
merged 1 commit into from
Nov 29, 2023
Merged

Fix NPE on NavigateFrame #1106

merged 1 commit into from
Nov 29, 2023

Conversation

ka3de
Copy link
Collaborator

@ka3de ka3de commented Nov 17, 2023

What?

Fixes a possible NPE in FrameManager.NavigateFrame's event handler to wait for the navigation event.
The newDocument field for a navigation event can be nil if the navigation happens within the same document.

Why?

Bug.

Checklist

  • I have performed a self-review of my code
  • I have added tests for my changes
  • I have commented on my code, particularly in hard-to-understand areas

Related PR(s)/Issue(s)

Closes #1105

@ka3de ka3de self-assigned this Nov 17, 2023
@ka3de ka3de requested review from inancgumus and ankur22 November 17, 2023 16:47
@ka3de ka3de marked this pull request as ready for review November 17, 2023 16:47
Copy link
Member

@inancgumus inancgumus left a comment

Choose a reason for hiding this comment

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

👍

Can we put a log here when newDocument is nil. This kind of logs help a lot when debugging.

Copy link
Collaborator

@ankur22 ankur22 left a comment

Choose a reason for hiding this comment

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

LGTM

The newDocument field for a navigation event can be nil if the
navigation happens within the same document.
@ankur22 ankur22 force-pushed the fix/frame-manager-npe branch from 57a7e95 to bc1500e Compare November 29, 2023 12:38
@ankur22 ankur22 merged commit 86329fb into main Nov 29, 2023
16 checks passed
@ankur22 ankur22 deleted the fix/frame-manager-npe branch November 29, 2023 12:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nil pointer: FrameManager.NavigateFrame
3 participants