From 9547264a96f16ea94fe6beee45a0fd774368dc68 Mon Sep 17 00:00:00 2001 From: Andy Street Date: Fri, 12 Feb 2016 09:09:44 -0800 Subject: [PATCH] WebWorkers: Rename Bridge.m_jsExecutor -> Bridge.m_mainExecutor Reviewed By: cjhopman Differential Revision: D2921994 fb-gh-sync-id: ec06b922264a443932eb0446ff820aaf3dcacaa7 shipit-source-id: ec06b922264a443932eb0446ff820aaf3dcacaa7 --- ReactAndroid/src/main/jni/react/Bridge.cpp | 24 +++++++++++----------- ReactAndroid/src/main/jni/react/Bridge.h | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/ReactAndroid/src/main/jni/react/Bridge.cpp b/ReactAndroid/src/main/jni/react/Bridge.cpp index 5cc7b2151..a8ee4c2f5 100644 --- a/ReactAndroid/src/main/jni/react/Bridge.cpp +++ b/ReactAndroid/src/main/jni/react/Bridge.cpp @@ -13,24 +13,24 @@ namespace react { Bridge::Bridge(JSExecutorFactory* jsExecutorFactory, Callback callback) : m_callback(std::move(callback)), m_destroyed(std::shared_ptr(new bool(false))) { - m_jsExecutor = jsExecutorFactory->createJSExecutor(this); + m_mainExecutor = jsExecutorFactory->createJSExecutor(this); } // This must be called on the same thread on which the constructor was called. Bridge::~Bridge() { *m_destroyed = true; - m_jsExecutor.reset(); + m_mainExecutor.reset(); } void Bridge::loadApplicationScript(const std::string& script, const std::string& sourceURL) { - m_jsExecutor->loadApplicationScript(script, sourceURL); + m_mainExecutor->loadApplicationScript(script, sourceURL); } void Bridge::loadApplicationUnbundle( std::unique_ptr unbundle, const std::string& startupCode, const std::string& sourceURL) { - m_jsExecutor->loadApplicationUnbundle(std::move(unbundle), startupCode, sourceURL); + m_mainExecutor->loadApplicationUnbundle(std::move(unbundle), startupCode, sourceURL); } void Bridge::callFunction(const double moduleId, const double methodId, const folly::dynamic& arguments) { @@ -40,7 +40,7 @@ void Bridge::callFunction(const double moduleId, const double methodId, const fo #ifdef WITH_FBSYSTRACE FbSystraceSection s(TRACE_TAG_REACT_CXX_BRIDGE, "Bridge.callFunction"); #endif - m_jsExecutor->callFunction(moduleId, methodId, arguments); + m_mainExecutor->callFunction(moduleId, methodId, arguments); } void Bridge::invokeCallback(const double callbackId, const folly::dynamic& arguments) { @@ -50,31 +50,31 @@ void Bridge::invokeCallback(const double callbackId, const folly::dynamic& argum #ifdef WITH_FBSYSTRACE FbSystraceSection s(TRACE_TAG_REACT_CXX_BRIDGE, "Bridge.invokeCallback"); #endif - m_jsExecutor->invokeCallback(callbackId, arguments); + m_mainExecutor->invokeCallback(callbackId, arguments); } void Bridge::setGlobalVariable(const std::string& propName, const std::string& jsonValue) { - m_jsExecutor->setGlobalVariable(propName, jsonValue); + m_mainExecutor->setGlobalVariable(propName, jsonValue); } bool Bridge::supportsProfiling() { - return m_jsExecutor->supportsProfiling(); + return m_mainExecutor->supportsProfiling(); } void Bridge::startProfiler(const std::string& title) { - m_jsExecutor->startProfiler(title); + m_mainExecutor->startProfiler(title); } void Bridge::stopProfiler(const std::string& title, const std::string& filename) { - m_jsExecutor->stopProfiler(title, filename); + m_mainExecutor->stopProfiler(title, filename); } void Bridge::handleMemoryPressureModerate() { - m_jsExecutor->handleMemoryPressureModerate(); + m_mainExecutor->handleMemoryPressureModerate(); } void Bridge::handleMemoryPressureCritical() { - m_jsExecutor->handleMemoryPressureCritical(); + m_mainExecutor->handleMemoryPressureCritical(); } void Bridge::callNativeModules(const std::string& callJSON, bool isEndOfBatch) { diff --git a/ReactAndroid/src/main/jni/react/Bridge.h b/ReactAndroid/src/main/jni/react/Bridge.h index d649c94fa..d9c108a30 100644 --- a/ReactAndroid/src/main/jni/react/Bridge.h +++ b/ReactAndroid/src/main/jni/react/Bridge.h @@ -70,7 +70,7 @@ private: // on the same thread. In that case, the callback will try to run the task on m_callback which // will have been destroyed within ~Bridge(), thus causing a SIGSEGV. std::shared_ptr m_destroyed; - std::unique_ptr m_jsExecutor; + std::unique_ptr m_mainExecutor; }; } }