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

Commit

Permalink
[WEEX-550][Android] add ut to track initframework problem (#1403)
Browse files Browse the repository at this point in the history
Add ut to track initframework problem

Bug: WEEX-550
  • Loading branch information
Darin726 authored and YorkShen committed Aug 9, 2018
1 parent 29c3c80 commit 07c1cef
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
Binary file modified android/sdk/libs/armeabi-v7a/libweexcore.so
Binary file not shown.
Binary file modified android/sdk/libs/armeabi/libweexcore.so
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ public enum WXErrorCode {
WX_JS_FRAMEWORK_INIT_SINGLE_PROCESS_SUCCESS("-1011", "js framework init success in single process",ErrorType.NATIVE_ERROR,ErrorGroup.NATIVE),

WX_JS_FRAMEWORK_INIT_FAILED_PARAMS_NULL("-1012", "js framework init failed due to params null",ErrorType.NATIVE_ERROR, ErrorGroup.NATIVE),

WX_JS_FRAMEWORK_INIT_FAILED_FIND_ICU_TIMEOUT("-1013", "find icu failed",ErrorType.NATIVE_ERROR, ErrorGroup.NATIVE),

/**
* WX Key Exception Commit RT SDK Init
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ extern const char *s_cacheDir;
extern const char *g_jssSoPath;
extern const char *g_jssSoName;
extern bool s_start_pie;

static bool s_in_find_icu = false;
static void doExec(int fd, bool traceEnable, bool startupPie = true);

static int copyFile(const char *SourceFile, const char *NewFile);
Expand Down Expand Up @@ -138,6 +138,9 @@ IPCSender *WeexJSConnection::start(IPCHandler *handler, bool reinit) {
} catch (IPCException &e) {
LOGE("WeexJSConnection catch: %s", e.msg());
// TODO throw exception
if(s_in_find_icu) {
WeexCore::WeexProxy::reportNativeInitStatus("-1013", "find icu timeout");
}
return nullptr;
}
}
Expand Down Expand Up @@ -236,7 +239,9 @@ std::unique_ptr<const char *[]> EnvPBuilder::build() {
void doExec(int fd, bool traceEnable, bool startupPie) {
std::string executablePath;
std::string icuDataPath;
s_in_find_icu = true;
findIcuDataPath(icuDataPath);
s_in_find_icu = false;
if(g_jssSoPath != nullptr) {
executablePath = g_jssSoPath;
}
Expand Down

0 comments on commit 07c1cef

Please sign in to comment.