Fix RCTJavaScriptContextCreatedNotification

Summary: The notification was previously sent from a block that only existed if RCT_DEV. This makes us always send this notification.

Reviewed By: majak

Differential Revision: D3235070

fb-gh-sync-id: bf3488d439bc2253fd12cbb10f670f54bb37eb6e
fbshipit-source-id: bf3488d439bc2253fd12cbb10f670f54bb37eb6e
This commit is contained in:
Pieter De Baets 2016-04-28 06:58:21 -07:00 committed by Facebook Github Bot 9
parent e3c18c3990
commit e195bf9495
1 changed files with 3 additions and 3 deletions

View File

@ -270,6 +270,9 @@ static void RCTInstallJSCProfiler(RCTBridge *bridge, JSContextRef context)
if (!_context) {
JSContext *context = [JSContext new];
_context = [[RCTJavaScriptContext alloc] initWithJSContext:context onThread:_javaScriptThread];
[[NSNotificationCenter defaultCenter] postNotificationName:RCTJavaScriptContextCreatedNotification
object:context];
}
return _context;
@ -413,9 +416,6 @@ static void RCTInstallJSCProfiler(RCTBridge *bridge, JSContextRef context)
JSContext *context = strongSelf.context.context;
RCTInstallJSCProfiler(_bridge, context.JSGlobalContextRef);
[[NSNotificationCenter defaultCenter] postNotificationName:RCTJavaScriptContextCreatedNotification
object:context];
}];
for (NSString *event in @[RCTProfileDidStartProfiling, RCTProfileDidEndProfiling]) {