mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-16 18:50:07 +08:00
Better folly::dynamic ==> JSValue conversion
Reviewed By: lexs Differential Revision: D3347854 fbshipit-source-id: 95b81152d1b0d5fe41e01991c44f5d1110be7ddb
This commit is contained in:
committed by
Facebook Github Bot 0
parent
e1b3bbdb04
commit
654e4bed2e
@@ -596,7 +596,7 @@ JSValueRef JSCExecutor::nativeRequireModuleConfig(
|
||||
|
||||
std::string moduleName = Value(m_context, arguments[0]).toString().str();
|
||||
folly::dynamic config = m_delegate->getModuleConfig(moduleName);
|
||||
return JSValueMakeString(m_context, String(folly::toJson(config).c_str()));
|
||||
return Value::fromDynamic(m_context, config);
|
||||
}
|
||||
|
||||
JSValueRef JSCExecutor::nativeFlushQueueImmediate(
|
||||
@@ -681,7 +681,7 @@ JSValueRef JSCExecutor::nativeCallSyncHook(
|
||||
if (result.isUndefined) {
|
||||
return JSValueMakeUndefined(m_context);
|
||||
}
|
||||
return Value::fromJSON(m_context, String(folly::toJson(result.result).c_str()));
|
||||
return Value::fromDynamic(m_context, result.result);
|
||||
}
|
||||
|
||||
static JSValueRef nativeInjectHMRUpdate(
|
||||
|
||||
Reference in New Issue
Block a user