From 65a3da300349fa74308be786fc27c5dee89d8ca4 Mon Sep 17 00:00:00 2001 From: Tadeu Zagallo Date: Tue, 5 May 2015 05:15:53 -0700 Subject: [PATCH] [ReactNative] Fix chrome debugger --- React/Base/RCTBridge.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/React/Base/RCTBridge.m b/React/Base/RCTBridge.m index 35e85b3c9..a7c6a30a6 100644 --- a/React/Base/RCTBridge.m +++ b/React/Base/RCTBridge.m @@ -1108,7 +1108,8 @@ RCT_BRIDGE_WARN(_invokeAndProcessModule:(NSString *)module method:(NSString *)me * Register the display link to start sending js calls after everything * is setup */ - [_jsDisplayLink addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSRunLoopCommonModes]; + NSRunLoop *targetRunLoop = [_javaScriptExecutor isKindOfClass:[RCTContextExecutor class]] ? [NSRunLoop currentRunLoop] : [NSRunLoop mainRunLoop]; + [_jsDisplayLink addToRunLoop:targetRunLoop forMode:NSRunLoopCommonModes]; [[NSNotificationCenter defaultCenter] postNotificationName:RCTJavaScriptDidLoadNotification object:_parentBridge