std::string JSCExecutor::invokeCallback(const double callbackId, const folly::dynamic& arguments) { // TODO: Make this a first class function instead of evaling. #9317773 std::vector<folly::dynamic> call{ (double) callbackId, std::move(arguments) }; return executeJSCallWithJSC(m_context, "invokeCallbackAndReturnFlushedQueue", std::move(call)); }
void JSCExecutor::invokeCallback(const double callbackId, const folly::dynamic& arguments) { // TODO: Make this a first class function instead of evaling. #9317773 std::vector<folly::dynamic> call{ (double) callbackId, std::move(arguments) }; std::string calls = executeJSCallWithJSC(m_context, "invokeCallbackAndReturnFlushedQueue", std::move(call)); m_bridge->callNativeModules(*this, calls, true); }
std::string JSCExecutor::callFunction(const double moduleId, const double methodId, const folly::dynamic& arguments) { // TODO: Make this a first class function instead of evaling. #9317773 std::vector<folly::dynamic> call{ (double) moduleId, (double) methodId, std::move(arguments), }; return executeJSCallWithJSC(m_context, "callFunctionReturnFlushedQueue", std::move(call)); }
void JSCExecutor::flush() { if (m_owner != nullptr) { // Web workers don't support native modules yet return; } // TODO: Make this a first class function instead of evaling. #9317773 std::string calls = executeJSCallWithJSC(m_context, "flushedQueue", std::vector<folly::dynamic>()); m_bridge->callNativeModules(calls, true); }
void JSCExecutor::callFunction(const std::string& moduleId, const std::string& methodId, const folly::dynamic& arguments) { // TODO: Make this a first class function instead of evaling. #9317773 std::vector<folly::dynamic> call{ moduleId, methodId, std::move(arguments), }; std::string calls = executeJSCallWithJSC(m_context, "callFunctionReturnFlushedQueue", std::move(call)); m_bridge->callNativeModules(*this, calls, true); }
void JSCExecutor::flush() { // TODO: Make this a first class function instead of evaling. #9317773 std::string calls = executeJSCallWithJSC(m_context, "flushedQueue", std::vector<folly::dynamic>()); m_bridge->callNativeModules(*this, calls, true); }
std::string JSCExecutor::flush() { // TODO: Make this a first class function instead of evaling. #9317773 return executeJSCallWithJSC(m_context, "flushedQueue", std::vector<folly::dynamic>()); }