Skip to content

Commit

Permalink
Make bridge logger thread-safe and fix noisy in bridge core time
Browse files Browse the repository at this point in the history
Reviewed By: javache

Differential Revision: D3828301

fbshipit-source-id: 29efdef2fb2c601984c27c4d0a69e1542bbff385
  • Loading branch information
alexeylang authored and Facebook Github Bot 3 committed Sep 7, 2016
1 parent bbd1e45 commit a31a291
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion React/Base/RCTBatchedBridge.m
Expand Up @@ -544,6 +544,8 @@ - (void)executeSourceCode:(NSData *)sourceCode
NSRunLoop *targetRunLoop = [self->_javaScriptExecutor isKindOfClass:[RCTJSCExecutor class]] ? [NSRunLoop currentRunLoop] : [NSRunLoop mainRunLoop];
[self->_displayLink addToRunLoop:targetRunLoop];

[self->_performanceLogger markStopForTag:RCTPLBridgeStartup];

// Perform the notification on the main thread, so we can't run into
// timing issues with RCTRootView
dispatch_async(dispatch_get_main_queue(), ^{
Expand Down Expand Up @@ -571,7 +573,6 @@ - (void)executeSourceCode:(NSData *)sourceCode
- (void)_flushPendingCalls
{
RCTAssertJSThread();
[_performanceLogger markStopForTag:RCTPLBridgeStartup];

RCT_PROFILE_BEGIN_EVENT(0, @"Processing pendingCalls", @{ @"count": @(_pendingCalls.count) });
_loading = NO;
Expand Down

0 comments on commit a31a291

Please sign in to comment.