Fix isBatchActive of RCTCxxBridge (#22785)

Summary:
Seems we lost handler of `isBatchActive` from [RCTBatchedBridge a86171a](a86171a482/React/Base/RCTBatchedBridge.m) to [RCTCxxBridge 5bc7e39](b774820dc2 (diff-a2a67635fffd7b690d14dc17ae563a71)).

Changelog:
----------

[iOS] [fixed] - Fix isBatchActive of RCTCxxBridge
Pull Request resolved: https://github.com/facebook/react-native/pull/22785

Reviewed By: mhorowitz

Differential Revision: D13731897

Pulled By: cpojer

fbshipit-source-id: 8d6b85bcea8fe8997a93b4e1ac8b8007422ca20e
This commit is contained in:
zhongwuzw
2019-01-21 00:24:48 -08:00
committed by Facebook Github Bot
parent be51dbc214
commit d55558e138
5 changed files with 15 additions and 2 deletions

View File

@@ -37,6 +37,10 @@ public:
std::shared_ptr<ModuleRegistry> getModuleRegistry() override {
return m_registry;
}
bool isBatchActive() {
return m_batchHadNativeModuleCalls;
}
void callNativeModules(
JSExecutor& executor, folly::dynamic&& calls, bool isEndOfBatch) override {
@@ -222,6 +226,10 @@ void* NativeToJsBridge::getJavaScriptContext() {
bool NativeToJsBridge::isInspectable() {
return m_executor->isInspectable();
}
bool NativeToJsBridge::isBatchActive() {
return m_delegate->isBatchActive();
}
void NativeToJsBridge::handleMemoryPressure(int pressureLevel) {
runOnExecutorQueue([=] (JSExecutor* executor) {