mirror of
https://github.com/status-im/react-native.git
synced 2025-02-05 14:13:26 +00:00
Rename callFunction to jniCallFunction
Reviewed By: mhorowitz Differential Revision: D4550996 fbshipit-source-id: bcae58fa83c41aa649466e8cc2ebc2e4aa1b7436
This commit is contained in:
parent
222856ea3a
commit
a965f153ff
@ -233,7 +233,7 @@ public class CatalystInstanceImpl implements CatalystInstance {
|
||||
mAcceptCalls = true;
|
||||
|
||||
for (PendingJSCall call : mJSCallsPendingInit) {
|
||||
callJSFunction(call.mExecutorToken, call.mModule, call.mMethod, call.mArguments);
|
||||
jniCallJSFunction(call.mExecutorToken, call.mModule, call.mMethod, call.mArguments);
|
||||
}
|
||||
mJSCallsPendingInit.clear();
|
||||
}
|
||||
@ -248,7 +248,7 @@ public class CatalystInstanceImpl implements CatalystInstance {
|
||||
return mSourceURL;
|
||||
}
|
||||
|
||||
private native void callJSFunction(
|
||||
private native void jniCallJSFunction(
|
||||
ExecutorToken token,
|
||||
String module,
|
||||
String method,
|
||||
@ -274,10 +274,10 @@ public class CatalystInstanceImpl implements CatalystInstance {
|
||||
}
|
||||
}
|
||||
|
||||
callJSFunction(executorToken, module, method, arguments);
|
||||
jniCallJSFunction(executorToken, module, method, arguments);
|
||||
}
|
||||
|
||||
private native void callJSCallback(ExecutorToken executorToken, int callbackID, NativeArray arguments);
|
||||
private native void jniCallJSCallback(ExecutorToken executorToken, int callbackID, NativeArray arguments);
|
||||
|
||||
@Override
|
||||
public void invokeCallback(ExecutorToken executorToken, final int callbackID, final NativeArray arguments) {
|
||||
@ -286,7 +286,7 @@ public class CatalystInstanceImpl implements CatalystInstance {
|
||||
return;
|
||||
}
|
||||
|
||||
callJSCallback(executorToken, callbackID, arguments);
|
||||
jniCallJSCallback(executorToken, callbackID, arguments);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -107,8 +107,8 @@ void CatalystInstanceImpl::registerNatives() {
|
||||
makeNativeMethod("jniLoadScriptFromFile", CatalystInstanceImpl::jniLoadScriptFromFile),
|
||||
makeNativeMethod("jniLoadScriptFromOptimizedBundle",
|
||||
CatalystInstanceImpl::jniLoadScriptFromOptimizedBundle),
|
||||
makeNativeMethod("callJSFunction", CatalystInstanceImpl::callJSFunction),
|
||||
makeNativeMethod("callJSCallback", CatalystInstanceImpl::callJSCallback),
|
||||
makeNativeMethod("jniCallJSFunction", CatalystInstanceImpl::jniCallJSFunction),
|
||||
makeNativeMethod("jniCallJSCallback", CatalystInstanceImpl::jniCallJSCallback),
|
||||
makeNativeMethod("getMainExecutorToken", CatalystInstanceImpl::getMainExecutorToken),
|
||||
makeNativeMethod("setGlobalVariable", CatalystInstanceImpl::setGlobalVariable),
|
||||
makeNativeMethod("getJavaScriptContext", CatalystInstanceImpl::getJavaScriptContext),
|
||||
@ -225,7 +225,7 @@ void CatalystInstanceImpl::jniLoadScriptFromOptimizedBundle(const std::string& b
|
||||
flags);
|
||||
}
|
||||
|
||||
void CatalystInstanceImpl::callJSFunction(
|
||||
void CatalystInstanceImpl::jniCallJSFunction(
|
||||
JExecutorToken* token, std::string module, std::string method, NativeArray* arguments) {
|
||||
// We want to share the C++ code, and on iOS, modules pass module/method
|
||||
// names as strings all the way through to JS, and there's no way to do
|
||||
@ -240,7 +240,7 @@ void CatalystInstanceImpl::callJSFunction(
|
||||
arguments->consume());
|
||||
}
|
||||
|
||||
void CatalystInstanceImpl::callJSCallback(JExecutorToken* token, jint callbackId, NativeArray* arguments) {
|
||||
void CatalystInstanceImpl::jniCallJSCallback(JExecutorToken* token, jint callbackId, NativeArray* arguments) {
|
||||
instance_->callJSCallback(token->getExecutorToken(nullptr), callbackId, arguments->consume());
|
||||
}
|
||||
|
||||
|
@ -58,8 +58,8 @@ class CatalystInstanceImpl : public jni::HybridClass<CatalystInstanceImpl> {
|
||||
void jniLoadScriptFromAssets(jni::alias_ref<JAssetManager::javaobject> assetManager, const std::string& assetURL);
|
||||
void jniLoadScriptFromFile(const std::string& fileName, const std::string& sourceURL);
|
||||
void jniLoadScriptFromOptimizedBundle(const std::string& bundlePath, const std::string& sourceURL, jint flags);
|
||||
void callJSFunction(JExecutorToken* token, std::string module, std::string method, NativeArray* arguments);
|
||||
void callJSCallback(JExecutorToken* token, jint callbackId, NativeArray* arguments);
|
||||
void jniCallJSFunction(JExecutorToken* token, std::string module, std::string method, NativeArray* arguments);
|
||||
void jniCallJSCallback(JExecutorToken* token, jint callbackId, NativeArray* arguments);
|
||||
local_ref<JExecutorToken::JavaPart> getMainExecutorToken();
|
||||
void setGlobalVariable(std::string propName,
|
||||
std::string&& jsonValue);
|
||||
|
Loading…
x
Reference in New Issue
Block a user