[go: nahoru, domu]

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

[WEEX-550][Android] add ut to track initframework problem #1403

Merged
merged 1 commit into from
Aug 9, 2018
Merged
Show file tree
Hide file tree
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
[WEEX-550][Android] add ut to track initframework problem
add ut to track initframework problem

Bug: WEEX-550
  • Loading branch information
yayun.dyy committed Aug 9, 2018
commit 677dd39826b4776c16070784ebf07f6f7e746125
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