execute ParseJail synchronously: allows to avoid synchronization deadlocks inside com.github.ericwlange:AndroidJSCore at JSContext instantiation
This commit is contained in:
parent
10da67a63f
commit
bd017457e3
|
@ -7,4 +7,4 @@ MAINNET_NETWORKS_ENABLED=1
|
||||||
ERC20_ENABLED=1
|
ERC20_ENABLED=1
|
||||||
OFFLINE_INBOX_ENABLED=0
|
OFFLINE_INBOX_ENABLED=0
|
||||||
LOG_LEVEL=debug
|
LOG_LEVEL=debug
|
||||||
JSC_ENABLED=0
|
JSC_ENABLED=1
|
||||||
|
|
|
@ -179,7 +179,7 @@ class StatusModule extends ReactContextBaseJavaModule implements LifecycleEventL
|
||||||
String gethLogFileName = "geth.log";
|
String gethLogFileName = "geth.log";
|
||||||
jsonConfig.put("LogEnabled", false);
|
jsonConfig.put("LogEnabled", false);
|
||||||
jsonConfig.put("LogFile", gethLogFileName);
|
jsonConfig.put("LogFile", gethLogFileName);
|
||||||
jsonConfig.put("LogLevel", "DEBUG");
|
jsonConfig.put("LogLevel", "INFO");
|
||||||
jsonConfig.put("DataDir", root + customConfig.get("DataDir"));
|
jsonConfig.put("DataDir", root + customConfig.get("DataDir"));
|
||||||
jsonConfig.put("NetworkId", customConfig.get("NetworkId"));
|
jsonConfig.put("NetworkId", customConfig.get("NetworkId"));
|
||||||
try {
|
try {
|
||||||
|
@ -509,24 +509,17 @@ class StatusModule extends ReactContextBaseJavaModule implements LifecycleEventL
|
||||||
@ReactMethod
|
@ReactMethod
|
||||||
public void parseJail(final String chatId, final String js, final Callback callback) {
|
public void parseJail(final String chatId, final String js, final Callback callback) {
|
||||||
Log.d(TAG, "parseJail chatId:" + chatId);
|
Log.d(TAG, "parseJail chatId:" + chatId);
|
||||||
Log.d(TAG, js);
|
//Log.d(TAG, js);
|
||||||
if (!checkAvailability()) {
|
if (!checkAvailability()) {
|
||||||
callback.invoke(false);
|
callback.invoke(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Thread thread = new Thread() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
String res = jail.parseJail(chatId, js);
|
String res = jail.parseJail(chatId, js);
|
||||||
Log.d(TAG, res);
|
Log.d(TAG, res);
|
||||||
Log.d(TAG, "endParseJail");
|
Log.d(TAG, "endParseJail");
|
||||||
callback.invoke(res);
|
callback.invoke(res);
|
||||||
}
|
}
|
||||||
};
|
|
||||||
|
|
||||||
thread.start();
|
|
||||||
}
|
|
||||||
|
|
||||||
@ReactMethod
|
@ReactMethod
|
||||||
public void callJail(final String chatId, final String path, final String params, final Callback callback) {
|
public void callJail(final String chatId, final String path, final String params, final Callback callback) {
|
||||||
|
|
Loading…
Reference in New Issue