Revert D5087565: Cleanup and document Value wrapper

Differential Revision: D5087565

fbshipit-source-id: 8168bda39fac9384264e9d849b205a2c1d37dcfa
This commit is contained in:
Pieter De Baets
2017-05-24 07:18:31 -07:00
committed by Facebook Github Bot
parent 374d08b8e4
commit d59fd9e419
7 changed files with 146 additions and 150 deletions

View File

@@ -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;