mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00: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
@@ -53,13 +53,13 @@ public:
|
||||
}
|
||||
|
||||
void callNativeModules(
|
||||
JSExecutor& executor, std::string callJSON, bool isEndOfBatch) override {
|
||||
JSExecutor& executor, folly::dynamic&& calls, bool isEndOfBatch) override {
|
||||
ExecutorToken token = m_nativeToJs->getTokenForExecutor(executor);
|
||||
m_nativeQueue->runOnQueue([this, token, callJSON=std::move(callJSON), isEndOfBatch] {
|
||||
m_nativeQueue->runOnQueue([this, token, calls=std::move(calls), isEndOfBatch] () mutable {
|
||||
// An exception anywhere in here stops processing of the batch. This
|
||||
// was the behavior of the Android bridge, and since exception handling
|
||||
// terminates the whole bridge, there's not much point in continuing.
|
||||
for (auto& call : react::parseMethodCalls(callJSON)) {
|
||||
for (auto& call : react::parseMethodCalls(std::move(calls))) {
|
||||
m_registry->callNativeMethod(
|
||||
token, call.moduleId, call.methodId, std::move(call.arguments), call.callId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user