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:
parent
e3c18c3990
commit
e195bf9495
|
@ -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]) {
|
||||
|
|
Loading…
Reference in New Issue