Permalink
Browse files

Rename callFunction to jniCallFunction

Reviewed By: mhorowitz

Differential Revision: D4550996

fbshipit-source-id: bcae58fa83c41aa649466e8cc2ebc2e4aa1b7436
  • Loading branch information...
javache authored and facebook-github-bot committed Feb 15, 2017
1 parent 222856e commit a965f153ff00bce02cd203db29011d1e671ffd0a
@@ -233,7 +233,7 @@ public void runJSBundle() {
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 void runJSBundle() {
return mSourceURL;
}
private native void callJSFunction(
private native void jniCallJSFunction(
ExecutorToken token,
String module,
String method,
@@ -274,10 +274,10 @@ public void callFunction(
}
}
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 void invokeCallback(ExecutorToken executorToken, final int callbackID, fi
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);

0 comments on commit a965f15

Please sign in to comment.