Call Systrace.setEnabled from CxxBridge
Reviewed By: alexeylang Differential Revision: D5247016 fbshipit-source-id: 7e31e38d7adae8d432a11199a1de572d082169e3
This commit is contained in:
parent
383915caeb
commit
9250250364
|
@ -1196,6 +1196,8 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithBundleURL:(__unused NSURL *)bundleUR
|
|||
[RCTFBSystrace registerCallbacks];
|
||||
#endif
|
||||
RCTProfileInit(self);
|
||||
|
||||
[self enqueueJSCall:@"Systrace" method:@"setEnabled" args:@[@YES] completion:NULL];
|
||||
}];
|
||||
}
|
||||
|
||||
|
@ -1204,6 +1206,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithBundleURL:(__unused NSURL *)bundleUR
|
|||
RCTAssertMainQueue();
|
||||
|
||||
[self ensureOnJavaScriptThread:^{
|
||||
[self enqueueJSCall:@"Systrace" method:@"setEnabled" args:@[@NO] completion:NULL];
|
||||
RCTProfileEnd(self, ^(NSString *log) {
|
||||
NSData *logData = [log dataUsingEncoding:NSUTF8StringEncoding];
|
||||
callback(logData);
|
||||
|
|
Loading…
Reference in New Issue