Skip to content
This repository was archived by the owner on Jun 3, 2021. It is now read-only.

Commit 36fdc33

Browse files
lucky-chenDarin726
authored andcommitted
Revert "[Android] Android] restart weexCoreThread when reload JSEngine because thread maybe in lock state and can't execute reload action (block) (#2824)" (#2829)
This reverts commit c72e6b5.
1 parent 84c3bb9 commit 36fdc33

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -867,14 +867,6 @@ public int callRefreshFinish(String instanceId, String callback) {
867867

868868
}
869869

870-
public void restartWeexCoreThread(){
871-
WXLogUtils.e("weex","restartWeexCoreThread");
872-
WXThread oldThread = mJSThread;
873-
mJSThread = new WXThread("WeexJSBridgeThread", this);
874-
mJSHandler = mJSThread.getHandler();
875-
oldThread.quit();
876-
}
877-
878870
public int callReportCrashReloadPage(String instanceId, String crashFile) {
879871
boolean isCrashFileEmpty = TextUtils.isEmpty(crashFile);
880872
try {
@@ -926,17 +918,6 @@ public int callReportCrashReloadPage(String instanceId, String crashFile) {
926918
if (WXSDKManager.getInstance().getSDKInstance(instanceId) != null) {
927919
boolean reloadThisInstance = shouldReloadCurrentInstance(
928920
WXSDKManager.getInstance().getSDKInstance(instanceId).getBundleUrl());
929-
boolean restartCoreThread = true;
930-
IWXConfigAdapter adapter = WXSDKManager.getInstance().getWxConfigAdapter();
931-
if (null != adapter){
932-
String config = adapter.getConfig("wxapm","restartCoreThread","true");
933-
restartCoreThread = Boolean.valueOf(config);
934-
}
935-
if (restartCoreThread){
936-
WXBridgeManager.getInstance().restartWeexCoreThread();
937-
}
938-
WXSDKManager.getInstance().getSDKInstance(instanceId).getContainerInfo()
939-
.put("restartWeexCoreThread",String.valueOf(restartCoreThread));
940921
new ActionReloadPage(instanceId, reloadThisInstance).executeAction();
941922
}
942923

0 commit comments

Comments
 (0)