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

Revert "[Android] Android] restart weexCoreThread when reload JSEngin… #2829

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -867,14 +867,6 @@ public int callRefreshFinish(String instanceId, String callback) {

}

public void restartWeexCoreThread(){
WXLogUtils.e("weex","restartWeexCoreThread");
WXThread oldThread = mJSThread;
mJSThread = new WXThread("WeexJSBridgeThread", this);
mJSHandler = mJSThread.getHandler();
oldThread.quit();
}

public int callReportCrashReloadPage(String instanceId, String crashFile) {
boolean isCrashFileEmpty = TextUtils.isEmpty(crashFile);
try {
Expand Down Expand Up @@ -926,17 +918,6 @@ public int callReportCrashReloadPage(String instanceId, String crashFile) {
if (WXSDKManager.getInstance().getSDKInstance(instanceId) != null) {
boolean reloadThisInstance = shouldReloadCurrentInstance(
WXSDKManager.getInstance().getSDKInstance(instanceId).getBundleUrl());
boolean restartCoreThread = true;
IWXConfigAdapter adapter = WXSDKManager.getInstance().getWxConfigAdapter();
if (null != adapter){
String config = adapter.getConfig("wxapm","restartCoreThread","true");
restartCoreThread = Boolean.valueOf(config);
}
if (restartCoreThread){
WXBridgeManager.getInstance().restartWeexCoreThread();
}
WXSDKManager.getInstance().getSDKInstance(instanceId).getContainerInfo()
.put("restartWeexCoreThread",String.valueOf(restartCoreThread));
new ActionReloadPage(instanceId, reloadThisInstance).executeAction();
}

Expand Down