-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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
Register RCTDeviceInfo to invalidating and cleanup observer #42396
Conversation
This pull request was exported from Phabricator. Differential Revision: D52912604 |
8e40f47
to
5ff857c
Compare
…#42396) Summary: Cmmunity reported [facebook#42120](facebook#42120) where React Native was crashing if RCTDeviceInfo native module was receiving a notification while the bridge is invalidating. Upon investigation, I realized that: 1. The RCTDeviceInfo module is never invalidated 2. Observers are still observing even when the Bridge is in an invalidated state and it is not back up. This change makes sure that we invalidate the `RCTDeviceInfo.mm` module and that we unregister the observers. ## Changelog: [iOS][Fixed] - Make `RCTDeviceInfo` listen to invalidate events and unregister observers while invalidating the bridge Differential Revision: D52912604
5ff857c
to
b1ff424
Compare
…#42396) Summary: Cmmunity reported [facebook#42120](facebook#42120) where React Native was crashing if RCTDeviceInfo native module was receiving a notification while the bridge is invalidating. Upon investigation, I realized that: 1. The RCTDeviceInfo module is never invalidated 2. Observers are still observing even when the Bridge is in an invalidated state and it is not back up. This change makes sure that we invalidate the `RCTDeviceInfo.mm` module and that we unregister the observers. ## Changelog: [iOS][Fixed] - Make `RCTDeviceInfo` listen to invalidate events and unregister observers while invalidating the bridge Differential Revision: D52912604
This pull request was exported from Phabricator. Differential Revision: D52912604 |
1 similar comment
This pull request was exported from Phabricator. Differential Revision: D52912604 |
…#42396) Summary: Cmmunity reported [facebook#42120](facebook#42120) where React Native was crashing if RCTDeviceInfo native module was receiving a notification while the bridge is invalidating. Upon investigation, I realized that: 1. The RCTDeviceInfo module is never invalidated 2. Observers are still observing even when the Bridge is in an invalidated state and it is not back up. This change makes sure that we invalidate the `RCTDeviceInfo.mm` module and that we unregister the observers. ## Changelog: [iOS][Fixed] - Make `RCTDeviceInfo` listen to invalidate events and unregister observers while invalidating the bridge Differential Revision: D52912604
b1ff424
to
329d5dc
Compare
This pull request was exported from Phabricator. Differential Revision: D52912604 |
…#42396) Summary: Cmmunity reported [facebook#42120](facebook#42120) where React Native was crashing if RCTDeviceInfo native module was receiving a notification while the bridge is invalidating. Upon investigation, I realized that: 1. The RCTDeviceInfo module is never invalidated 2. Observers are still observing even when the Bridge is in an invalidated state and it is not back up. This change makes sure that we invalidate the `RCTDeviceInfo.mm` module and that we unregister the observers. ## Changelog: [iOS][Fixed] - Make `RCTDeviceInfo` listen to invalidate events and unregister observers while invalidating the bridge Reviewed By: RSNara Differential Revision: D52912604
329d5dc
to
d676c67
Compare
This pull request was exported from Phabricator. Differential Revision: D52912604 |
…#42396) Summary: Cmmunity reported [facebook#42120](facebook#42120) where React Native was crashing if RCTDeviceInfo native module was receiving a notification while the bridge is invalidating. Upon investigation, I realized that: 1. The RCTDeviceInfo module is never invalidated 2. Observers are still observing even when the Bridge is in an invalidated state and it is not back up. This change makes sure that we invalidate the `RCTDeviceInfo.mm` module and that we unregister the observers. ## Changelog: [iOS][Fixed] - Make `RCTDeviceInfo` listen to invalidate events and unregister observers while invalidating the bridge Reviewed By: RSNara Differential Revision: D52912604
d676c67
to
e931abd
Compare
This pull request was exported from Phabricator. Differential Revision: D52912604 |
…#42396) Summary: Cmmunity reported [facebook#42120](facebook#42120) where React Native was crashing if RCTDeviceInfo native module was receiving a notification while the bridge is invalidating. Upon investigation, I realized that: 1. The RCTDeviceInfo module is never invalidated 2. Observers are still observing even when the Bridge is in an invalidated state and it is not back up. This change makes sure that we invalidate the `RCTDeviceInfo.mm` module and that we unregister the observers. ## Changelog: [iOS][Fixed] - Make `RCTDeviceInfo` listen to invalidate events and unregister observers while invalidating the bridge Reviewed By: RSNara Differential Revision: D52912604
e931abd
to
cbf5011
Compare
This pull request was exported from Phabricator. Differential Revision: D52912604 |
…#42396) Summary: Cmmunity reported [facebook#42120](facebook#42120) where React Native was crashing if RCTDeviceInfo native module was receiving a notification while the bridge is invalidating. Upon investigation, I realized that: 1. The RCTDeviceInfo module is never invalidated 2. Observers are still observing even when the Bridge is in an invalidated state and it is not back up. This change makes sure that we invalidate the `RCTDeviceInfo.mm` module and that we unregister the observers. ## Changelog: [iOS][Fixed] - Make `RCTDeviceInfo` listen to invalidate events and unregister observers while invalidating the bridge Reviewed By: RSNara Differential Revision: D52912604
cbf5011
to
cc8c739
Compare
This pull request was exported from Phabricator. Differential Revision: D52912604 |
…#42396) Summary: Cmmunity reported [facebook#42120](facebook#42120) where React Native was crashing if RCTDeviceInfo native module was receiving a notification while the bridge is invalidating. Upon investigation, I realized that: 1. The RCTDeviceInfo module is never invalidated 2. Observers are still observing even when the Bridge is in an invalidated state and it is not back up. This change makes sure that we invalidate the `RCTDeviceInfo.mm` module and that we unregister the observers. ## Changelog: [iOS][Fixed] - Make `RCTDeviceInfo` listen to invalidate events and unregister observers while invalidating the bridge Reviewed By: RSNara Differential Revision: D52912604
cc8c739
to
fafb1dd
Compare
This pull request was exported from Phabricator. Differential Revision: D52912604 |
fafb1dd
to
e6c1f33
Compare
This pull request was exported from Phabricator. Differential Revision: D52912604 |
…#42396) Summary: Cmmunity reported [facebook#42120](facebook#42120) where React Native was crashing if RCTDeviceInfo native module was receiving a notification while the bridge is invalidating. Upon investigation, I realized that: 1. The RCTDeviceInfo module is never invalidated 2. Observers are still observing even when the Bridge is in an invalidated state and it is not back up. This change makes sure that we invalidate the `RCTDeviceInfo.mm` module and that we unregister the observers. ## Changelog: [iOS][Fixed] - Make `RCTDeviceInfo` listen to invalidate events and unregister observers while invalidating the bridge Reviewed By: RSNara Differential Revision: D52912604
76db12c
to
29a2732
Compare
This pull request was exported from Phabricator. Differential Revision: D52912604 |
…#42396) Summary: Cmmunity reported [facebook#42120](facebook#42120) where React Native was crashing if RCTDeviceInfo native module was receiving a notification while the bridge is invalidating. Upon investigation, I realized that: 1. The RCTDeviceInfo module is never invalidated 2. Observers are still observing even when the Bridge is in an invalidated state and it is not back up. This change makes sure that we invalidate the `RCTDeviceInfo.mm` module and that we unregister the observers. ## Changelog: [iOS][Fixed] - Make `RCTDeviceInfo` listen to invalidate events and unregister observers while invalidating the bridge Reviewed By: RSNara Differential Revision: D52912604
29a2732
to
9d15e1a
Compare
This pull request was exported from Phabricator. Differential Revision: D52912604 |
This pull request has been merged in d46d80d. |
Summary: Pull Request resolved: #42396 Cmmunity reported [#42120](#42120) where React Native was crashing if RCTDeviceInfo native module was receiving a notification while the bridge is invalidating. Upon investigation, I realized that: 1. The RCTDeviceInfo module is never invalidated 2. Observers are still observing even when the Bridge is in an invalidated state and it is not back up. This change makes sure that we invalidate the `RCTDeviceInfo.mm` module and that we unregister the observers. ## Changelog: [iOS][Fixed] - Make `RCTDeviceInfo` listen to invalidate events and unregister observers while invalidating the bridge Reviewed By: RSNara Differential Revision: D52912604 fbshipit-source-id: 1727bcdef5393b1bd5a272e2143bc65456c2a389
…o module (#43737) Summary: Previous fix brings in #42396. Seems it's a mistake to re-add observer? So let's remove it and also not `invalidate` method not be called twice. ## Changelog: [IOS] [FIXED] - Remove invalidate observer instead of re-adding observer in DeviceInfo module Pull Request resolved: #43737 Test Plan: Fix for #42120 also works. Reviewed By: javache Differential Revision: D55692219 Pulled By: cipolleschi fbshipit-source-id: dba1ddc39a9f2611fc2b84fadf8c23827891379a
…o module (#43737) Summary: Previous fix brings in #42396. Seems it's a mistake to re-add observer? So let's remove it and also not `invalidate` method not be called twice. ## Changelog: [IOS] [FIXED] - Remove invalidate observer instead of re-adding observer in DeviceInfo module Pull Request resolved: #43737 Test Plan: Fix for #42120 also works. Reviewed By: javache Differential Revision: D55692219 Pulled By: cipolleschi fbshipit-source-id: dba1ddc39a9f2611fc2b84fadf8c23827891379a
…#42396) Summary: Pull Request resolved: facebook#42396 Cmmunity reported [facebook#42120](facebook#42120) where React Native was crashing if RCTDeviceInfo native module was receiving a notification while the bridge is invalidating. Upon investigation, I realized that: 1. The RCTDeviceInfo module is never invalidated 2. Observers are still observing even when the Bridge is in an invalidated state and it is not back up. This change makes sure that we invalidate the `RCTDeviceInfo.mm` module and that we unregister the observers. ## Changelog: [iOS][Fixed] - Make `RCTDeviceInfo` listen to invalidate events and unregister observers while invalidating the bridge Reviewed By: RSNara Differential Revision: D52912604 fbshipit-source-id: 1727bcdef5393b1bd5a272e2143bc65456c2a389
…o module (facebook#43737) Summary: Previous fix brings in facebook#42396. Seems it's a mistake to re-add observer? So let's remove it and also not `invalidate` method not be called twice. [IOS] [FIXED] - Remove invalidate observer instead of re-adding observer in DeviceInfo module Pull Request resolved: facebook#43737 Test Plan: Fix for facebook#42120 also works. Reviewed By: javache Differential Revision: D55692219 Pulled By: cipolleschi fbshipit-source-id: dba1ddc39a9f2611fc2b84fadf8c23827891379a
…#42396) Summary: Pull Request resolved: facebook#42396 Cmmunity reported [facebook#42120](facebook#42120) where React Native was crashing if RCTDeviceInfo native module was receiving a notification while the bridge is invalidating. Upon investigation, I realized that: 1. The RCTDeviceInfo module is never invalidated 2. Observers are still observing even when the Bridge is in an invalidated state and it is not back up. This change makes sure that we invalidate the `RCTDeviceInfo.mm` module and that we unregister the observers. ## Changelog: [iOS][Fixed] - Make `RCTDeviceInfo` listen to invalidate events and unregister observers while invalidating the bridge Reviewed By: RSNara Differential Revision: D52912604 fbshipit-source-id: 1727bcdef5393b1bd5a272e2143bc65456c2a389
…o module (facebook#43737) Summary: Previous fix brings in facebook#42396. Seems it's a mistake to re-add observer? So let's remove it and also not `invalidate` method not be called twice. [IOS] [FIXED] - Remove invalidate observer instead of re-adding observer in DeviceInfo module Pull Request resolved: facebook#43737 Test Plan: Fix for facebook#42120 also works. Reviewed By: javache Differential Revision: D55692219 Pulled By: cipolleschi fbshipit-source-id: dba1ddc39a9f2611fc2b84fadf8c23827891379a
…#42396) Summary: Pull Request resolved: facebook#42396 Cmmunity reported [facebook#42120](facebook#42120) where React Native was crashing if RCTDeviceInfo native module was receiving a notification while the bridge is invalidating. Upon investigation, I realized that: 1. The RCTDeviceInfo module is never invalidated 2. Observers are still observing even when the Bridge is in an invalidated state and it is not back up. This change makes sure that we invalidate the `RCTDeviceInfo.mm` module and that we unregister the observers. ## Changelog: [iOS][Fixed] - Make `RCTDeviceInfo` listen to invalidate events and unregister observers while invalidating the bridge Reviewed By: RSNara Differential Revision: D52912604 fbshipit-source-id: 1727bcdef5393b1bd5a272e2143bc65456c2a389
…o module (facebook#43737) Summary: Previous fix brings in facebook#42396. Seems it's a mistake to re-add observer? So let's remove it and also not `invalidate` method not be called twice. [IOS] [FIXED] - Remove invalidate observer instead of re-adding observer in DeviceInfo module Pull Request resolved: facebook#43737 Test Plan: Fix for facebook#42120 also works. Reviewed By: javache Differential Revision: D55692219 Pulled By: cipolleschi fbshipit-source-id: dba1ddc39a9f2611fc2b84fadf8c23827891379a
…o module (#43737) Summary: Previous fix brings in #42396. Seems it's a mistake to re-add observer? So let's remove it and also not `invalidate` method not be called twice. [IOS] [FIXED] - Remove invalidate observer instead of re-adding observer in DeviceInfo module Pull Request resolved: #43737 Test Plan: Fix for #42120 also works. Reviewed By: javache Differential Revision: D55692219 Pulled By: cipolleschi fbshipit-source-id: dba1ddc39a9f2611fc2b84fadf8c23827891379a
Summary:
Cmmunity reported #42120 where React Native was crashing if RCTDeviceInfo native module was receiving a notification while the bridge is invalidating.
Upon investigation, I realized that:
This change makes sure that we invalidate the
RCTDeviceInfo.mm
module and that we unregister the observers.Changelog:
[iOS][Fixed] - Make
RCTDeviceInfo
listen to invalidate events and unregister observers while invalidating the bridgeDifferential Revision: D52912604