mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-23 03:50:11 +08:00
Remove additional JSON encoding for native->JS communication
Reviewed By: mhorowitz Differential Revision: D3857323 fbshipit-source-id: 4386cc107b8a1425ecb7297b0f659f6c47f01a78
This commit is contained in:
committed by
Facebook Github Bot 2
parent
bd4cd6ea5d
commit
145109fc6d
@@ -58,9 +58,6 @@ ProxyExecutor::ProxyExecutor(jni::global_ref<jobject>&& executorInstance,
|
||||
setGlobalVariable(
|
||||
"__fbBatchedBridgeConfig",
|
||||
folly::make_unique<JSBigStdString>(detail::toStdString(folly::toJson(config))));
|
||||
setGlobalVariable(
|
||||
"__fbBatchedBridgeSerializeNativeParams",
|
||||
folly::make_unique<JSBigStdString>("1"));
|
||||
}
|
||||
|
||||
ProxyExecutor::~ProxyExecutor() {
|
||||
@@ -95,7 +92,7 @@ void ProxyExecutor::callFunction(const std::string& moduleId, const std::string&
|
||||
std::move(arguments),
|
||||
};
|
||||
std::string result = executeJSCallWithProxy(m_executor.get(), "callFunctionReturnFlushedQueue", std::move(call));
|
||||
m_delegate->callNativeModules(*this, result, true);
|
||||
m_delegate->callNativeModules(*this, folly::parseJson(result), true);
|
||||
}
|
||||
|
||||
void ProxyExecutor::invokeCallback(const double callbackId, const folly::dynamic& arguments) {
|
||||
@@ -104,7 +101,7 @@ void ProxyExecutor::invokeCallback(const double callbackId, const folly::dynamic
|
||||
std::move(arguments)
|
||||
};
|
||||
std::string result = executeJSCallWithProxy(m_executor.get(), "invokeCallbackAndReturnFlushedQueue", std::move(call));
|
||||
m_delegate->callNativeModules(*this, result, true);
|
||||
m_delegate->callNativeModules(*this, folly::parseJson(result), true);
|
||||
}
|
||||
|
||||
void ProxyExecutor::setGlobalVariable(std::string propName,
|
||||
|
||||
Reference in New Issue
Block a user