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

W3CPointerEvents: fix NPE due to null targetView #37785

Closed
wants to merge 1 commit into from

Conversation

adanoff
Copy link

@adanoff adanoff commented Jun 8, 2023

Summary:
Changelog: [Android] [Fixed] - W3CPointerEvents: fix NPE due to null targetView

For reasons not entirely understood, we sometimes end up with a null targetView in this code path during the dispatch of an ACTION_CANCEL. This results in an NPE during the call to getChildOffsetRelativeToRoot. This change adds a null check before the call to avoid the crash.

Differential Revision: D46562263

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner fb-exported labels Jun 8, 2023
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D46562263

@analysis-bot
Copy link

analysis-bot commented Jun 8, 2023

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 8,747,802 +24
android hermes armeabi-v7a 8,060,405 +23
android hermes x86 9,239,411 +24
android hermes x86_64 9,089,213 +22
android jsc arm64-v8a 9,310,259 -74
android jsc armeabi-v7a 8,500,200 -71
android jsc x86 9,372,756 -80
android jsc x86_64 9,626,655 -78

Base commit: 6ebee63
Branch: main

adanoff pushed a commit to adanoff/react-native that referenced this pull request Jun 9, 2023
Summary:
Pull Request resolved: facebook#37785

Changelog: [Android] [Fixed] - W3CPointerEvents: fix NPE due to null targetView

For reasons not entirely understood, we sometimes end up with a null `targetView` in this code path during the dispatch of an `ACTION_CANCEL`. This results in an NPE during the call to `getChildOffsetRelativeToRoot`. This change adds a null check before the call to avoid the crash.

Reviewed By: cortinico

Differential Revision: D46562263

fbshipit-source-id: 64e265a0140a898908b5959c27bf38003f29ce0f
@adanoff adanoff force-pushed the export-D46562263 branch from f1e9c6b to bad12c1 Compare June 9, 2023 14:08
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D46562263

Summary:
Pull Request resolved: facebook#37785

Changelog: [Android] [Fixed] - W3CPointerEvents: fix NPE due to null targetView

For reasons not entirely understood, we sometimes end up with a null `targetView` in this code path during the dispatch of an `ACTION_CANCEL`. This results in an NPE during the call to `getChildOffsetRelativeToRoot`. This change adds a null check before the call to avoid the crash.

Reviewed By: cortinico

Differential Revision: D46562263

fbshipit-source-id: a6e8276cfb7213e5a0f64b78bd0ac8b6220e5f0b
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D46562263

@adanoff adanoff force-pushed the export-D46562263 branch from bad12c1 to cf96e45 Compare June 9, 2023 14:54
@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Jun 9, 2023
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 96fd107.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants