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