diff --git a/ReactCommon/cxxreact/JSCExecutor.cpp b/ReactCommon/cxxreact/JSCExecutor.cpp index b87c15d26..c14dd3cc7 100644 --- a/ReactCommon/cxxreact/JSCExecutor.cpp +++ b/ReactCommon/cxxreact/JSCExecutor.cpp @@ -644,6 +644,10 @@ namespace facebook { return m_context; } + bool JSCExecutor::isInspectable() { + return canUseInspector(m_context); + } + #ifdef WITH_JSC_MEMORY_PRESSURE void JSCExecutor::handleMemoryPressure(int pressureLevel) { JSHandleMemoryPressure(this, m_context, static_cast(pressureLevel)); diff --git a/ReactCommon/cxxreact/JSCExecutor.h b/ReactCommon/cxxreact/JSCExecutor.h index 2b85d307d..66c101c53 100644 --- a/ReactCommon/cxxreact/JSCExecutor.h +++ b/ReactCommon/cxxreact/JSCExecutor.h @@ -93,6 +93,8 @@ public: virtual void* getJavaScriptContext() override; + virtual bool isInspectable() override; + #ifdef WITH_JSC_MEMORY_PRESSURE virtual void handleMemoryPressure(int pressureLevel) override; #endif diff --git a/ReactCommon/cxxreact/JSExecutor.h b/ReactCommon/cxxreact/JSExecutor.h index 83f9e1534..93c16a67b 100644 --- a/ReactCommon/cxxreact/JSExecutor.h +++ b/ReactCommon/cxxreact/JSExecutor.h @@ -75,10 +75,15 @@ public: virtual void setGlobalVariable(std::string propName, std::unique_ptr jsonValue) = 0; + virtual void* getJavaScriptContext() { return nullptr; } + virtual bool isInspectable() { + return false; + } + /** * The description is displayed in the dev menu, if there is one in * this build. There is a default, but if this method returns a