Skip to content

Commit

Permalink
Reset module registry flag when resetting React Instance
Browse files Browse the repository at this point in the history
Summary:
D12911108 fixed a UBN race condition by adding a flag for module registry.

This flag was never reset if react instance gets reset, causing an assert to fire in IG.

Reviewed By: fkgozali

Differential Revision: D13010651

fbshipit-source-id: e20453f3c546d759a58fd7fb93553f774410905f
  • Loading branch information
Peter Argany authored and facebook-github-bot committed Nov 10, 2018
1 parent 2bf0d54 commit 188cbb0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions React/CxxBridge/RCTCxxBridge.mm
Original file line number Diff line number Diff line change
Expand Up @@ -880,6 +880,7 @@ - (void)handleError:(NSError *)error

_loading = NO;
_valid = NO;
_moduleRegistryCreated = NO;

dispatch_async(dispatch_get_main_queue(), ^{
if (self->_jsMessageThread) {
Expand Down Expand Up @@ -976,6 +977,7 @@ - (void)invalidate
_loading = NO;
_valid = NO;
_didInvalidate = YES;
_moduleRegistryCreated = NO;

if ([RCTBridge currentBridge] == self) {
[RCTBridge setCurrentBridge:nil];
Expand Down

0 comments on commit 188cbb0

Please sign in to comment.