Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add nil checks in requestByID #1220

Merged
merged 2 commits into from
Feb 20, 2024
Merged

Add nil checks in requestByID #1220

merged 2 commits into from
Feb 20, 2024

Conversation

ankur22
Copy link
Collaborator

@ankur22 ankur22 commented Feb 20, 2024

What?

Adding nil checks in requestByID.

Why?

For unknown reasons mainFrameSession or mainFrameSession.networkManager (it's unknown exactly which one) are nil, which has caused NPDs. We're adding nil checks here to prevent the NPDs, but we're now logging to see what components are nil to try and work out what is causing the NPD.

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)

Updates: #986

For unknown reasons mainFrameSession or mainFrameSession.networkManager
(it's unknown exactly which one) are nil, which has caused NPDs. We're
now adding nil checks here to prevent the NPDs, but we're also logging
when these are nil in the hopes that we can identify which component is
nil and under what conditions.
We want to capture the warning but not defend against the NPD so that
we don't ignore the issue and keep on working on it when more cases
arise.
@ankur22 ankur22 merged commit 6a04423 into main Feb 20, 2024
17 checks passed
@ankur22 ankur22 deleted the fix/npd-requestByID branch February 20, 2024 14:00
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.

None yet

2 participants