Implemented thread control for exported methods

This commit is contained in:
Nick Lockwood
2015-04-18 10:43:20 -07:00
parent 2b9aaac2ff
commit ead0f2e020
23 changed files with 384 additions and 403 deletions

View File

@@ -48,13 +48,11 @@ RCT_EXPORT_METHOD(reportUnhandledException:(NSString *)message
}
#ifdef DEBUG
[[RCTRedBox sharedInstance] showErrorMessage:message withStack:stack];
[[RCTRedBox sharedInstance] showErrorMessage:message withStack:stack];
#else
if (RCTReloadRetries < _maxReloadAttempts) {
RCTReloadRetries++;
dispatch_async(dispatch_get_main_queue(), ^{
[[NSNotificationCenter defaultCenter] postNotificationName:RCTReloadNotification object:nil];
});
[[NSNotificationCenter defaultCenter] postNotificationName:RCTReloadNotification object:nil];
} else {
NSError *error;
const NSUInteger MAX_SANITIZED_LENGTH = 75;