Remove unused PersistentDirectory JSC config
Reviewed By: amnn Differential Revision: D4921075 fbshipit-source-id: 8e0a0caadc882a0e3ffb6f66c2bc7336c7d64849
This commit is contained in:
Родитель
79d9fd8f83
Коммит
366cb5a00a
|
@ -34,7 +34,7 @@ namespace react {
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
static std::string getApplicationDir(const char* methodName) {
|
static std::string getApplicationCacheDir(void) {
|
||||||
// Get the Application Context object
|
// Get the Application Context object
|
||||||
auto getApplicationClass = findClassLocal(
|
auto getApplicationClass = findClassLocal(
|
||||||
"com/facebook/react/common/ApplicationHolder");
|
"com/facebook/react/common/ApplicationHolder");
|
||||||
|
@ -46,7 +46,7 @@ static std::string getApplicationDir(const char* methodName) {
|
||||||
|
|
||||||
// Get getCacheDir() from the context
|
// Get getCacheDir() from the context
|
||||||
auto getDirMethod = findClassLocal("android/app/Application")
|
auto getDirMethod = findClassLocal("android/app/Application")
|
||||||
->getMethod<jobject()>(methodName,
|
->getMethod<jobject()>("getCacheDir",
|
||||||
"()Ljava/io/File;"
|
"()Ljava/io/File;"
|
||||||
);
|
);
|
||||||
auto dirObj = getDirMethod(application);
|
auto dirObj = getDirMethod(application);
|
||||||
|
@ -57,14 +57,6 @@ static std::string getApplicationDir(const char* methodName) {
|
||||||
return getAbsolutePathMethod(dirObj)->toStdString();
|
return getAbsolutePathMethod(dirObj)->toStdString();
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::string getApplicationCacheDir() {
|
|
||||||
return getApplicationDir("getCacheDir");
|
|
||||||
}
|
|
||||||
|
|
||||||
static std::string getApplicationPersistentDir() {
|
|
||||||
return getApplicationDir("getFilesDir");
|
|
||||||
}
|
|
||||||
|
|
||||||
static JSValueRef nativePerformanceNow(
|
static JSValueRef nativePerformanceNow(
|
||||||
JSContextRef ctx,
|
JSContextRef ctx,
|
||||||
JSObjectRef function,
|
JSObjectRef function,
|
||||||
|
@ -95,7 +87,6 @@ class JSCJavaScriptExecutorHolder : public HybridClass<JSCJavaScriptExecutorHold
|
||||||
static local_ref<jhybriddata> initHybrid(alias_ref<jclass>, ReadableNativeArray* jscConfigArray) {
|
static local_ref<jhybriddata> initHybrid(alias_ref<jclass>, ReadableNativeArray* jscConfigArray) {
|
||||||
// See JSCJavaScriptExecutor.Factory() for the other side of this hack.
|
// See JSCJavaScriptExecutor.Factory() for the other side of this hack.
|
||||||
folly::dynamic jscConfigMap = jscConfigArray->consume()[0];
|
folly::dynamic jscConfigMap = jscConfigArray->consume()[0];
|
||||||
jscConfigMap["PersistentDirectory"] = getApplicationPersistentDir();
|
|
||||||
return makeCxxInstance(
|
return makeCxxInstance(
|
||||||
std::make_shared<JSCExecutorFactory>(getApplicationCacheDir(), std::move(jscConfigMap)));
|
std::make_shared<JSCExecutorFactory>(getApplicationCacheDir(), std::move(jscConfigMap)));
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче