You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ky...@apache.org on 2019/08/19 08:09:06 UTC

[incubator-weex] branch master updated: [Android] Do not sent ipc message when son process crashed (#2838)

This is an automated email from the ASF dual-hosted git repository.

kyork pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-weex.git


The following commit(s) were added to refs/heads/master by this push:
     new 5bce92c  [Android] Do not sent ipc message when son process crashed (#2838)
5bce92c is described below

commit 5bce92c5807ed2890b9a71f2ee987b58065a553b
Author: darin <dy...@qq.com>
AuthorDate: Mon Aug 19 16:09:00 2019 +0800

    [Android] Do not sent ipc message when son process crashed (#2838)
---
 weex_core/Source/android/jsengine/object/weex_env.cpp              | 2 +-
 weex_core/Source/android/jsengine/task/back_to_weex_core_queue.cpp | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/weex_core/Source/android/jsengine/object/weex_env.cpp b/weex_core/Source/android/jsengine/object/weex_env.cpp
index b229e8f..355f29c 100644
--- a/weex_core/Source/android/jsengine/object/weex_env.cpp
+++ b/weex_core/Source/android/jsengine/object/weex_env.cpp
@@ -84,7 +84,7 @@ bool WeexEnv::is_app_crashed() {
     return false;
   bool crashed = crashHandler->is_crashed();
   if (crashed) {
-    LOG_TLOG("jsEngine", "%s", "AppCrashed");
+    LOGE("jsEngine AppCrashed");
   }
   return crashed;
 }
diff --git a/weex_core/Source/android/jsengine/task/back_to_weex_core_queue.cpp b/weex_core/Source/android/jsengine/task/back_to_weex_core_queue.cpp
index 31eafc8..9df7b49 100644
--- a/weex_core/Source/android/jsengine/task/back_to_weex_core_queue.cpp
+++ b/weex_core/Source/android/jsengine/task/back_to_weex_core_queue.cpp
@@ -87,7 +87,7 @@ void BackToWeexCoreQueue::stop() {
 }
 
 void BackToWeexCoreQueue::IPCTask::run() {
-    if (params.empty())
+    if (params.empty() || WeexEnv::getEnv()->is_app_crashed())
         return;
 
     std::unique_ptr<IPCSerializer> serializer(createIPCSerializer());;