Permalink
Browse files

Reset module registry flag when resetting React Instance

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...
PeteTheHeat authored and facebook-github-bot committed Nov 10, 2018
1 parent 2bf0d54 commit 188cbb04ad264aea32ae235b85b61e626b767b83
Showing with 2 additions and 0 deletions.
  1. +2 −0 React/CxxBridge/RCTCxxBridge.mm
@@ -880,6 +880,7 @@ - (void)handleError:(NSError *)error

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

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

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

0 comments on commit 188cbb0

Please sign in to comment.