mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 12:25:59 +08:00
Revert D5087565: Cleanup and document Value wrapper
Differential Revision: D5087565 fbshipit-source-id: 8168bda39fac9384264e9d849b205a2c1d37dcfa
This commit is contained in:
committed by
Facebook Github Bot
parent
374d08b8e4
commit
d59fd9e419
@@ -14,7 +14,6 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import <React/RCTBridge+Private.h>
|
||||
#import <React/RCTCxxUtils.h>
|
||||
#import <React/RCTLog.h>
|
||||
#import <cxxreact/Platform.h>
|
||||
#import <jschelpers/Value.h>
|
||||
@@ -31,9 +30,8 @@ JSValueRef nativeLoggingHook(
|
||||
level = MAX(level, (RCTLogLevel)Value(ctx, arguments[1]).asNumber());
|
||||
}
|
||||
if (argumentCount > 0) {
|
||||
JSContext *contextObj = contextForGlobalContextRef(JSC_JSContextGetGlobalContext(ctx));
|
||||
JSValue *msg = [JSC_JSValue(ctx) valueWithJSValueRef:arguments[0] inContext:contextObj];
|
||||
_RCTLogJavaScriptInternal(level, [msg toString]);
|
||||
String message = Value(ctx, arguments[0]).toString();
|
||||
_RCTLogJavaScriptInternal(level, @(message.str().c_str()));
|
||||
}
|
||||
return Value::makeUndefined(ctx);
|
||||
}
|
||||
@@ -47,7 +45,7 @@ JSValueRef nativePerformanceNow(
|
||||
}
|
||||
|
||||
void RCTPrepareJSCExecutor() {
|
||||
ReactMarker::logTaggedMarker = [](const ReactMarker::ReactMarkerId, const char *tag) {};
|
||||
ReactMarker::logTaggedMarker = [](const ReactMarker::ReactMarkerId, const char* tag) {};
|
||||
PerfLogging::installNativeHooks = RCTFBQuickPerformanceLoggerConfigureHooks;
|
||||
JSNativeHooks::loggingHook = nativeLoggingHook;
|
||||
JSNativeHooks::nowHook = nativePerformanceNow;
|
||||
|
||||
Reference in New Issue
Block a user