mirror of
https://github.com/status-im/react-native.git
synced 2025-01-14 19:44:13 +00:00
Replace RCT_DEV with RCT_PROFILE
Reviewed By: javache Differential Revision: D3462735 fbshipit-source-id: 44513a9540b3111e036c4b14e0fda2d34b43cdf6
This commit is contained in:
parent
7eadd8c408
commit
b36eaeda5d
@ -151,8 +151,10 @@ class MessageQueue {
|
||||
this._callbacks[this._callbackID++] = onSucc;
|
||||
}
|
||||
|
||||
global.nativeTraceBeginAsyncFlow &&
|
||||
global.nativeTraceBeginAsyncFlow(TRACE_TAG_REACT_APPS, 'native', this._callID);
|
||||
if (__DEV__) {
|
||||
global.nativeTraceBeginAsyncFlow &&
|
||||
global.nativeTraceBeginAsyncFlow(TRACE_TAG_REACT_APPS, 'native', this._callID);
|
||||
}
|
||||
this._callID++;
|
||||
|
||||
this._queue[MODULE_IDS].push(module);
|
||||
|
@ -452,6 +452,15 @@ static void RCTInstallJSCProfiler(RCTBridge *bridge, JSContextRef context)
|
||||
}
|
||||
}];
|
||||
|
||||
for (NSString *event in @[RCTProfileDidStartProfiling, RCTProfileDidEndProfiling]) {
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(toggleProfilingFlag:)
|
||||
name:event
|
||||
object:nil];
|
||||
}
|
||||
#endif
|
||||
|
||||
#if RCT_DEV
|
||||
[self executeBlockOnJavaScriptQueue:^{
|
||||
RCTJSCExecutor *strongSelf = weakSelf;
|
||||
if (!strongSelf.valid) {
|
||||
@ -462,15 +471,6 @@ static void RCTInstallJSCProfiler(RCTBridge *bridge, JSContextRef context)
|
||||
RCTInstallJSCProfiler(_bridge, context.JSGlobalContextRef);
|
||||
}];
|
||||
|
||||
for (NSString *event in @[RCTProfileDidStartProfiling, RCTProfileDidEndProfiling]) {
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(toggleProfilingFlag:)
|
||||
name:event
|
||||
object:nil];
|
||||
}
|
||||
#endif
|
||||
|
||||
#if RCT_DEV
|
||||
// Inject handler used by HMR
|
||||
[self addSynchronousHookWithName:@"nativeInjectHMRUpdate" usingBlock:^(NSString *sourceCode, NSString *sourceCodeURL) {
|
||||
RCTJSCExecutor *strongSelf = weakSelf;
|
||||
|
Loading…
x
Reference in New Issue
Block a user