Add API for sync function calls

Reviewed By: javache

Differential Revision: D3897526

fbshipit-source-id: cadead316996ca7c1dd2b0d60d87945f5452640c
This commit is contained in:
Marc Horowitz
2016-09-26 16:01:43 -07:00
committed by Facebook Github Bot 7
parent 6071e8ca2c
commit d7a2d3a957
4 changed files with 66 additions and 1 deletions

View File

@@ -55,6 +55,11 @@ class Instance {
void callJSCallback(ExecutorToken token, uint64_t callbackId, folly::dynamic&& params);
MethodCallResult callSerializableNativeHook(ExecutorToken token, unsigned int moduleId,
unsigned int methodId, folly::dynamic&& args);
// This method is experimental, and may be modified or removed.
template <typename T>
Value callFunctionSync(const std::string& module, const std::string& method, T&& args) {
return nativeToJsBridge_->callFunctionSync(module, method, std::forward<T>(args));
}
ExecutorToken getMainExecutorToken();
void handleMemoryPressureUiHidden();