[incubator-weex] branch master updated (10f7406 -> f29a6f2)
This is an automated email from the ASF dual-hosted git repository. luckychen pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-weex.git. from 10f7406 Merge pull request #3080 from yaochenfeng/feature/web new fbd2f94 Support Tmall preInstall new 36f46fa Merge branch 'feature/tmall-preInstall' into 'release/20190925' new 8a0737d Let WxInstance know wether Page'sRenderObject is dirty to control vsync sequence new 8210352 Updatex86 wtf new 27acb4e Merge release/20190525 into master. new cb8c979 Fix Lint problems new f29a6f2 Merge pull request #3081 from YorkShen/release/20190925 The 11953 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../main/java/org/apache/weex/WXEnvironment.java | 14 +- .../main/java/org/apache/weex/WXSDKInstance.java | 47 +++- .../main/java/org/apache/weex/bridge/WXBridge.java | 9 + .../org/apache/weex/bridge/WXBridgeManager.java| 4 +- .../java/org/apache/weex/common/IWXBridge.java | 2 +- .../Symbol.java => jsEngine/CallBackCode.java} | 26 +- .../IExecutable.java => jsEngine/EnvCallback.java} | 8 +- .../JSBiz.java}| 14 +- .../java/org/apache/weex/jsEngine/JSContext.java | 122 + .../java/org/apache/weex/jsEngine/JSEngine.java| 98 .../IExecutable.java => jsEngine/JSException.java} | 8 +- .../IExecutable.java => jsEngine/JSFunction.java} | 8 +- .../java/org/apache/weex/utils/WXFileUtils.java| 4 +- .../org/apache/weex/utils/WXSoInstallMgrSdk.java | 6 +- android/settings.gradle| 12 - weex_core/Source/CMakeLists.txt| 3 + .../android/bridge/platform/android_side.cpp | 7 + .../Source/android/bridge/platform/android_side.h | 1 + .../bridge/script/script_side_in_multi_process.cpp | 20 ++ .../bridge/script/script_side_in_multi_process.h | 2 + .../bridge/script/script_side_in_multi_so.cpp | 7 + .../bridge/script/script_side_in_multi_so.h| 2 + .../bridge/script_bridge_in_multi_process.cpp | 272 - weex_core/Source/android/jsengine/CMakeLists.txt | 3 + .../platform/platform_side_multi_process.cpp | 3 + .../bridge/platform/platform_side_multi_process.h | 1 + .../script/script_bridge_in_multi_process.cpp | 24 ++ .../bridge/script/script_bridge_in_multi_process.h | 1 + .../bridge/script/script_bridge_in_multi_so.cpp| 6 +- .../bridge/script/script_bridge_in_multi_so.h | 2 + .../bridge/script/script_side_in_queue.cpp | 46 ++-- .../jsengine/bridge/script/script_side_in_queue.h | 2 + .../bridge/script/script_side_in_simple.cpp| 4 +- .../jsengine/bridge/script/script_side_in_simple.h | 3 + .../Source/android/jsengine/object/js_action.cpp | 214 .../Source/android/jsengine/object/js_action.h | 110 + .../Source/android/jsengine/object/weex_env.cpp| 22 +- .../Source/android/jsengine/object/weex_env.h | 14 +- .../jsengine/task/impl/js_action_task.cpp} | 61 ++--- ...xe_js_on_app_with_result.h => js_action_task.h} | 33 +-- weex_core/Source/android/jsengine/weex_runtime.cpp | 4 +- weex_core/Source/android/utils/jni_load.cc | 4 +- weex_core/Source/android/wrap/js_context.cpp | 200 +++ .../android/wrap/{hash_set.h => js_context.h} | 31 ++- weex_core/Source/android/wrap/js_processer.cpp | 113 + .../jni_type.h => android/wrap/js_processer.h} | 32 ++- weex_core/Source/android/wrap/wx_bridge.cpp| 9 + weex_core/Source/android/wrap/wx_bridge.h | 1 + weex_core/Source/base/CMakeLists.txt | 1 + .../android/jniprebuild/jniheader/JSContext_jni.h | 94 +++ .../android/jniprebuild/jniheader/WXBridge_jni.h | 25 +- .../{jni_type.h => jsengine_ptr_container.h} | 27 +- .../core/bridge/platform/core_side_in_platform.cpp | 8 + .../core/bridge/platform/core_side_in_platform.h | 2 + weex_core/Source/core/bridge/platform_bridge.h | 7 + weex_core/Source/core/bridge/script_bridge.h | 2 + weex_core/Source/core/render/page/render_page.cpp | 10 +- weex_core/Source/core/render/page/render_page.h| 2 +- weex_core/Source/include/WeexApiHeader.h | 2 + weex_core/Source/js_runtime/CMakeLists.txt | 3 + .../weex/bridge/script/script_side_in_queue.cpp| 8 + .../weex/bridge/script/script_side_in_simple.cpp | 3 + .../{native_timer_task.cpp => js_action_task.cpp} | 38 +-- ...pdate_global_config_task.h => js_action_task.h} | 33 +-- weex_core/Source/third_party/IPC/IPCMessageJ
[incubator-weex] branch master updated (f72fc93 -> cc43523)
This is an automated email from the ASF dual-hosted git repository. luckychen pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-weex.git. from f72fc93 Merge pull request #3045 from wqyfavor/dark-mode-dev new 1d857d3 Fix Poplayer multi Thread Native Crash new 4aa2036 Revert "Fix Poplayer multi Thread Native Crash" new 5fc6dcf [Android] fix memleak for apm new 0a11249 Merge branch 'bugfix/0.26.4.15-memleack' into 'release/20190925' new e61d0a4 [Android] fix mmap leak and zombie process new 12d3f5d Merge branch 'release/20190925_mmap' into 'release/20190925' new 2f6678a [Android] fix cell animation ,same as ios demo:https://jsplayground.taobao.org/raxplayground/073b16df-c0b0-4b13-a04f-64f3bcee13f9?spm=a2o8d.corp_prod_issue_detail_v2.0.0.3c40274fTD2suj new 66b5f27 Merge branch 'release/20190925_animation' into 'release/20190925' new 659883e Merge branch 'master' into release/20190925 new cc43523 Merge pull request #3046 from YorkShen/release/20190925 The 11912 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes:
[incubator-weex] branch master updated: Merge Release/20190925 into maser (#3044)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 3624206 Merge Release/20190925 into maser (#3044) 3624206 is described below commit 362420665246b92c9a2e69fa4c72e08cb375b092 Author: YorkShen AuthorDate: Fri Nov 29 18:00:58 2019 +0800 Merge Release/20190925 into maser (#3044) * Fix Poplayer multi Thread Native Crash * Revert "Fix Poplayer multi Thread Native Crash" This reverts commit 1d857d3df7100f5fac3856668ad8e71672c870ed. * [Android] fix memleak for apm * [Android] fix mmap leak and zombie process * [Android] fix cell animation ,same as ios demo:https://jsplayground.taobao.org/raxplayground/073b16df-c0b0-4b13-a04f-64f3bcee13f9?spm=a2o8d.corp_prod_issue_detail_v2.0.0.3c40274fTD2suj --- .../sdk/src/main/java/org/apache/weex/bridge/WXParams.java | 13 + .../apache/weex/ui/component/list/BasicListComponent.java | 2 +- .../Source/android/multiprocess/weex_js_connection.cpp | 9 - weex_core/Source/android/utils/params_utils.cpp | 10 ++ weex_core/Source/core/manager/weex_core_manager.h | 12 +++- weex_core/Source/third_party/IPC/IPCFutexPageQueue.cpp | 1 + 6 files changed, 44 insertions(+), 3 deletions(-) diff --git a/android/sdk/src/main/java/org/apache/weex/bridge/WXParams.java b/android/sdk/src/main/java/org/apache/weex/bridge/WXParams.java index 66b98e6..7f2c265 100644 --- a/android/sdk/src/main/java/org/apache/weex/bridge/WXParams.java +++ b/android/sdk/src/main/java/org/apache/weex/bridge/WXParams.java @@ -19,6 +19,8 @@ package org.apache.weex.bridge; import org.apache.weex.WXEnvironment; +import org.apache.weex.WXSDKManager; +import org.apache.weex.adapter.IWXConfigAdapter; import org.apache.weex.base.CalledByNative; import org.apache.weex.utils.WXLogUtils; @@ -142,6 +144,17 @@ public class WXParams implements Serializable { return deviceWidth; } + @CalledByNative + public boolean getReleaseMap() { +IWXConfigAdapter adapter = WXSDKManager.getInstance().getWxConfigAdapter(); +if (null == adapter){ + return false; +} +String doRelease = adapter.getConfigWhenInit("wxapm","release_map","true"); +WXLogUtils.e("getReleaseMap:"+doRelease); +return "true".equalsIgnoreCase(doRelease); + } + /** * Device should not be set manually, instead it suppose to represent the width of device and diff --git a/android/sdk/src/main/java/org/apache/weex/ui/component/list/BasicListComponent.java b/android/sdk/src/main/java/org/apache/weex/ui/component/list/BasicListComponent.java index ecbd621..d4b8f52 100644 --- a/android/sdk/src/main/java/org/apache/weex/ui/component/list/BasicListComponent.java +++ b/android/sdk/src/main/java/org/apache/weex/ui/component/list/BasicListComponent.java @@ -834,7 +834,7 @@ public abstract class BasicListComponentlisten(); } catch (IPCException ) { LOGE("IPCException server died %s",e.msg()); -base::android::DetachFromVM(); WeexCore::WeexCoreManager::Instance()->server_queue_= nullptr; +if (WeexCoreManager::Instance()->do_release_map()){ +futexPageQueue.reset(); +} +base::android::DetachFromVM(); pthread_exit(NULL); } +WeexCore::WeexCoreManager::Instance()->server_queue_= nullptr; +if (WeexCoreManager::Instance()->do_release_map()){ +futexPageQueue.reset(); +} return nullptr; } diff --git a/weex_core/Source/android/utils/params_utils.cpp b/weex_core/Source/android/utils/params_utils.cpp index 5c8d05f..abeaa86 100644 --- a/weex_core/Source/android/utils/params_utils.cpp +++ b/weex_core/Source/android/utils/params_utils.cpp @@ -17,6 +17,7 @@ * under the License. */ +#include #include "android/utils/params_utils.h" #include "android/base/string/string_utils.h" #include "android/utils/so_utils.h" @@ -221,6 +222,15 @@ std::vector initFromParam( } } + jmethodID m_release_map = env->GetMethodID(c_params, "getReleaseMap", "()Z"); + if (m_release_map == nullptr) { +WeexCoreManager::Instance()->set_release_map(false); +LOGE("m_release_map method is missing"); + } else { +jboolean j_release_map_bool = env->CallBooleanMethod(params,m_release_map); +WeexCoreManager::Instance()->set_release_map(j_release_map_bool==JNI_TRUE); + } + jmethodID m_get_jsc_so_path = env->GetMethodID(c_params, "getLibJscPath", "()Ljava/lang/String;"); if (m_get_jsc_so_path != nullptr) { diff --git a/weex_core/Source/core/manager/weex_core_manager.h b/weex_core/Source/core/m
[incubator-weex] branch master updated: Merge Release/20190925 into master (#3031)
This is an automated email from the ASF dual-hosted git repository. luckychen pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-weex.git View the commit online: https://github.com/apache/incubator-weex/commit/0871a1b11096bd44ec578a9f1221d3bfa7fc4ff1 The following commit(s) were added to refs/heads/master by this push: new 0871a1b Merge Release/20190925 into master (#3031) 0871a1b is described below commit 0871a1b11096bd44ec578a9f1221d3bfa7fc4ff1 Author: YorkShen AuthorDate: Thu Nov 21 11:36:15 2019 +0800 Merge Release/20190925 into master (#3031) * Fix Poplayer multi Thread Native Crash * Revert "Fix Poplayer multi Thread Native Crash" This reverts commit 1d857d3df7100f5fac3856668ad8e71672c870ed. * [Android] fix memleak for apm --- .../sdk/src/main/java/org/apache/weex/performance/WXInstanceApm.java| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/sdk/src/main/java/org/apache/weex/performance/WXInstanceApm.java b/android/sdk/src/main/java/org/apache/weex/performance/WXInstanceApm.java index 273a60e..39d9019 100644 --- a/android/sdk/src/main/java/org/apache/weex/performance/WXInstanceApm.java +++ b/android/sdk/src/main/java/org/apache/weex/performance/WXInstanceApm.java @@ -391,7 +391,7 @@ public class WXInstanceApm { exceptionRecord.clear(); mUIHandler.removeCallbacks(jsPerformanceCallBack); onStage(KEY_PAGE_STAGES_DESTROY); -if (!mHasInit){ +if (mHasInit && null != apmInstance){ apmInstance.onEnd(); } mEnd = true;
[incubator-weex] branch master updated: [Android] Fix task skipping problem of download. (#2987)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 032ede3 [Android] Fix task skipping problem of download. (#2987) 032ede3 is described below commit 032ede37e0b38e37e5e23398b436f4cb4de2c4a2 Author: YorkShen AuthorDate: Mon Oct 28 21:17:26 2019 +0800 [Android] Fix task skipping problem of download. (#2987) * [Android] Fix task skipping problem of download. * Update build.gradle for downloading. * Update JCenter information. --- android/sdk/buildSrc/download_jsc.gradle | 6 ++ android/sdk/buildSrc/jcenter.gradle | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/android/sdk/buildSrc/download_jsc.gradle b/android/sdk/buildSrc/download_jsc.gradle index 07dbe3a..c75c90e 100644 --- a/android/sdk/buildSrc/download_jsc.gradle +++ b/android/sdk/buildSrc/download_jsc.gradle @@ -33,6 +33,9 @@ def downloadJSC = { URL url, File dest -> task download(){ inputs.property('url', jsc_url) outputs.file(jsc_file) +outputs.upToDateWhen { +jsc_file.exists() +} doFirst { if (!jsc_file.exists()) { downloadJSC(jsc_url, jsc_file) @@ -56,6 +59,9 @@ task unzipJSC(type: Copy, dependsOn: download) { } inputs.file(jsc_file) outputs.file(aar_file) +outputs.upToDateWhen { +aar_file.exists() +} } task copyJscToJniDir(type: Copy, dependsOn: unzipJSC) { diff --git a/android/sdk/buildSrc/jcenter.gradle b/android/sdk/buildSrc/jcenter.gradle index 13b2424..fb8b55a 100644 --- a/android/sdk/buildSrc/jcenter.gradle +++ b/android/sdk/buildSrc/jcenter.gradle @@ -19,7 +19,7 @@ def siteUrl = 'https://weex.apache.org/' def gitUrl = 'https://github.com/apache/incubator-weex.git' def mailingList = 'd...@weex.apache.org' -def description='Weex release is always under the form of source code, the JCenter distribuion is only used for users\' convenience. View https://weex.apache.org/download/download.html for all the source code release' +def description='Apache Weex is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate th [...] install { repositories.mavenInstaller { // This generates POM.xml with proper parameters @@ -39,7 +39,7 @@ install { } developers { developer { -name 'Apache Weex(Incubating) PPMC' +name 'Apache Weex PPMC' email mailingList } }
[incubator-weex] branch master updated: Update readme (#2984)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 6a06d13 Update readme (#2984) 6a06d13 is described below commit 6a06d13918762d9d1d2214875e13e335f18d8243 Author: YorkShen AuthorDate: Fri Oct 25 14:29:07 2019 +0800 Update readme (#2984) --- README.md | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 18fc007..5ea279f 100644 --- a/README.md +++ b/README.md @@ -13,10 +13,12 @@ A framework for building Mobile cross-platform UI. | | -- | | Android | [sdk ![Download](https://api.bintray.com/packages/weex/Android/sdk/images/download.svg)](https://bintray.com/weex/Android/sdk/_latestVersion) Or [sdk_legacy ![Download](https://api.bintray.com/packages/weex/Android/sdk_legacy/images/download.svg)](https://bintray.com/weex/Android/sdk_legacy/_latestVersion) | | iOS | [![Pod version](https://badge.fury.io/co/WeexSDK.svg)](https://cocoapods.org/pods/WeexSDK) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) | -| [Mobile Web](https://github.com/weexteam/weex-vue-render) | [![npm version](https://badge.fury.io/js/weex-html5.svg)](https://www.npmjs.com/package/weex-vue-render) | +| [Mobile Web](https://github.com/weexteam/vue-render-for-apache-weex) | [![npm version](https://badge.fury.io/js/weex-html5.svg)](https://www.npmjs.com/package/weex-vue-render) | Support Android 4.1 (API 16), iOS 8.0+ and WebKit 534.30+. +**FYI: The [mobile web render](https://github.com/weexteam/vue-render-for-apache-weex) is not supported by Apache Weex officially** + ## For Windows First of all, compiling or building Weex from Windows is not support officially. @@ -83,8 +85,9 @@ You can either build Weex from IDE (*XCode*) or command line. Please read [How To Build](./HOW-TO-BUILD.md) for detail. ### Mobile Web +**Vue Render for Apache Weex is a third party plugin, and not developed nor maintained by Apache Weex.** -see [weex-vue-render](https://github.com/weexteam/weex-vue-render). +see [Vue Render for Apache Weex](https://github.com/weexteam/vue-render-for-apache-weex). ## Scripts
[incubator-weex] branch master updated: Merge Release/0.28 into master (#2968)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 8922b1e Merge Release/0.28 into master (#2968) 8922b1e is described below commit 8922b1e0549e2b6ffd09a7352755f4b3be24a2ba Author: YorkShen AuthorDate: Thu Oct 24 16:16:31 2019 +0800 Merge Release/0.28 into master (#2968) * Remove possible-notices-for-bin-dist * Update changelog * Update setting.gradle * Remove .iml fiie * Update publish_release_candiate. * Update HOW-TO-BUILD.md * Update build.gradle * Add the ability of unbundling JSC from weex_sdk.aar. * Update playground * Update readme. * Update readme * Update playground * Update Readme * Update apache release. * Update build script * Update build.gradle for Jcenter publication. * Update playground version * Update version for jCenter publication. * Update build.gradle * Update build.gradle * Update build.gradle * Update playground * Update documentation --- .rat-excludes| 29 ++ CHANGELOG.md | 4 +- HOW-TO-BUILD.md | 9 ++- LICENSE | 2 +- NOTICE | 2 +- POSSIBLE-NOTICES-FOR-BIN-DIST| 98 README.md| 14 +++-- android/README.md| 7 ++- android/build.gradle | 8 ++- android/sdk/build.gradle | 14 +++-- android/sdk/buildSrc/download_jsc.gradle | 5 +- android/sdk/buildSrc/jcenter.gradle | 64 - android/settings.gradle | 4 +- scripts/publish_release_candidate.sh | 4 +- scripts/publish_release_official.sh | 12 ++-- scripts/release_files.rules | 3 + weex-playground | 2 +- 17 files changed, 127 insertions(+), 154 deletions(-) diff --git a/.rat-excludes b/.rat-excludes index 45a4dce..6a131ce 100644 --- a/.rat-excludes +++ b/.rat-excludes @@ -1,11 +1,18 @@ -\.gitignore -\.git/.* -ios/playground -.rat-excludes -build -.*\.json -Info\.plist -.*\.xml -.*\.pch -main\.js -\./ios/playground/Pods/.* +index.js +array.js +dep.js +object.js +observer.js +state.js +watcher.js +WXDataStructureUtil.java +json11.cc +json11.hpp +modp_b64_data.h +modp_b64.cc +modp_b64.h +icu_utf.h +icu_utf.cpp +jni_generator.py +futex.h +base64.hpp \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index b0aebf5..e84c768 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,8 @@ * Unified C++ log system of WeexCore. ### Android -* Upgrade targetsdk & compilesdk to 28 -* Change Android package name from `com.taobao.weex` to `org.apache.weex`. Ref [link](https://github.com/apache/incubator-weex/tree/master/android) for detail. +* Upgrade targetsdk & compilesdk to 28 +* Change Android package name from `com.taobao.weex` to `org.apache.weex`, ref [link](https://github.com/apache/incubator-weex/tree/master/android#build-types) * Switch to BSD-Licensed [android-jsc](https://www.npmjs.com/package/jsc-android) as the default JavaScript Interpreter. ## Main Bugfix diff --git a/HOW-TO-BUILD.md b/HOW-TO-BUILD.md index 26e36e9..ee73899 100644 --- a/HOW-TO-BUILD.md +++ b/HOW-TO-BUILD.md @@ -15,7 +15,7 @@ The environment required to build weex is categorized by platforms. ## Android * JDK `1.8+` * Android SDK Platform 28 - * `$ANDROID_HOME` must be configured by using `export ANDROID_HOME=/path_to_sdk` + * `ANDROID_HOME` must be configured by using `export ANDROID_HOME=/path_to_sdk` * Normally, you should install [Android Studio](https://developer.android.com/studio) to get Android SDK Platform 28 installed. * Gradle 4.10+ * NDK `r18` @@ -57,8 +57,11 @@ Build the javascript libraries: ### Before build Native SDK Move `min` version to Native SDK folder, which will be used by native SDK build. -> `cp packages/weex-js-framework/index.min.js ios/sdk/WeexSDK/Resources/main.js` -> `cp packages/weex-js-framework/index.min.js android/sdk/assets/main.js` + +``` +cp packages/weex-js-framework/index.min.js ios/sdk/WeexSDK/Resources/main.js +cp packages/weex-js-framework/index.min.js android/sdk/assets/main.js +``` ## Build Android SDK 1. Install the [Android environment](#android). diff --git a/LICENSE b/LICENSE index 2cb1b58..4d5db27 100644 --- a/LICENSE +++ b/LICENSE @@ -187,7 +187,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [] [name of copyright owner] + Copyright 2019
[incubator-weex] branch master updated: [data-render] fix interactive time record is not correct in wlasm mode (#2977)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 e5d78b6 [data-render] fix interactive time record is not correct in wlasm mode (#2977) e5d78b6 is described below commit e5d78b6351f4bb0ddc5d1c7336f235b39d75d889 Author: Xu Jiacheng AuthorDate: Tue Oct 22 10:50:14 2019 +0800 [data-render] fix interactive time record is not correct in wlasm mode (#2977) --- android/sdk/src/main/java/org/apache/weex/WXSDKInstance.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/android/sdk/src/main/java/org/apache/weex/WXSDKInstance.java b/android/sdk/src/main/java/org/apache/weex/WXSDKInstance.java index d2ed97e..0ea578c 100644 --- a/android/sdk/src/main/java/org/apache/weex/WXSDKInstance.java +++ b/android/sdk/src/main/java/org/apache/weex/WXSDKInstance.java @@ -1647,6 +1647,9 @@ public class WXSDKInstance implements IWXActivityStateListener,View.OnLayoutChan if (!isNewFsEnd){ getApmForInstance().arriveNewFsRenderTime(); } +if (!getApmForInstance().stageMap.containsKey(WXInstanceApm.KEY_PAGE_STAGES_INTERACTION)){ + getApmForInstance().arriveInteraction(getRootComponent()); +} long time = System.currentTimeMillis() - mRenderStartTime; long[] renderFinishTime = WXBridgeManager.getInstance().getRenderFinishTime(getInstanceId());
[incubator-weex] branch master updated: [Android] Fix task order problem. (#2964)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 0688a24 [Android] Fix task order problem. (#2964) 0688a24 is described below commit 0688a2419a0f9ee2270dc8092acb9065c16e9b21 Author: YorkShen AuthorDate: Mon Oct 14 11:05:24 2019 +0800 [Android] Fix task order problem. (#2964) * [Android] Fix task order problem. * Change shouldRunAfter to mustRunAfter * Change runAfter to dependsOn. * Update build.gradle --- android/sdk/build.gradle | 5 ++--- android/sdk/buildSrc/asan.gradle | 7 +-- android/sdk/buildSrc/download_jsc.gradle | 3 --- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/android/sdk/build.gradle b/android/sdk/build.gradle index eb179e6..ecd1182 100755 --- a/android/sdk/build.gradle +++ b/android/sdk/build.gradle @@ -26,12 +26,12 @@ apply plugin: 'checkstyle' apply plugin: 'com.jfrog.bintray' apply plugin: 'com.github.dcendents.android-maven' -apply from: 'buildSrc/asan.gradle' apply from: 'buildSrc/jcenter.gradle' apply from: 'buildSrc/unstripped.gradle' apply from: 'buildSrc/checkStyle.gradle' apply from: 'buildSrc/download_jsc.gradle' apply from: 'buildSrc/packageName.gradle' +apply from: 'buildSrc/asan.gradle' version = project.hasProperty('weexVersion') ? project.getProperty('weexVersion') : '0.26.0.1' @@ -228,7 +228,6 @@ android { } dependencies { -implementation fileTree(include: ['*.jar'], dir: 'libs') //noinspection GradleDependency compileOnly "com.android.support:recyclerview-v7:${project.supportLibVersion}" //noinspection GradleDependency @@ -284,4 +283,4 @@ task weex_core_license(type: com.hierynomus.gradle.license.tasks.LicenseFormat) 'Source/include/JavaScriptCore/**/*.cpp']) } -preBuild.dependsOn copyASanLib, checkNdkVersion, licenseFormat \ No newline at end of file +preBuild.dependsOn licenseFormat \ No newline at end of file diff --git a/android/sdk/buildSrc/asan.gradle b/android/sdk/buildSrc/asan.gradle index 0042851..df81979 100644 --- a/android/sdk/buildSrc/asan.gradle +++ b/android/sdk/buildSrc/asan.gradle @@ -46,7 +46,8 @@ task copyWrapScript(type: Copy,dependsOn: clearASanLibs) { } } } -task copyASanLib(type: Copy,dependsOn: copyWrapScript){ +task copyASanLib(type: Copy){ +dependsOn copyWrapScript, copyJscToJniDir if(project.hasProperty('enableASan') && "true" == project.getProperty('enableASan')) { def ndkPath = ndkDir == '' ? System.getenv("ANDROID_NDK_HOME"):ndkDir def dir = ndkPath + '/toolchains/llvm/prebuilt/' @@ -67,4 +68,6 @@ task copyASanLib(type: Copy,dependsOn: copyWrapScript){ includeEmptyDirs = false } } -} \ No newline at end of file +} + +preBuild.dependsOn copyASanLib, checkNdkVersion \ No newline at end of file diff --git a/android/sdk/buildSrc/download_jsc.gradle b/android/sdk/buildSrc/download_jsc.gradle index f9447f6..a83fafe 100644 --- a/android/sdk/buildSrc/download_jsc.gradle +++ b/android/sdk/buildSrc/download_jsc.gradle @@ -60,9 +60,6 @@ task unzipJSC(type: Copy, dependsOn: download) { task copyJscToJniDir(type: Copy, dependsOn: unzipJSC) { def libsDir = project.android.sourceSets.main.jniLibs.srcDirs[-1] -doFirst{ -delete libsDir -} from zipTree(aar_file) into libsDir include 'jni/**/*.so'
[incubator-weex] branch master updated (685ec8a -> ce518bc)
This is an automated email from the ASF dual-hosted git repository. luckychen pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-weex.git. from 685ec8a [Android] Download JSC header files from remote during compiling (#2960) add ce518bc Add ASF license header to a bunch of files. (#2963) No new revisions were added by this update. Summary of changes: LICENSE| 1 - android/build.gradle | 19 ++- android/sdk/buildSrc/asan.gradle | 18 ++ android/sdk/buildSrc/checkStyle.gradle | 18 ++ android/sdk/buildSrc/download_jsc.gradle | 18 ++ android/sdk/buildSrc/jcenter.gradle| 18 ++ android/sdk/buildSrc/packageName.gradle| 18 ++ android/sdk/buildSrc/unstripped.gradle | 18 ++ android/sdk/build_jss_r.sh | 16 android/sdk/lint.xml | 18 ++ android/sdk/wrap.sh| 16 android/settings.gradle| 18 ++ weex_core/Source/third_party/json11/CMakeLists.txt | 18 ++ 13 files changed, 212 insertions(+), 2 deletions(-)
[incubator-weex] branch master updated: [Android] Download JSC header files from remote during compiling (#2960)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 685ec8a [Android] Download JSC header files from remote during compiling (#2960) 685ec8a is described below commit 685ec8acd3dd5ca107e802ca578924bc7361b82d Author: YorkShen AuthorDate: Sat Oct 12 14:25:15 2019 +0800 [Android] Download JSC header files from remote during compiling (#2960) * [Android] use jsc api header.h for runtimeMode * Fix the problem of task update. * Remove header files for good. * Update .gitignore * Update CMake. * Update copy rule * Create Dir by manual * Revert "Create Dir by manual" This reverts commit f4896078416f18511ce5a5adc4ef638b8ecbf197. * Add log * Fix clean problem. * Fix task dependency problem * Fix cleanCopyProguard problem --- LICENSE| 299 - android/sdk/build.gradle | 5 +- android/sdk/buildSrc/download_jsc.gradle | 26 ++- android/sdk/buildSrc/packageName.gradle| 17 +- scripts/release_files.rules| 9 +- weex_core/.gitignore | 2 + weex_core/Source/js_runtime/CMakeLists.txt | 3 +- 7 files changed, 44 insertions(+), 317 deletions(-) diff --git a/LICENSE b/LICENSE index 0f64676..cf60cd5 100644 --- a/LICENSE +++ b/LICENSE @@ -408,305 +408,6 @@ This product bundles chromium v66.0.3344.2, which is available under a "BSD-styl This product bundles Android Open Source Project vandroid-4.2.2_r1, which is available under a "BSD" license. For details, see https://android.googlesource.com/platform/bionic/+/android-4.2.2_r1/libc/README and following files: weex_core/Source/IPC/futex.h -This product bundles Webkit 2.17.4, which is available under a "BSD-style" license. For details, reference https://webkit.org/licensing-webkit/ for license and see https://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.17.4 for following files: - - Bmalloc in WebKit: - weex_core/Source/android/jsengine/dependence/bmalloc: - CMakeLists.txt - ChangeLog - Makefile - - weex_core/Source/android/jsengine/dependence/bmalloc/Configurations: - Base.xcconfig - DebugRelease.xcconfig - bmalloc.xcconfig - mbmalloc.xcconfig - - weex_core/Source/android/jsengine/dependence/bmalloc/bmalloc: - Algorithm.h - Allocator.cpp - Allocator.h - AsyncTask.h - AvailableMemory.cpp - AvailableMemory.h - BAssert.h - BPlatform.h - BumpAllocator.h - BumpRange.h - Cache.cpp - Cache.h - Chunk.h - Deallocator.cpp - Deallocator.h - DebugHeap.cpp - DebugHeap.h - Environment.cpp - Environment.h - FixedVector.h - Heap.cpp - Heap.h - Inline.h - LargeMap.cpp - LargeMap.h - LargeRange.h - LineMetadata.h - List.h - Logging.cpp - Logging.h - Map.h - Mutex.h - Object.h - ObjectType.cpp - ObjectType.h - PerProcess.h - PerThread.h - Range.h - ScopeExit.h - Sizes.h - SmallLine.h - SmallPage.h - StaticMutex.cpp - StaticMutex.h - Syscall.h - VMAllocate.h - VMHeap.cpp - VMHeap.h - Vector.h - Zone.cpp - Zone.h - bmalloc.h - mbmalloc.cpp - - weex_core/Source/android/jsengine/dependence/bmalloc/bmalloc/darwin: - BSoftLinking.h - - weex_core/Source/android/jsengine/dependence/bmalloc/bmalloc.xcodeproj: - project.pbxproj - - ICU in WebKit: - weex_core/Source/android/jsengine/dependence/icu: - LICENSE - README - - weex_core/Source/android/jsengine/dependence/icu/unicode: - localpointer.h - parseerr.h - platform.h - ptypes.h - putil.h - ucal.h - uchar.h - ucnv.h - ucnv_err.h - ucol.h - uconfig.h - ucurr.h - udat.h - udatpg.h - udisplaycontext.h - uenum.h - uformattable.h - uiter.h - uloc.h - umachine.h - umisc.h - unorm.h - unorm2.h - unum.h - unumsys.h - urename.h - uscript.h - uset.h - ustring.h - utf.h - utf16.h - utf8.h - utf_old.h - utypes.h - uvernum.h - uversion.h - - JavaScriptCore in WebKit: - weex_core/Source/include/JavaScriptCore/A
[incubator-weex] branch feature/jsc_header created (now 7e6c1a8)
This is an automated email from the ASF dual-hosted git repository. luckychen pushed a change to branch feature/jsc_header in repository https://gitbox.apache.org/repos/asf/incubator-weex.git. at 7e6c1a8 [Android] use jsc api header.h for runtimeMode No new revisions were added by this update.
[incubator-weex] branch master updated: * [Android] Remove shared library from binary of Weex (#2940)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 739e07f * [Android] Remove shared library from binary of Weex (#2940) 739e07f is described below commit 739e07f3e5426c9bdfbaec5c08838de3b5db8281 Author: YorkShen AuthorDate: Fri Oct 11 16:53:05 2019 +0800 * [Android] Remove shared library from binary of Weex (#2940) * [Android] Make JS Interpolator in Android as replaceable. * [Android] support switch javascriptCore (legacy)or jsc (apache) * [Android] fix * [Android] Revert the commit of initConfig. --- .travis.yml| 6 +-- android/sdk/.gitignore | 3 +- android/sdk/build.gradle | 22 ++-- android/sdk/buildSrc/download_jsc.gradle | 57 + android/sdk/buildSrc/packageName.gradle| 12 - android/sdk/libs/arm64-v8a/libJavaScriptCore.so| Bin 9258456 -> 0 bytes android/sdk/libs/arm64-v8a/libWTF.so | Bin 522016 -> 0 bytes android/sdk/libs/armeabi-v7a/libJavaScriptCore.so | Bin 5237568 -> 0 bytes android/sdk/libs/armeabi-v7a/libWTF.so | Bin 472828 -> 0 bytes android/sdk/libs/x86/libJavaScriptCore.so | Bin 12134688 -> 0 bytes android/sdk/libs/x86/libWTF.so | Bin 488784 -> 0 bytes .../main/java/org/apache/weex/WXEnvironment.java | 36 ++--- .../java/org/apache/weex/utils/WXFileUtils.java| 5 +- .../org/apache/weex/utils/WXSoInstallMgrSdk.java | 4 +- weex_core/Source/CMakeLists.txt| 17 +++--- weex_core/Source/js_runtime/CMakeLists.txt | 18 +-- .../Source/js_runtime/weex/utils/weex_jsc_utils.h | 5 ++ .../Source/libs/arm64-v8a/libJavaScriptCore.so | Bin 9278912 -> 0 bytes weex_core/Source/libs/arm64-v8a/libWTF.so | Bin 522016 -> 0 bytes .../Source/libs/armeabi-v7a/libJavaScriptCore.so | Bin 5237308 -> 0 bytes weex_core/Source/libs/armeabi-v7a/libWTF.so| Bin 472828 -> 0 bytes weex_core/Source/libs/armeabi/libJavaScriptCore.so | Bin 5237308 -> 0 bytes weex_core/Source/libs/armeabi/libWTF.so| Bin 472828 -> 0 bytes weex_core/Source/libs/x86/libJavaScriptCore.so | Bin 13729888 -> 0 bytes weex_core/Source/libs/x86/libWTF.so| Bin 805056 -> 0 bytes 25 files changed, 127 insertions(+), 58 deletions(-) diff --git a/.travis.yml b/.travis.yml index 28e3aff..e709618 100644 --- a/.travis.yml +++ b/.travis.yml @@ -138,9 +138,9 @@ script: if npm run danger -- ci --dangerfile ./dangerfile-android.js | grep -q "hasAndroidFile" ; then cd android ./gradlew clean assembleRelease --quiet -PbuildRuntimeApi=true ${GRADLE_ABI} -PapachePackageName="false" || exit 1 - ./gradlew assembleRelease --quiet -PbuildRuntimeApi=false ${GRADLE_ABI} -PapachePackageName="false" || exit 1 - ./gradlew :weex_sdk:assembleRelease --quiet -PbuildRuntimeApi=true ${GRADLE_ABI} -PapachePackageName="true" || exit 1 - ./gradlew :weex_sdk:assembleRelease --quiet -PbuildRuntimeApi=false ${GRADLE_ABI} -PapachePackageName="true" || exit 1 + ./gradlew assembleRelease --quiet ${GRADLE_ABI} -PbuildRuntimeApi=false -Pjsc_url="https://raw.githubusercontent.com/apache/incubator-weex/release/0.26/android/sdk/weex_sdk-0.26.0.aar; -Paar_name="weex_sdk" -PJSInterpolatorName="JavaScriptCore" -PapachePackageName="false" || exit 1 + ./gradlew :weex_sdk:assembleRelease --quiet -PbuildRuntimeApi=true ${GRADLE_ABI} -PapachePackageName="true" || exit 1 + ./gradlew :weex_sdk:assembleRelease --quiet ${GRADLE_ABI} -PbuildRuntimeApi=false -Pjsc_url="https://raw.githubusercontent.com/apache/incubator-weex/release/0.26/android/sdk/weex_sdk-0.26.0.aar; -Paar_name="weex_sdk" -PJSInterpolatorName="JavaScriptCore" -PapachePackageName="true" || exit 1 fi ;; "jsfm" ) diff --git a/android/sdk/.gitignore b/android/sdk/.gitignore index f29323d..8074061 100755 --- a/android/sdk/.gitignore +++ b/android/sdk/.gitignore @@ -16,7 +16,8 @@ assets/weex-main-jsfm.js assets/weex-rax-api.js .externalNativeBuild -/libs/armeabi +/libs/ +/src/main/jniLibs /src/legacyRelease/ proguard-rules-legacy.pro \ No newline at end of file diff --git a/android/sdk/build.gradle b/android/sdk/build.gradle index 32ce256..d1660f0 100755 --- a/android/sdk/build.gradle +++ b/android/sdk/build.gradle @@ -31,6 +31,7 @@ apply from: 'buildSrc/jcenter.gradle' apply from: 'buildSrc/unstripped.gradle' apply from: 'buildSrc/checkSt
[incubator-weex] branch master updated: Update scripts for apache release.
This is an automated email from the ASF dual-hosted git repository. luckychen 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 01adab8 Update scripts for apache release. new bf02df0 Merge pull request #2955 from YorkShen/feature/update 01adab8 is described below commit 01adab8c17bd90fa922cd46b1ec11ba6429d4184 Author: YorkShen AuthorDate: Thu Oct 10 11:48:12 2019 +0800 Update scripts for apache release. --- .gitignore | 1 + CHANGELOG.md | 1 + HOW-TO-BUILD.md| 79 ++ LICENSE| 2 +- README.md | 51 ++ android/sdk/build.gradle | 2 +- android/sdk/buildSrc/unstripped.gradle | 6 +- .../org/apache/weex/utils/WXDataStructureUtil.java | 27 dangerfile.js | 1 + ios/sdk/WeexSDK.xcodeproj/project.pbxproj | 13 ++-- ios/sdk/WeexSDK/Sources/Utility/WXVersion.m| 38 +-- scripts/build_from_source.sh | 60 +++- scripts/generate_apache_source.sh | 31 + scripts/release_files.rules| 19 -- 14 files changed, 121 insertions(+), 210 deletions(-) diff --git a/.gitignore b/.gitignore index 4a9783d..1c5e235 100644 --- a/.gitignore +++ b/.gitignore @@ -50,6 +50,7 @@ android/sdk/.externalNativeBuild/ndkBuild/ android/HeronAndroid/.externalNativeBuild/ # release +apache-weex-incubating-* apache_release_temp RELEASE_NOTE.md RELEASE_AUDIT.LOG diff --git a/CHANGELOG.md b/CHANGELOG.md index 91976e4..b0aebf5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,5 +6,6 @@ ### Android * Upgrade targetsdk & compilesdk to 28 * Change Android package name from `com.taobao.weex` to `org.apache.weex`. Ref [link](https://github.com/apache/incubator-weex/tree/master/android) for detail. +* Switch to BSD-Licensed [android-jsc](https://www.npmjs.com/package/jsc-android) as the default JavaScript Interpreter. ## Main Bugfix diff --git a/HOW-TO-BUILD.md b/HOW-TO-BUILD.md index a07099f..2e80002 100644 --- a/HOW-TO-BUILD.md +++ b/HOW-TO-BUILD.md @@ -1,5 +1,5 @@ # Weex Apache Source Release -Weex produce SDKs to integrate with iOS/Android/Mobile web applications. This file will cover how to build Weex from source. You can either use the script we provided or manually build from source step by step. +Weex produce SDKs to integrate with iOS/Android/Mobile web applications. This file will cover how to build Weex from command line. You can either use the script we provided or manually build from source step by step. See `README.md` for further information about the Weex Framework. Weex SDK includes 3 different SDKs to use in corresponding system/browser: @@ -9,32 +9,36 @@ Weex SDK includes 3 different SDKs to use in corresponding system/browser: See our [guide in our website](http://weex.apache.org/guide/integrate-to-your-app.html) to learn more about how to integrate Weex SDK into your app. -## Build Environment -The environment required to build weex is: -* Android SDK: -* NodeJS 4.0+ -* JDK 1.6+ -* Android SDK(`$ANDROID_HOME` must be set properly) -* Gradle 2.0+ -* NDK r18 and ndk 13 (**Both of them are needed**) -* [Ninja 1.8.2+](https://ninja-build.org/) -* CMake 3.9.0+ -* iOS SDK: -* NodeJS 4.0+ -* XCode & Command Tools 8.0+ -* Mobile web SDK: -* NodeJS 4.0+ +# Build Environment +The environment required to build weex is categorized by platforms. + +## Android +* JDK `1.8+` +* Android SDK Platform 28 + * `$ANDROID_HOME` must be configured by using `export ANDROID_HOME=/path_to_ndk` + * Normally, you should install [Android Studio](https://developer.android.com/studio) to get Android SDK Platform 28 installed. +* Gradle 4.10+ +* NDK `r18` + * `ANDROID_NDK_HOME` must be configured by using `export ANDROID_NDK_HOME=/path_to_ndk` + * Higher version of NDK than `r18` isn't not tested yet. +* CMake 3.4.1+ + +## iOS +* Install [iOS Environment](https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppStoreDistributionTutorial/Setup/Setup.html) +* Install [CocoaPods](https://guides.cocoapods.org/using/getting-started.html) +* XCode Command Tools 8.0+ + +## Mobile +* NodeJS 4.0+ This article was tested in MacOSX system. # Build All by Script This script will build Android and iOS SDKs: -> `$ bash scripts/build_from_source.sh $NDK13_dir $NDK_16dir` +> `$ bash scripts/build_from_source.sh ` -The `$NDK18_dir` should be the directory of NDK 18, otherwise the Android build would failed. - -This may take a while. After that, you can look in `dist/`, `android/sd
[incubator-weex] branch master updated (2c169da -> 15264ee)
This is an automated email from the ASF dual-hosted git repository. luckychen pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-weex.git. from 2c169da [iOS] Fix the problem that background color should use [UIColor clearColor] instance when transparent. (#2942) new 2bef3bb [Android] close alarm_signal for release test new e2dc1bb [iOS] add WXTabbarComponentCreatedCallback on instance new fe41a75 Revert "[Android] Change default value to from NAN to 0 (#2883)" new b9c003a Revert "[Android]support "wx" in animation and wxtext (#2783)" new c8ab8f1 [Android] Split whitescreen code which reboot count>50 new 6845123 Merge branch 'release/20190925-ws-code' into 'release/20190925' new 433a6c2 Merge branch 'release/20190925' new 55c1da4 [Android] public method readStreamToString new 4d91cb5 Merge branch 'release/20190925' new 555ae82 [Android] open enableAlarmSignal config new 43fa33d Merge branch 'release/20190925-opensignalswitch' into 'release/20190925' new 6f5d057 Merge branch 'release/20190925' new 4135133 Update Travis new 15264ee Merge pull request #2939 from YorkShen/master The 11803 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .travis.yml | 8 android/sdk/src/main/java/org/apache/weex/WXSDKInstance.java | 3 +++ .../sdk/src/main/java/org/apache/weex/bridge/WXBridgeManager.java | 6 +- android/sdk/src/main/java/org/apache/weex/common/WXErrorCode.java | 2 +- .../main/java/org/apache/weex/dom/transition/WXTransition.java| 4 android/sdk/src/main/java/org/apache/weex/utils/WXFileUtils.java | 2 +- ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.h | 3 ++- 7 files changed, 16 insertions(+), 12 deletions(-)
[incubator-weex] branch master updated (87454ac -> 601fcb2)
This is an automated email from the ASF dual-hosted git repository. luckychen pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-weex.git. from 87454ac [iOS] Fix problem that _backgroundColor causing multithread crashing. (#2934) add 601fcb2 * [Android] Remove android test files as they are not runnable anyway and could lead confusion by the package name `com.taobao.weex (#2932) No new revisions were added by this update. Summary of changes: .../test/java/com/taobao/weex/TestActivity.java| 29 -- .../test/java/com/taobao/weex/TestApplication.java | 27 -- .../test/java/com/taobao/weex/WXSDKEngineTest.java | 108 -- .../java/com/taobao/weex/WXSDKInstanceTest.java| 198 --- .../java/com/taobao/weex/WXSDKManagerTest.java | 49 --- .../taobao/weex/adapter/DefaultUriAdapterTest.java | 116 --- .../appfram/clipboard/WXClipboardModuleTest.java | 75 .../appfram/navigator/WXNavigatorModuleTest.java | 174 -- .../weex/appfram/storage/DefaultWXStorageTest.java | 107 -- .../weex/appfram/storage/WXStorageModuleTest.java | 130 --- .../taobao/weex/bridge/WXBridgeManagerTest.java| 168 - .../java/com/taobao/weex/bridge/WXBridgeTest.java | 77 - .../java/com/taobao/weex/bridge/WXHashMapTest.java | 85 - .../taobao/weex/bridge/WXModuleManagerTest.java| 103 -- .../java/com/taobao/weex/common/TestModule.java| 44 --- .../com/taobao/weex/common/TestModuleFactory.java | 37 -- .../java/com/taobao/weex/common/WXModuleTest.java | 28 -- .../test/java/com/taobao/weex/dom/WXAttrTest.java | 137 .../java/com/taobao/weex/dom/WXDomManagerTest.java | 69 .../com/taobao/weex/dom/WXDomStatementTest.java| 292 .../test/java/com/taobao/weex/dom/WXStyleTest.java | 138 .../com/taobao/weex/dom/WXTextDomObjectTest.java | 87 - .../com/taobao/weex/http/WXStreamModuleTest.java | 188 -- .../com/taobao/weex/ui/ComponentHolderTest.java| 66 .../com/taobao/weex/ui/WXRenderStatementTest.java | 137 .../weex/ui/animation/WXAnimationModuleTest.java | 61 .../taobao/weex/ui/component/ComponentTest.java| 94 - .../weex/ui/component/EditComponentTest.java | 136 .../taobao/weex/ui/component/TestComponent.java| 35 -- .../taobao/weex/ui/component/TestConstants.java| 36 -- .../com/taobao/weex/ui/component/TextareaTest.java | 69 .../taobao/weex/ui/component/WXComponentTest.java | 114 --- .../com/taobao/weex/ui/component/WXDivTest.java| 120 --- .../com/taobao/weex/ui/component/WXEmbedTest.java | 69 .../com/taobao/weex/ui/component/WXHeaderTest.java | 35 -- .../com/taobao/weex/ui/component/WXImageTest.java | 155 - .../taobao/weex/ui/component/WXLoadingTest.java| 70 .../taobao/weex/ui/component/WXRefreshTest.java| 74 .../taobao/weex/ui/component/WXScrollerTest.java | 80 - .../weex/ui/component/WXSliderNeighborTest.java| 101 -- .../com/taobao/weex/ui/component/WXSliderTest.java | 151 - .../com/taobao/weex/ui/component/WXSwitchTest.java | 72 .../com/taobao/weex/ui/component/WXTextTest.java | 161 - .../com/taobao/weex/ui/component/WXVideoTest.java | 80 - .../com/taobao/weex/ui/component/WXWebTest.java| 174 -- .../ui/component/helper/WXTimeInputHelperTest.java | 68 .../ui/component/list/DefaultDragHelperTest.java | 129 --- .../ui/component/list/WXListComponentTest.java | 123 --- .../taobao/weex/ui/module/WXMetaModuleTest.java| 77 - .../taobao/weex/ui/module/WXModalUIModuleTest.java | 80 - .../taobao/weex/ui/module/WXTimerModuleTest.java | 197 --- .../taobao/weex/ui/module/WXWebViewModuleTest.java | 65 .../weex/ui/view/WXCirclePageAdapterTest.java | 107 -- .../com/taobao/weex/ui/view/WXScrollViewTest.java | 87 - .../com/taobao/weex/ui/view/WXWebViewTest.java | 128 --- .../weex/ui/view/border/BorderCornerTest.java | 320 - .../weex/ui/view/border/BorderDrawableTest.java| 377 - .../taobao/weex/ui/view/gesture/WXGestureTest.java | 77 - .../com/taobao/weex/utils/FunctionParserTest.java | 40 --- .../com/taobao/weex/utils/TypefaceUtilTest.java| 51 --- .../com/taobao/weex/utils/WXFileUtilsTest.java | 65 .../com/taobao/weex/utils/WXJsonUtilsTest.java | 100 -- .../java/com/taobao/weex/utils/WXLogUtilsTest.java | 95 -- .../taobao/weex/utils/WXReflectionUtilsTest.java | 126 --- .../com/taobao/weex/utils/WXResourceUtilsTest.java | 145 .../java/com/taobao/weex/utils/WXUtilsTest.java| 184 -- .../configuration/MockitoConfiguration.java| 29 -- 67 files changed, 7226 deletions(-) delete mode 100644 android/sdk/src/test/java/com/taobao/weex/TestActivity.java
[incubator-weex] branch master updated: * [Android] Avoid ArrayIndexOutOfBounds in RenderPage::MoveRenderObject (#2919)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 ec1ec23 * [Android] Avoid ArrayIndexOutOfBounds in RenderPage::MoveRenderObject (#2919) ec1ec23 is described below commit ec1ec238cf03e538e8d07a383befcb5fa2785518 Author: YorkShen AuthorDate: Mon Sep 23 14:59:00 2019 +0800 * [Android] Avoid ArrayIndexOutOfBounds in RenderPage::MoveRenderObject (#2919) * * [Android] Avoid ArrayIndexOutOfBounds in RenderPage::MoveRenderObject * Update import --- .../src/main/java/com/taobao/weex/bridge/WXBridgeManager.java | 3 +++ .../sdk/src/main/java/com/taobao/weex/common/WXErrorCode.java | 3 +++ weex_core/Source/core/render/page/render_page.cpp | 10 ++ 3 files changed, 16 insertions(+) diff --git a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java index 94ac0cd..1c81ede 100755 --- a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java +++ b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java @@ -152,6 +152,7 @@ public class WXBridgeManager implements Callback, BactchExecutor { public static final String METHOD_UPDATE_COMPONENT_WITH_DATA = "UpdateComponentData"; private static final String METHOD_POST_TASK_TO_MSG_LOOP = "PostTaskToMsgLoop"; private static final String METHOD_JSFM_NOT_INIT_IN_EAGLE_MODE = "JsfmNotInitInEagleMode"; + private static final String METHOD_MOVE_RENDER_OBJECT = "RenderPage::MoveRenderObject"; public static final String METHOD_DESTROY_INSTANCE = "destroyInstance"; public static final String METHOD_CALL_JS = "callJS"; public static final String METHOD_SET_TIMEOUT = "setTimeoutCallback"; @@ -2585,6 +2586,8 @@ public class WXBridgeManager implements Callback, BactchExecutor { METHOD_JSFM_NOT_INIT_IN_EAGLE_MODE.equals(function) ) && !instance.getApmForInstance().hasAddView){ reportErrorCode = WXErrorCode.WX_DEGRAD_EAGLE_RENDER_ERROR; + } else if (METHOD_MOVE_RENDER_OBJECT.equals(function)) { +reportErrorCode = WXErrorCode.WX_ERROR_MOVE_RENDER_OBJECT_OUT_OF_BOUNDS; } instance.onJSException(reportErrorCode.getErrorCode(), function, exception); } diff --git a/android/sdk/src/main/java/com/taobao/weex/common/WXErrorCode.java b/android/sdk/src/main/java/com/taobao/weex/common/WXErrorCode.java index 56029ac..e15eb08 100644 --- a/android/sdk/src/main/java/com/taobao/weex/common/WXErrorCode.java +++ b/android/sdk/src/main/java/com/taobao/weex/common/WXErrorCode.java @@ -276,6 +276,9 @@ public enum WXErrorCode { WX_ERR_HASH_MAP_TMP("-10010", "WX_ERR_HASH_MAP_TMP",ErrorType.NATIVE_ERROR,ErrorGroup.NATIVE), + WX_ERROR_MOVE_RENDER_OBJECT_OUT_OF_BOUNDS("-2120", "Index out of bounds when move element", + ErrorType.NATIVE_ERROR, ErrorGroup.JS), + /** * TEST */ diff --git a/weex_core/Source/core/render/page/render_page.cpp b/weex_core/Source/core/render/page/render_page.cpp index f13b271..7560848 100755 --- a/weex_core/Source/core/render/page/render_page.cpp +++ b/weex_core/Source/core/render/page/render_page.cpp @@ -221,6 +221,16 @@ bool RenderPage::MoveRenderObject(const std::string , } } + if(index > new_parent->getChildCount()){ +std::stringstream msg; +msg << "Out of array bounds when RenderPage::MoveRenderObject, specified index: " +<< index << "array size " << new_parent->getChildCount(); + +WeexCore::WeexCoreManager::Instance()->getPlatformBridge()->platform_side() +->ReportException(page_id().c_str(), "RenderPage::MoveRenderObject", msg.str().c_str()); +return false; + } + set_is_dirty(true); child->getParent()->removeChild(child); new_parent->addChildAt(child, index);
[incubator-weex] branch master updated: [Android] Split build.gradle file into 5 files. (#2927)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 c542823 [Android] Split build.gradle file into 5 files. (#2927) c542823 is described below commit c542823029adc92cecebbf8eb66a17d127b15e99 Author: YorkShen AuthorDate: Fri Sep 20 17:35:17 2019 +0800 [Android] Split build.gradle file into 5 files. (#2927) --- android/build.gradle| 1 + android/sdk/build.gradle| 228 +--- android/sdk/buildSrc/asan.gradle| 52 android/sdk/buildSrc/checkStyle.gradle | 14 ++ android/sdk/buildSrc/jcenter.gradle | 66 + android/sdk/buildSrc/packageName.gradle | 33 + android/sdk/buildSrc/unstripped.gradle | 50 +++ 7 files changed, 223 insertions(+), 221 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 3112b63..6a3c4db 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -58,6 +58,7 @@ ext { fastjsonLibVersion="1.1.70.android" //Default value for disableCov is false disableCov = project.hasProperty("disableCov") && disableCov.equals("true") +useApachePackageName = project.hasProperty('apachePackageName') ? project.property('apachePackageName').toBoolean() : true implementFromWeex = true } diff --git a/android/sdk/build.gradle b/android/sdk/build.gradle index e6c6b75..d14f25c 100755 --- a/android/sdk/build.gradle +++ b/android/sdk/build.gradle @@ -26,20 +26,11 @@ apply plugin: 'checkstyle' apply plugin: 'com.jfrog.bintray' apply plugin: 'com.github.dcendents.android-maven' -task checkstyle(type: Checkstyle) { -configFile file("${project.rootDir}/sdk/config/quality/checkstyle.xml") // Where my checkstyle config is... -// configProperties.checkstyleSuppressionsPath = file("${project.rootDir}/config/quality/checkstyle/suppressions.xml").absolutePath // Where is my suppressions file for checkstyle is... -source 'src' -include '**/*.java' -exclude '**/gen/**' -exclude '**/test/**' -exclude '**/com/taobao/weex/dom/flex/**' -classpath = files() -} - -checkstyle { -toolVersion = '6.9' -} +apply from: 'buildSrc/asan.gradle' +apply from: 'buildSrc/jcenter.gradle' +apply from: 'buildSrc/unstripped.gradle' +apply from: 'buildSrc/checkStyle.gradle' +apply from: 'buildSrc/packageName.gradle' version = project.hasProperty('weexVersion') ? project.getProperty('weexVersion') : '0.26.0.1' @@ -62,8 +53,6 @@ if (!project.hasProperty('ignoreVersionCheck') || !project.getProperty('ignoreVe } } -def useApachePackageName = project.hasProperty('apachePackageName') ? project.property('apachePackageName').toBoolean() : true - android { compileSdkVersion project.compileSdkVersion resourcePrefix "weex" @@ -114,7 +103,7 @@ android { def buildRuntimeApi = project.hasProperty('buildRuntimeApi') ? project.property('buildRuntimeApi') : false -defaultPublishConfig useApachePackageName ? 'apacheRelease' : 'legacyRelease' +defaultPublishConfig project.useApachePackageName ? 'apacheRelease' : 'legacyRelease' defaultConfig { buildConfigField "String", "buildJavascriptFrameworkVersion", "\"${jsfmVersion}\"" @@ -188,7 +177,7 @@ android { sourceSets { main.assets.srcDirs = ['assets'] main.jniLibs.srcDirs = ['libs'] -if(!useApachePackageName){ +if(!project.useApachePackageName){ main.java.srcDirs = ['src/legacyRelease/java'] main.manifest.srcFile (new File('src/legacyRelease/AndroidManifest.xml')) } @@ -267,207 +256,4 @@ task weex_core_license(type: com.hierynomus.gradle.license.tasks.LicenseFormat) 'Source/include/JavaScriptCore/**/*.cpp']) } -def ndkDir = '' -task checkNdkVersion() { -def rootDir = project.rootDir -def localProperties = new File(rootDir, "local.properties") -if (localProperties.exists()) { -Properties properties = new Properties() -localProperties.withInputStream { instr -> -properties.load(instr) -} -ndkDir = properties.getProperty('ndk.dir') -} -} - -def siteUrl = 'https://weex.incubator.apache.org' -def gitUrl = 'https://github.com/apache/incubator-weex.git' -group = "com.taobao.android" -install { -repositories.mavenInstaller { -// This generates POM.xml with proper parameters -pom { -project { -packaging 'aar' -name 'weex_sdk' -url siteUrl -licenses { -license { -name 'The Apache Software License, Version 2.0' -
[incubator-weex] branch master updated: [Android] Add the ability of renaming package by -PapachePackageName=false (#2925)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 9b07a12 [Android] Add the ability of renaming package by -PapachePackageName=false (#2925) 9b07a12 is described below commit 9b07a12a4a9845e878dd17e24e2771f847428adc Author: YorkShen AuthorDate: Fri Sep 20 15:02:54 2019 +0800 [Android] Add the ability of renaming package by -PapachePackageName=false (#2925) --- android/gradle.properties | 1 - android/sdk/.gitignore| 1 + android/sdk/build.gradle | 206 +++--- 3 files changed, 121 insertions(+), 87 deletions(-) diff --git a/android/gradle.properties b/android/gradle.properties index 8583e59..c520341 100755 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -13,5 +13,4 @@ #Mon Jun 27 20:06:22 CST 2016 org.gradle.jvmargs=-Xmx4096m -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 org.gradle.parallel=true -android.enableAapt2=false android.enableD8=false \ No newline at end of file diff --git a/android/sdk/.gitignore b/android/sdk/.gitignore index b173f6b..b4cd062 100755 --- a/android/sdk/.gitignore +++ b/android/sdk/.gitignore @@ -18,3 +18,4 @@ assets/weex-rax-api.js /libs/armeabi +/src/legacyRelease/ diff --git a/android/sdk/build.gradle b/android/sdk/build.gradle index 2a9654e..e6c6b75 100755 --- a/android/sdk/build.gradle +++ b/android/sdk/build.gradle @@ -26,13 +26,6 @@ apply plugin: 'checkstyle' apply plugin: 'com.jfrog.bintray' apply plugin: 'com.github.dcendents.android-maven' -//if(!project.disableCov){ -//apply plugin: 'com.vanniktech.android.junit.jacoco' -//junitJacoco { -//excludes = ['com/taobao/weex/dom/flex/**','com/taobao/weex/ui/view/refresh/circlebar/**'] -//} -//} - task checkstyle(type: Checkstyle) { configFile file("${project.rootDir}/sdk/config/quality/checkstyle.xml") // Where my checkstyle config is... // configProperties.checkstyleSuppressionsPath = file("${project.rootDir}/config/quality/checkstyle/suppressions.xml").absolutePath // Where is my suppressions file for checkstyle is... @@ -69,6 +62,8 @@ if (!project.hasProperty('ignoreVersionCheck') || !project.getProperty('ignoreVe } } +def useApachePackageName = project.hasProperty('apachePackageName') ? project.property('apachePackageName').toBoolean() : true + android { compileSdkVersion project.compileSdkVersion resourcePrefix "weex" @@ -119,6 +114,8 @@ android { def buildRuntimeApi = project.hasProperty('buildRuntimeApi') ? project.property('buildRuntimeApi') : false +defaultPublishConfig useApachePackageName ? 'apacheRelease' : 'legacyRelease' + defaultConfig { buildConfigField "String", "buildJavascriptFrameworkVersion", "\"${jsfmVersion}\"" buildConfigField "String", "buildVersion", "\"${version}\"" @@ -172,6 +169,14 @@ android { testCoverageEnabled disableCov.toBoolean() consumerProguardFiles 'proguard-rules.pro' } + +apacheRelease{ +initWith release +} + +legacyRelease{ +initWith release +} } externalNativeBuild { @@ -181,15 +186,12 @@ android { } sourceSets { -main { -assets.srcDirs = ['assets'] -jniLibs.srcDir(['libs']) -java { -srcDirs = ["src/main/java"]; -} +main.assets.srcDirs = ['assets'] +main.jniLibs.srcDirs = ['libs'] +if(!useApachePackageName){ +main.java.srcDirs = ['src/legacyRelease/java'] +main.manifest.srcFile (new File('src/legacyRelease/AndroidManifest.xml')) } -debug.setRoot('build-types/debug') -release.setRoot('build-types/release') } compileOptions.encoding = "UTF-8" @@ -238,35 +240,33 @@ dependencies { testImplementation 'org.json:json:20160212' } -if(file('../license/LICENSE').exists()){ -license { -header = file('../license/LICENSE') -mapping('cpp','JAVADOC_STYLE') -mapping('h','JAVADOC_STYLE') -excludes(['com/taobao/weex/utils/WXDataStructureUtil.java']) -} +license { +header = file('../license/LICENSE') +mapping('cpp', 'JAVADOC_STYLE') +mapping('h', 'JAVADOC_STYLE') +excludes(['com/taobao/weex/utils/WXDataStructureUtil.java']) +} -task weex_core_license(type: com.hierynomus.gradle.license.tasks.LicenseFormat){ -source = fileTree(dir:"../../weex_core").include(['**/*.h','**/*.cpp', '**/*.cc', '**/*.c']). -exclude(['Source/rapidjson/**/*.h','Source/rapi
[incubator-weex] branch master updated: [Android] Avoid multiple error. (#2915)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 4ce90b0 [Android] Avoid multiple error. (#2915) 4ce90b0 is described below commit 4ce90b04b2d64f24030bfb3d079ea19ca676e249 Author: YorkShen AuthorDate: Wed Sep 18 15:04:19 2019 +0800 [Android] Avoid multiple error. (#2915) --- android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java index 6c2f5e5..3a933c7 100644 --- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java +++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java @@ -709,7 +709,7 @@ public abstract class WXComponent extends WXBasicComponent imple for (Map.Entry entry : props.entrySet()) { Object key_obj = entry.getKey(); String key = WXUtils.getString(key_obj, null); - if (!(key_obj instanceof String)) { + if ((key != null) && !(key_obj instanceof String)) { Map map = new HashMap<>(); map.put("componentType", getComponentType()); map.put("actual key", key == null ? "" : key);
[incubator-weex] branch master updated: [Android] Revert WeexFrame (#2912)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 3337bc8 [Android] Revert WeexFrame (#2912) 3337bc8 is described below commit 3337bc82a57fb12616dc749271d20530147096d5 Author: YorkShen AuthorDate: Tue Sep 17 13:47:13 2019 +0800 [Android] Revert WeexFrame (#2912) * Revert "[Android] Fix Crash in NotifyLayout (#2902)" This reverts commit 5e8d9ac935d6fbadd2469d83540426cc30b4e676. * Update submodule --- .../java/com/taobao/weex/WeexFrameRateControl.java | 52 ++ .../com/taobao/weex/bridge/WXBridgeManager.java| 6 +-- weex-playground| 2 +- 3 files changed, 27 insertions(+), 33 deletions(-) diff --git a/android/sdk/src/main/java/com/taobao/weex/WeexFrameRateControl.java b/android/sdk/src/main/java/com/taobao/weex/WeexFrameRateControl.java index 14817fd..eef4d5c 100644 --- a/android/sdk/src/main/java/com/taobao/weex/WeexFrameRateControl.java +++ b/android/sdk/src/main/java/com/taobao/weex/WeexFrameRateControl.java @@ -26,15 +26,14 @@ import android.annotation.SuppressLint; import android.os.Build; import android.util.Log; import android.view.Choreographer; -import com.taobao.weex.bridge.WXBridgeManager; import com.taobao.weex.common.WXErrorCode; import java.lang.ref.WeakReference; public class WeexFrameRateControl { private static final long VSYNC_FRAME = 1000 / 60; private WeakReference mListener; -private Choreographer mChoreographer; -private Choreographer.FrameCallback mVSyncFrameCallback; +private final Choreographer mChoreographer; +private final Choreographer.FrameCallback mVSyncFrameCallback; private final Runnable runnable; public interface VSyncListener { @@ -44,32 +43,27 @@ public class WeexFrameRateControl { public WeexFrameRateControl(VSyncListener listener) { mListener = new WeakReference<>(listener); if (Build.VERSION.SDK_INT > Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) { - WXBridgeManager.getInstance().post(new Runnable() { - @Override - public void run() { - mChoreographer = Choreographer.getInstance(); - mVSyncFrameCallback = new Choreographer.FrameCallback() { - @SuppressLint("NewApi") - @Override - public void doFrame(long frameTimeNanos) { - VSyncListener vSyncListener; - if (mListener != null && (vSyncListener=mListener.get()) != null) { - try { - vSyncListener.OnVSync(); - mChoreographer.postFrameCallback(mVSyncFrameCallback); - }catch (UnsatisfiedLinkError e){ - if(vSyncListener instanceof WXSDKInstance){ - ((WXSDKInstance) vSyncListener).onRenderError( - WXErrorCode.WX_DEGRAD_ERR_INSTANCE_CREATE_FAILED.getErrorCode(), - Log.getStackTraceString(e)); - } - } - } - } - }; - } - }); - runnable = null; +mChoreographer = Choreographer.getInstance(); +mVSyncFrameCallback = new Choreographer.FrameCallback() { +@SuppressLint("NewApi") +@Override +public void doFrame(long frameTimeNanos) { +VSyncListener vSyncListener; +if (mListener != null && (vSyncListener=mListener.get()) != null) { +try { +vSyncListener.OnVSync(); + mChoreographer.postFrameCallback(mVSyncFrameCallback); +}catch (UnsatisfiedLinkError e){ +if(vSyncListener instanceof WXSDKInstance){ +((WXSDKInstance) vSyncListener).onRenderError( + WXErrorCode.WX_DEGRAD_ERR_INSTANCE_CREATE_FAILED.getErrorCode(), +Log.getStackTraceString(e)); +} +} +} +} +}; +runnable = null; } else { // For API 15 or lower runnable = new Runnable() { diff --git a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java index 9e70482..bb38315 100755
[incubator-weex] branch master updated: [Travis] Fail travis if Android build fails (#2911)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 5de6b6b [Travis] Fail travis if Android build fails (#2911) 5de6b6b is described below commit 5de6b6b28cc86cf0474d91e2695fd3eacdeb84aa Author: YorkShen AuthorDate: Tue Sep 17 10:18:28 2019 +0800 [Travis] Fail travis if Android build fails (#2911) --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6e2c6a2..d9f4191 100644 --- a/.travis.yml +++ b/.travis.yml @@ -137,8 +137,8 @@ script: esac if npm run danger -- ci --dangerfile ./dangerfile-android.js | grep -q "hasAndroidFile" ; then cd android - ./gradlew clean assembleRelease -PbuildRuntimeApi=true ${GRADLE_ABI} --info - ./gradlew assembleRelease -PbuildRuntimeApi=false ${GRADLE_ABI} --info + ./gradlew clean assembleRelease -PbuildRuntimeApi=true ${GRADLE_ABI} --info || exit 1 + ./gradlew assembleRelease -PbuildRuntimeApi=false ${GRADLE_ABI} --info || exit 1 fi ;; "jsfm" )
[incubator-weex] branch master updated (d24e5af -> 3279829)
This is an automated email from the ASF dual-hosted git repository. luckychen pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-weex.git. from d24e5af [Android] add mode check (#2908) add 3279829 [Android] Build playground in Travis (#2910) No new revisions were added by this update. Summary of changes: .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
[incubator-weex] branch feature/master_ab_new updated (abbe788 -> c17761a)
This is an automated email from the ASF dual-hosted git repository. luckychen pushed a change to branch feature/master_ab_new in repository https://gitbox.apache.org/repos/asf/incubator-weex.git. discard abbe788 [Android] add mode check add c17761a [Android] add mode check This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (abbe788) \ N -- N -- N refs/heads/feature/master_ab_new (c17761a) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. No new revisions were added by this update. Summary of changes: android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java | 3 --- .../main/java/com/taobao/weex/bridge/WXBridgeManager.java| 12 +--- 2 files changed, 1 insertion(+), 14 deletions(-)
[incubator-weex] 01/01: [Android] add mode check
This is an automated email from the ASF dual-hosted git repository. luckychen pushed a commit to branch feature/master_ab_new in repository https://gitbox.apache.org/repos/asf/incubator-weex.git commit abbe788de85171d1a9a7186cda4a0863ed804214 Author: chen AuthorDate: Mon Sep 16 16:16:56 2019 +0800 [Android] add mode check --- .../main/java/com/taobao/weex/WXEnvironment.java | 2 ++ .../main/java/com/taobao/weex/WXSDKInstance.java | 3 +++ .../com/taobao/weex/adapter/IWXConfigAdapter.java | 1 + .../com/taobao/weex/bridge/WXBridgeManager.java| 23 ++ .../com/taobao/weex/performance/WXStateRecord.java | 8 5 files changed, 29 insertions(+), 8 deletions(-) diff --git a/android/sdk/src/main/java/com/taobao/weex/WXEnvironment.java b/android/sdk/src/main/java/com/taobao/weex/WXEnvironment.java index 9d3250d..0df6105 100644 --- a/android/sdk/src/main/java/com/taobao/weex/WXEnvironment.java +++ b/android/sdk/src/main/java/com/taobao/weex/WXEnvironment.java @@ -114,6 +114,8 @@ public class WXEnvironment { public static long sJSFMStartListenerTime=0; + public static volatile boolean isWsFixMode = true; + /** * component and modules ready * */ diff --git a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java index 4d55d45..d16585f 100644 --- a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java +++ b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java @@ -1718,6 +1718,9 @@ public class WXSDKInstance implements IWXActivityStateListener,View.OnLayoutChan } public void onRenderError(final String errCode, final String msg) { +if (WXEnvironment.isWsFixMode){ + hasException = true; +} WXStateRecord.getInstance().recordException(getInstanceId(),"onRenderError,"+errCode+","+msg); if (mRenderListener != null && mContext != null) { WXLogUtils.e("onRenderError "+errCode +","+msg); diff --git a/android/sdk/src/main/java/com/taobao/weex/adapter/IWXConfigAdapter.java b/android/sdk/src/main/java/com/taobao/weex/adapter/IWXConfigAdapter.java index 84de459..953bf2c 100644 --- a/android/sdk/src/main/java/com/taobao/weex/adapter/IWXConfigAdapter.java +++ b/android/sdk/src/main/java/com/taobao/weex/adapter/IWXConfigAdapter.java @@ -25,4 +25,5 @@ package com.taobao.weex.adapter; public interface IWXConfigAdapter { String getConfig(String nameSpace,String key,String defaultValue); String getConfigWhenInit(String nameSpace,String key,String defaultValue); +boolean checkMode(String name); } diff --git a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java index 8c31da1..bd1e968 100755 --- a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java +++ b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java @@ -890,10 +890,10 @@ public class WXBridgeManager implements Callback, BactchExecutor { } catch (Throwable e) { WXLogUtils.e(WXLogUtils.getStackTrace(e)); } -WXStateRecord.getInstance().onJSCCrash(); + WXStateRecord.getInstance().onJSCCrash(TextUtils.isEmpty(instanceId)?"null":instanceId); callReportCrash(crashFile, instanceId, url,extInfo); } else { -WXStateRecord.getInstance().onJSEngineReload(); + WXStateRecord.getInstance().onJSEngineReload(TextUtils.isEmpty(instanceId)?"null":instanceId); commitJscCrashAlarmMonitor(IWXUserTrackAdapter.JS_BRIDGE, WXErrorCode.WX_ERR_RELOAD_PAGE, "reboot jsc Engine", instanceId, url,extInfo); } @@ -1046,8 +1046,18 @@ public class WXBridgeManager implements Callback, BactchExecutor { post(new Runnable() { @Override public void run() { + WXSDKInstance instance = WXSDKManager.getInstance().getAllInstanceMap().get(instanceId); + if (null != instance && !isSkipFrameworkInit(instance) && !isJSFrameworkInit()) { + String err = "[WXBridgeManager] invokeCreateInstance: framework.js uninitialized."; + instance.onRenderError( + WXErrorCode.WX_DEGRAD_ERR_INSTANCE_CREATE_FAILED.getErrorCode(), + WXErrorCode.WX_DEGRAD_ERR_INSTANCE_CREATE_FAILED.getErrorMsg() + ); + WXLogUtils.e(err); + instance.getApmForInstance().onStage("framework.js uninitialized and return"); + return; + } invokeExecJSOnInstance(instanceId, js, -1); -WXSDKInstance instance = WXSDKManager.getInstance().getAllInstanceMap().get(instanceId); if (null != instance && instance.isPreInitMode()){ instance.getApmForInstance().onStage(WXInstanceApm.KEY_PAGE_STAGES_LOAD_BUNDLE_END); instance.get
[incubator-weex] branch feature/master_ab_new updated (e9680b9 -> abbe788)
This is an automated email from the ASF dual-hosted git repository. luckychen pushed a change to branch feature/master_ab_new in repository https://gitbox.apache.org/repos/asf/incubator-weex.git. discard e9680b9 [Android] tmp new abbe788 [Android] add mode check This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (e9680b9) \ N -- N -- N refs/heads/feature/master_ab_new (abbe788) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes:
[incubator-weex] branch feature/master_ab_new updated (24085a2 -> e9680b9)
This is an automated email from the ASF dual-hosted git repository. luckychen pushed a change to branch feature/master_ab_new in repository https://gitbox.apache.org/repos/asf/incubator-weex.git. discard 24085a2 [Android] fix discard 78b485e [Android] fix discard 6f96229 [Android] tmp new e9680b9 [Android] tmp This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (24085a2) \ N -- N -- N refs/heads/feature/master_ab_new (e9680b9) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: android/sdk/src/main/java/com/taobao/weex/WXEnvironment.java | 2 +- android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java | 2 +- .../src/main/java/com/taobao/weex/adapter/IWXConfigAdapter.java| 2 +- .../sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java | 7 ++- 4 files changed, 9 insertions(+), 4 deletions(-)
[incubator-weex] branch feature/master_ab_new updated: [Android] fix
This is an automated email from the ASF dual-hosted git repository. luckychen pushed a commit to branch feature/master_ab_new in repository https://gitbox.apache.org/repos/asf/incubator-weex.git The following commit(s) were added to refs/heads/feature/master_ab_new by this push: new 24085a2 [Android] fix 24085a2 is described below commit 24085a2139d0a77412546192f376ae691827c97d Author: chen AuthorDate: Mon Sep 16 16:29:52 2019 +0800 [Android] fix --- android/sdk/src/main/java/com/taobao/weex/adapter/IWXConfigAdapter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/sdk/src/main/java/com/taobao/weex/adapter/IWXConfigAdapter.java b/android/sdk/src/main/java/com/taobao/weex/adapter/IWXConfigAdapter.java index 953bf2c..166e4c4 100644 --- a/android/sdk/src/main/java/com/taobao/weex/adapter/IWXConfigAdapter.java +++ b/android/sdk/src/main/java/com/taobao/weex/adapter/IWXConfigAdapter.java @@ -25,5 +25,5 @@ package com.taobao.weex.adapter; public interface IWXConfigAdapter { String getConfig(String nameSpace,String key,String defaultValue); String getConfigWhenInit(String nameSpace,String key,String defaultValue); -boolean checkMode(String name); +boolean checkMode(String name,boolean defaultMode); }
[incubator-weex] 01/02: [Android] tmp
This is an automated email from the ASF dual-hosted git repository. luckychen pushed a commit to branch feature/master_ab_new in repository https://gitbox.apache.org/repos/asf/incubator-weex.git commit 6f962295c45cf16565ea503683f677f56a38ddec Author: chen AuthorDate: Mon Sep 16 16:16:56 2019 +0800 [Android] tmp --- .../sdk/src/main/java/com/taobao/weex/WXEnvironment.java | 2 ++ .../sdk/src/main/java/com/taobao/weex/WXSDKInstance.java | 3 +++ .../java/com/taobao/weex/bridge/WXBridgeManager.java | 16 +--- .../java/com/taobao/weex/performance/WXStateRecord.java | 8 4 files changed, 22 insertions(+), 7 deletions(-) diff --git a/android/sdk/src/main/java/com/taobao/weex/WXEnvironment.java b/android/sdk/src/main/java/com/taobao/weex/WXEnvironment.java index 9d3250d..e089d7a 100644 --- a/android/sdk/src/main/java/com/taobao/weex/WXEnvironment.java +++ b/android/sdk/src/main/java/com/taobao/weex/WXEnvironment.java @@ -114,6 +114,8 @@ public class WXEnvironment { public static long sJSFMStartListenerTime=0; + public static volatile boolean isWsFisMode = true; + /** * component and modules ready * */ diff --git a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java index 4d55d45..73027b9 100644 --- a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java +++ b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java @@ -1718,6 +1718,9 @@ public class WXSDKInstance implements IWXActivityStateListener,View.OnLayoutChan } public void onRenderError(final String errCode, final String msg) { +if (WXEnvironment.isWsFisMode){ + hasException = true; +} WXStateRecord.getInstance().recordException(getInstanceId(),"onRenderError,"+errCode+","+msg); if (mRenderListener != null && mContext != null) { WXLogUtils.e("onRenderError "+errCode +","+msg); diff --git a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java index 8c31da1..6398942 100755 --- a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java +++ b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java @@ -890,10 +890,10 @@ public class WXBridgeManager implements Callback, BactchExecutor { } catch (Throwable e) { WXLogUtils.e(WXLogUtils.getStackTrace(e)); } -WXStateRecord.getInstance().onJSCCrash(); + WXStateRecord.getInstance().onJSCCrash(TextUtils.isEmpty(instanceId)?"null":instanceId); callReportCrash(crashFile, instanceId, url,extInfo); } else { -WXStateRecord.getInstance().onJSEngineReload(); + WXStateRecord.getInstance().onJSEngineReload(TextUtils.isEmpty(instanceId)?"null":instanceId); commitJscCrashAlarmMonitor(IWXUserTrackAdapter.JS_BRIDGE, WXErrorCode.WX_ERR_RELOAD_PAGE, "reboot jsc Engine", instanceId, url,extInfo); } @@ -1046,8 +1046,18 @@ public class WXBridgeManager implements Callback, BactchExecutor { post(new Runnable() { @Override public void run() { + WXSDKInstance instance = WXSDKManager.getInstance().getAllInstanceMap().get(instanceId); + if (null != instance && !isSkipFrameworkInit(instance) && !isJSFrameworkInit()) { + String err = "[WXBridgeManager] invokeCreateInstance: framework.js uninitialized."; + instance.onRenderError( + WXErrorCode.WX_DEGRAD_ERR_INSTANCE_CREATE_FAILED.getErrorCode(), + WXErrorCode.WX_DEGRAD_ERR_INSTANCE_CREATE_FAILED.getErrorMsg() + ); + WXLogUtils.e(err); + instance.getApmForInstance().onStage("framework.js uninitialized and return"); + return; + } invokeExecJSOnInstance(instanceId, js, -1); -WXSDKInstance instance = WXSDKManager.getInstance().getAllInstanceMap().get(instanceId); if (null != instance && instance.isPreInitMode()){ instance.getApmForInstance().onStage(WXInstanceApm.KEY_PAGE_STAGES_LOAD_BUNDLE_END); instance.getApmForInstance().onStageWithTime(WXInstanceApm.KEY_PAGE_STAGES_END_EXCUTE_BUNDLE,WXUtils.getFixUnixTime()+600); diff --git a/android/sdk/src/main/java/com/taobao/weex/performance/WXStateRecord.java b/android/sdk/src/main/java/com/taobao/weex/performance/WXStateRecord.java index a95e957..ee6390d 100644 --- a/android/sdk/src/main/java/com/taobao/weex/performance/WXStateRecord.java +++ b/android/sdk/src/main/java/com/taobao/weex/performance/WXStateRecord.java @@ -102,15 +102,15 @@ public class WXStateRecord { /** * check onJSEngineReload time,and we know how many times reload and each reload time */ -public void onJSEngineReload() { -reco
[incubator-weex] branch feature/master_ab_new created (now 78b485e)
This is an automated email from the ASF dual-hosted git repository. luckychen pushed a change to branch feature/master_ab_new in repository https://gitbox.apache.org/repos/asf/incubator-weex.git. at 78b485e [Android] fix This branch includes the following new commits: new 6f96229 [Android] tmp new 78b485e [Android] fix The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[incubator-weex] 02/02: [Android] fix
This is an automated email from the ASF dual-hosted git repository. luckychen pushed a commit to branch feature/master_ab_new in repository https://gitbox.apache.org/repos/asf/incubator-weex.git commit 78b485e7629584ac3e467c2f1a9e325ffd0e3747 Author: chen AuthorDate: Mon Sep 16 16:27:20 2019 +0800 [Android] fix --- android/sdk/src/main/java/com/taobao/weex/adapter/IWXConfigAdapter.java | 1 + 1 file changed, 1 insertion(+) diff --git a/android/sdk/src/main/java/com/taobao/weex/adapter/IWXConfigAdapter.java b/android/sdk/src/main/java/com/taobao/weex/adapter/IWXConfigAdapter.java index 84de459..953bf2c 100644 --- a/android/sdk/src/main/java/com/taobao/weex/adapter/IWXConfigAdapter.java +++ b/android/sdk/src/main/java/com/taobao/weex/adapter/IWXConfigAdapter.java @@ -25,4 +25,5 @@ package com.taobao.weex.adapter; public interface IWXConfigAdapter { String getConfig(String nameSpace,String key,String defaultValue); String getConfigWhenInit(String nameSpace,String key,String defaultValue); +boolean checkMode(String name); }
[incubator-weex] branch master updated: [Android] Fix Crash in NotifyLayout (#2902)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 5e8d9ac [Android] Fix Crash in NotifyLayout (#2902) 5e8d9ac is described below commit 5e8d9ac935d6fbadd2469d83540426cc30b4e676 Author: YorkShen AuthorDate: Mon Sep 16 16:20:43 2019 +0800 [Android] Fix Crash in NotifyLayout (#2902) There is a concurrent read/write operation to `RenderManager::pages_` during `CoreSideInPlatform::NotifyLayout`where MainThread is reading `RenderManager::pages_` while other thread may be writing to it. ``` std::__ndk1::basic_string, std::__ndk1::allocator >::__is_long() const at string:1266 (inlined by) std::__ndk1::basic_string, std::__ndk1::allocator >::size() const at string:905 (inlined by) std::__ndk1::basic_string, std::__ndk1::allocator >::compare(std::__ndk1::basic_string_view >) const at string:3455 (inlined by) std::__ndk1::basic_string, std::__ndk1::allocator >::compare(std::__ndk1::basic_string, std::__ndk1::allocator > const&) const at string:3473 (inlined by) bool std::__ndk1::operator< , std::__ndk1::allocator >(std::__ndk1::basic_string, std::__ndk1::allocator > const&, std::__ndk1::basic_string, std::__ndk1::allocator > const&) at string:3693 (inlined by) std::__ndk1::less, std::__ndk1::allocator > >::operator()(std::__ndk1::basic_string, std::__ndk1::allocator > const&, std::__ndk1::basic_string, std::__ndk1::allocator > const&) const at __functional_base:55 (inlined by) std::__ndk1::__map_value_compare, std::__ndk1::allocator >, std::__ndk1::__value_type, std::__ndk1::allocator >, WeexCore::RenderPageBase*>, std::__ndk1::less, std::__ndk1::allocator > >, true>::operator()(std::__ndk1::__value_type, std::__ndk1::allocator >, WeexCore::RenderPageBase*>, std::__ndk1::__tree_node, std::__ndk1::allocator >, WeexCore::RenderPageBase*>, void*>*, int> std::__ndk1::__tree, std::__ndk1::allocator >, WeexCore::RenderPageBase*>, std::__ndk1::__tree_node, std::__ndk1::allocator >, WeexCore::RenderPageBase*>, void*>*, int> std::__ndk1::__tree, std::__ndk1 [...] std::__ndk1::map, std::__ndk1::allocator >, WeexCore::RenderPageBase*, std::__ndk1::less, std::__ndk1::allocator > >, std::__ndk1::allocator, std::__ndk1::allocator > const, WeexCore::RenderPageBase*> > >::find(std::__ndk1::basic_string, std::__ndk1::allocator > const&) at render_manager.cpp:472 WeexCore::CoreSideInPlatform::NotifyLayout(std::__ndk1::basic_string, std::__ndk1::allocator > const&) at core_side_in_platform.cpp:223 ``` --- .../java/com/taobao/weex/WeexFrameRateControl.java | 52 -- .../com/taobao/weex/bridge/WXBridgeManager.java| 6 +-- 2 files changed, 32 insertions(+), 26 deletions(-) diff --git a/android/sdk/src/main/java/com/taobao/weex/WeexFrameRateControl.java b/android/sdk/src/main/java/com/taobao/weex/WeexFrameRateControl.java index eef4d5c..14817fd 100644 --- a/android/sdk/src/main/java/com/taobao/weex/WeexFrameRateControl.java +++ b/android/sdk/src/main/java/com/taobao/weex/WeexFrameRateControl.java @@ -26,14 +26,15 @@ import android.annotation.SuppressLint; import android.os.Build; import android.util.Log; import android.view.Choreographer; +import com.taobao.weex.bridge.WXBridgeManager; import com.taobao.weex.common.WXErrorCode; import java.lang.ref.WeakReference; public class WeexFrameRateControl { private static final long VSYNC_FRAME = 1000 / 60; private WeakReference mListener; -private final Choreographer mChoreographer; -private final Choreographer.FrameCallback mVSyncFrameCallback; +private Choreographer mChoreographer; +private Choreographer.FrameCallback mVSyncFrameCallback; private final Runnable runnable; public interface VSyncListener { @@ -43,27 +44,32 @@ public class WeexFrameRateControl { public WeexFrameRateControl(VSyncListener listener) { mListener = new WeakReference<>(listener); if (Build.VERSION.SDK_INT > Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) { -mChoreographer = Choreographer.getInstance(); -mVSyncFrameCallback = new Choreographer.FrameCallback() { -@SuppressLint("NewApi") -@Override -public void doFrame(long frameTimeNanos) { -VSyncListener vSyncListener; -if (mListener != null && (vSyncListener=mListener.get()) != null) { -try { -vSyncListener.OnVSync(); - mChoreographer.postFrameCallback(mVSyncFrameCallback); -}catch
[incubator-weex] branch master updated: [Android] Fix ClassCastException in WXComponent.updateProperties() (#2897)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 b94e830 [Android] Fix ClassCastException in WXComponent.updateProperties() (#2897) b94e830 is described below commit b94e83074fe5a6eb7220fef8a1a5064df68f7894 Author: YorkShen AuthorDate: Thu Sep 12 16:33:14 2019 +0800 [Android] Fix ClassCastException in WXComponent.updateProperties() (#2897) ``` java.lang.ClassCastException: java.lang.Object[] cannot be cast to java.lang.String at com.taobao.weex.ui.component.WXComponent.updateProperties(WXComponent.java:710) at com.taobao.weex.ui.component.WXComponent.updateAttrs(WXComponent.java:274) at com.taobao.weex.ui.component.WXComponent.bindData(WXComponent.java:663) at CustomComponent.bindData(InteractiveVideoComponentV2.java:638) at com.taobao.weex.ui.component.WXVContainer.bindData(WXVContainer.java:166) ``` --- .../src/main/java/com/taobao/weex/common/WXErrorCode.java | 1 + .../java/com/taobao/weex/ui/component/WXComponent.java | 14 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/android/sdk/src/main/java/com/taobao/weex/common/WXErrorCode.java b/android/sdk/src/main/java/com/taobao/weex/common/WXErrorCode.java index b4fb844..80ef371 100644 --- a/android/sdk/src/main/java/com/taobao/weex/common/WXErrorCode.java +++ b/android/sdk/src/main/java/com/taobao/weex/common/WXErrorCode.java @@ -219,6 +219,7 @@ public enum WXErrorCode { WX_RENDER_ERR_NULL_KEY("-9603", "WX_RENDER_ERR_NULL_KEY", ErrorType.NATIVE_ERROR, ErrorGroup.NATIVE), WX_RENDER_ERR_NATIVE_RUNTIME("-9604", "WX_RENDER_ERR for js error", ErrorType.RENDER_ERROR, ErrorGroup.NATIVE), WX_RENDER_ERR_COMPONENT_NOT_REGISTER("-9605", "WX_RENDER_ERR_COMPONENT_NOT_REGISTER", ErrorType.NATIVE_ERROR, ErrorGroup.NATIVE), + WX_RENDER_ERR_COMPONENT_ATTR_KEY("-9606", "The key passed to Component.updateAttr() is not string", ErrorType.NATIVE_ERROR, ErrorGroup.JS), WX_RENDER_ERR_BRIDGE_ARG_NULL("-9610", "WX_RENDER_ERR_BRIDGE_ARG_NULL", ErrorType.NATIVE_ERROR, ErrorGroup.NATIVE), WX_RENDER_ERR_CONTAINER_TYPE("-9611", "WX_RENDER_ERR_CONTAINER_TYPE", ErrorType.JS_ERROR,ErrorGroup.JS), WX_RENDER_ERR_TRANSITION("-9616", "WX_RENDER_ERR_TRANSITION", ErrorType.JS_ERROR, ErrorGroup.JS), diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java index e7be2ff..6c2f5e5 100644 --- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java +++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java @@ -707,7 +707,19 @@ public abstract class WXComponent extends WXBasicComponent imple } for (Map.Entry entry : props.entrySet()) { - String key = entry.getKey(); + Object key_obj = entry.getKey(); + String key = WXUtils.getString(key_obj, null); + if (!(key_obj instanceof String)) { +Map map = new HashMap<>(); +map.put("componentType", getComponentType()); +map.put("actual key", key == null ? "" : key); +WXExceptionUtils.commitCriticalExceptionRT(getInstanceId(), +WXErrorCode.WX_RENDER_ERR_COMPONENT_ATTR_KEY, +"WXComponent.updateProperties", +WXErrorCode.WX_RENDER_ERR_COMPONENT_ATTR_KEY.getErrorMsg(), +map); + } + Object param = entry.getValue(); String value = WXUtils.getString(param, null);
[incubator-weex] branch master updated: [iOS] public the dictionary of recordStatsMap and recordStageMap (#2882)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 a554cd6 [iOS] public the dictionary of recordStatsMap and recordStageMap (#2882) a554cd6 is described below commit a554cd6c949395d1a5d9bacf10c9f7de95447661 Author: jianhan-he <41508406+jianhan...@users.noreply.github.com> AuthorDate: Thu Sep 5 15:55:40 2019 +0800 [iOS] public the dictionary of recordStatsMap and recordStageMap (#2882) --- ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.h | 2 ++ ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.m | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.h b/ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.h index b4a263f..990f7a0 100644 --- a/ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.h +++ b/ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.h @@ -125,6 +125,8 @@ extern NSString* const VALUE_ERROR_CODE_DEFAULT; @property (nonatomic, assign) BOOL isDownLoadFailed; @property (nonatomic, assign) BOOL forceStopRecordInteractionTime; @property (nonatomic,assign) double pageRatio; +@property (nonatomic,strong) NSMutableDictionary* recordStatsMap; +@property (nonatomic,strong) NSMutableDictionary* recordStageMap; #pragma mark - basic method diff --git a/ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.m b/ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.m index 33d6b4b..15287d9 100644 --- a/ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.m +++ b/ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.m @@ -134,8 +134,6 @@ NSString* const VALUE_ERROR_CODE_DEFAULT = @"0"; @property (nonatomic,strong) id apmProtocolInstance; @property (nonatomic,strong) NSString* instanceId; -@property (nonatomic,strong) NSMutableDictionary* recordStatsMap; -@property (nonatomic,strong) NSMutableDictionary* recordStageMap; @property (nonatomic,strong) NSMutableArray* recordUpdateComponentDataTimestamp; @property (nonatomic,strong) NSMutableArray* recordUpdateComponentDataTime;
[incubator-weex] branch master updated: [Android] Fix crash in receiver. (#2840)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 7543ea7 [Android] Fix crash in receiver. (#2840) 7543ea7 is described below commit 7543ea757508c310bc9c5ebdcda6cdda1487a83e Author: YorkShen AuthorDate: Wed Sep 4 15:33:12 2019 +0800 [Android] Fix crash in receiver. (#2840) ``` java.lang.IllegalArgumentException: Receiver not registered: com.taobao.weex.WXGlobalEventReceiver@df9ef3f at android.app.LoadedApk.forgetReceiverDispatcher(LoadedApk.java:1095) at android.app.ContextImpl.unregisterReceiver(ContextImpl.java:1500) at android.content.ContextWrapper.unregisterReceiver(ContextWrapper.java:608) at com.taobao.weex.WXSDKInstance.destroy(WXSDKInstance.java:1832) at com.taobao.weex.WXSDKInstance.onActivityDestroy(WXSDKInstance.java:1457) ``` --- android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java index bb28309..b8beb51 100644 --- a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java +++ b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java @@ -1837,10 +1837,15 @@ public class WXSDKInstance implements IWXActivityStateListener,View.OnLayoutChan WXSDKManager.getInstance().destroyInstance(mInstanceId); } - if (mGlobalEventReceiver != null) { -getContext().unregisterReceiver(mGlobalEventReceiver); -mGlobalEventReceiver = null; + try { +if (mGlobalEventReceiver != null) { + getContext().unregisterReceiver(mGlobalEventReceiver); + mGlobalEventReceiver = null; +} + }catch (IllegalArgumentException e){ +WXLogUtils.w(WXLogUtils.getStackTrace(e)); } + if (mRootComp != null) { mRootComp.destroy(); mRootComp = null;
[incubator-weex] branch master updated: fix crash if mmap failed (#2880)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 440ae80 fix crash if mmap failed (#2880) 440ae80 is described below commit 440ae80adc3850c0c92a570c928b0de315b9bd72 Author: darin AuthorDate: Wed Sep 4 15:29:51 2019 +0800 fix crash if mmap failed (#2880) --- weex_core/Source/android/multiprocess/weex_js_connection.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/weex_core/Source/android/multiprocess/weex_js_connection.cpp b/weex_core/Source/android/multiprocess/weex_js_connection.cpp index e708d15..fb9ebcf 100644 --- a/weex_core/Source/android/multiprocess/weex_js_connection.cpp +++ b/weex_core/Source/android/multiprocess/weex_js_connection.cpp @@ -163,6 +163,7 @@ static void *newIPCServer(void *_td) { int _errno = errno; //throw IPCException("failed to map ashmem region: %s", strerror(_errno)); newThreadStatus = ERROR; +base::android::DetachFromVM(); return nullptr; }
[incubator-weex] branch master updated (72b0bdb -> cbfb57b)
This is an automated email from the ASF dual-hosted git repository. luckychen pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-weex.git. from 72b0bdb Fix nullable annotation. (#2878) add cbfb57b [Android] Remove duplicate receiver in manifest and remove final from class definition. (#2879) No new revisions were added by this update. Summary of changes: android/sdk/src/main/AndroidManifest.xml | 10 -- .../java/com/taobao/weex/common/WXWorkThreadManager.java | 12 ++-- .../src/main/java/com/taobao/weex/ui/module/WXDomModule.java | 10 +- 3 files changed, 19 insertions(+), 13 deletions(-)
[incubator-weex] branch master updated: Change some error level log to debug level (#2877)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 23821f9 Change some error level log to debug level (#2877) 23821f9 is described below commit 23821f9f0843a2ef14b6a7b15b0a4b3cda6afedd Author: darin AuthorDate: Wed Sep 4 11:39:20 2019 +0800 Change some error level log to debug level (#2877) --- android/sdk/src/main/java/com/taobao/weex/WXEnvironment.java | 6 +++--- android/sdk/src/main/java/com/taobao/weex/WXHttpListener.java | 6 +++--- android/sdk/src/main/java/com/taobao/weex/WXSDKEngine.java| 2 +- android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java | 2 +- android/sdk/src/main/java/com/taobao/weex/bridge/WXBridge.java| 2 +- .../src/main/java/com/taobao/weex/performance/WXInstanceApm.java | 6 +++--- weex_core/Source/android/bridge/multi_so_initializer.cpp | 2 +- .../Source/android/bridge/script_bridge_in_multi_process.cpp | 4 ++-- .../android/jsengine/bridge/script/script_side_in_queue.cpp | 8 weex_core/Source/android/jsengine/task/timer_queue.cpp| 4 ++-- weex_core/Source/android/jsengine/weex_runtime.cpp| 4 ++-- weex_core/Source/android/multiprocess/weex_js_connection.cpp | 8 weex_core/Source/android/utils/params_utils.cpp | 4 ++-- 13 files changed, 29 insertions(+), 29 deletions(-) diff --git a/android/sdk/src/main/java/com/taobao/weex/WXEnvironment.java b/android/sdk/src/main/java/com/taobao/weex/WXEnvironment.java index daa1c3e..9d3250d 100644 --- a/android/sdk/src/main/java/com/taobao/weex/WXEnvironment.java +++ b/android/sdk/src/main/java/com/taobao/weex/WXEnvironment.java @@ -605,13 +605,13 @@ public class WXEnvironment { public static String getLibJssRealPath() { if (WXEnvironment.sUseRunTimeApi && !TextUtils.isEmpty(CORE_JSS_RUNTIME_SO_PATH)){ - WXLogUtils.e("test-> findLibJssRuntimeRealPath " + CORE_JSS_RUNTIME_SO_PATH); + WXLogUtils.d("test-> findLibJssRuntimeRealPath " + CORE_JSS_RUNTIME_SO_PATH); return CORE_JSS_RUNTIME_SO_PATH; } if(TextUtils.isEmpty(CORE_JSS_SO_PATH)) { CORE_JSS_SO_PATH = findSoPath(CORE_JSS_SO_NAME); - WXLogUtils.e("test-> findLibJssRealPath " + CORE_JSS_SO_PATH); + WXLogUtils.d("test-> findLibJssRealPath " + CORE_JSS_SO_PATH); } return CORE_JSS_SO_PATH; @@ -652,7 +652,7 @@ public class WXEnvironment { } } -WXLogUtils.e("getLibLdPath is " + LIB_LD_PATH); +WXLogUtils.d("getLibLdPath is " + LIB_LD_PATH); return LIB_LD_PATH; } diff --git a/android/sdk/src/main/java/com/taobao/weex/WXHttpListener.java b/android/sdk/src/main/java/com/taobao/weex/WXHttpListener.java index d2ffd09..15d9cf2 100644 --- a/android/sdk/src/main/java/com/taobao/weex/WXHttpListener.java +++ b/android/sdk/src/main/java/com/taobao/weex/WXHttpListener.java @@ -219,10 +219,10 @@ public class WXHttpListener implements IWXHttpAdapter.OnHttpListener { if (isPreDownLoadMode){ if (isInstanceReady){ -WXLogUtils.e("test->", "DownLoad didHttpFinish on http" ); +WXLogUtils.d("test->", "DownLoad didHttpFinish on http" ); didHttpFinish(response); }else { -WXLogUtils.e("test->", "DownLoad end before activity created" ); +WXLogUtils.d("test->", "DownLoad end before activity created" ); mResponse = response; isResponseHasWait = true; } @@ -238,7 +238,7 @@ public class WXHttpListener implements IWXHttpAdapter.OnHttpListener { } this.isInstanceReady = true; if (isResponseHasWait){ -WXLogUtils.e("test->", "preDownLoad didHttpFinish on ready" ); +WXLogUtils.d("test->", "preDownLoad didHttpFinish on ready" ); this.didHttpFinish(mResponse); } diff --git a/android/sdk/src/main/java/com/taobao/weex/WXSDKEngine.java b/android/sdk/src/main/java/com/taobao/weex/WXSDKEngine.java index 959eab3..d9ef522 100644 --- a/android/sdk/src/main/java/com/taobao/weex/WXSDKEngine.java +++ b/android/sdk/src/main/java/com/taobao/weex/WXSDKEngine.java @@ -167,7 +167,7 @@ public class WXSDKEngine implements Serializable { long start = System.currentTimeMillis(); WXEnvironment.sSDKInitStart = start; if(WXEnvironment.isApkDebugable(application)){ -WXEnvironment.sLogLevel = LogLevel.INFO; +WXEnvironment.sLogLevel = LogLevel.DEBUG; }else{ WXEnvironment.sLogLevel = LogLevel.WARN;
[incubator-weex] branch master updated: Feature/try fix top native crash fd problem (#2854)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 af7c957 Feature/try fix top native crash fd problem (#2854) af7c957 is described below commit af7c957b21b476793cb904dd2e05245f5d31c31b Author: darin AuthorDate: Wed Aug 28 16:33:13 2019 +0800 Feature/try fix top native crash fd problem (#2854) * add pid and genId to ashmem * try fix fd problem 所有的 fd 操作都控制在局部变量. 去掉所有的静态变量. 防止全局污染 * Rename client name to file name and return base if fd create failed * make sure close fd happened in deconstructor. --- .../bridge/multi_process_and_so_initializer.cpp| 10 +- .../bridge/multi_process_and_so_initializer.h | 2 +- .../bridge/script_bridge_in_multi_process.cpp | 9 +- .../bridge/script_bridge_in_multi_process.h| 4 +- .../android/multiprocess/weex_js_connection.cpp| 105 - .../android/multiprocess/weex_js_connection.h | 43 - 6 files changed, 112 insertions(+), 61 deletions(-) diff --git a/weex_core/Source/android/bridge/multi_process_and_so_initializer.cpp b/weex_core/Source/android/bridge/multi_process_and_so_initializer.cpp index a16e31c..40ab7b3 100644 --- a/weex_core/Source/android/bridge/multi_process_and_so_initializer.cpp +++ b/weex_core/Source/android/bridge/multi_process_and_so_initializer.cpp @@ -32,17 +32,17 @@ namespace WeexCore { bool MultiProcessAndSoInitializer::Init(const std::function& OnHandlerCreated, -const std::function, std::unique_ptr, std::unique_ptr)>& OnInitFinished, +const std::function)>& OnInitFinished, const std::function& ReportException){ bool reinit = false; LOGE("MultiProcessAndSoInitializer IS IN init"); startInitFrameWork: try { -auto handler = std::move(createIPCHandler()); auto server_handler = std::move(createIPCHandler()); OnHandlerCreated(server_handler.get()); -std::unique_ptr connection(new WeexJSConnection()); -auto sender = connection->start(handler.get(), server_handler.get(), reinit); +std::unique_ptr connection(new WeexJSConnection(new WeexConnInfo(std::move(createIPCHandler()), true), +new WeexConnInfo(std::move(server_handler), false))); +auto sender = connection->start(reinit); if (sender == nullptr) { LOGE("JSFramwork init start sender is null"); if (!reinit) { @@ -52,7 +52,7 @@ startInitFrameWork: return false; } } else { - OnInitFinished(std::move(connection), std::move(handler), std::move(server_handler)); + OnInitFinished(std::move(connection)); } } catch (IPCException& e) { LOGE("WeexProxy catch:%s", e.msg()); diff --git a/weex_core/Source/android/bridge/multi_process_and_so_initializer.h b/weex_core/Source/android/bridge/multi_process_and_so_initializer.h index 424e4d7..e972204 100644 --- a/weex_core/Source/android/bridge/multi_process_and_so_initializer.h +++ b/weex_core/Source/android/bridge/multi_process_and_so_initializer.h @@ -32,7 +32,7 @@ class MultiProcessAndSoInitializer { virtual ~MultiProcessAndSoInitializer() {} bool Init(const std::function&, -const std::function, std::unique_ptr, std::unique_ptr)>&, +const std::function)>&, const std::function&); }; } // namespace WeexCore diff --git a/weex_core/Source/android/bridge/script_bridge_in_multi_process.cpp b/weex_core/Source/android/bridge/script_bridge_in_multi_process.cpp index 96ca9f0..7cc4ec6 100644 --- a/weex_core/Source/android/bridge/script_bridge_in_multi_process.cpp +++ b/weex_core/Source/android/bridge/script_bridge_in_multi_process.cpp @@ -1004,16 +1004,11 @@ ScriptBridgeInMultiProcess::ScriptBridgeInMultiProcess() { LOGE("ScriptBridgeInMultiProcess"); bool passable = initializer->Init( [this](IPCHandler *handler) { RegisterIPCCallback(handler); }, - [this](std::unique_ptr connection, - std::unique_ptr handler, - std::unique_ptr server_handler) { + [this](std::unique_ptr connection) { static_cast(script_side()) ->set_sender(connection->sender()); connection_ = std::move(connection); -handler_ = std::move(handler); -server_handler_ = std::move(server_handler); -LOGE("ScriptBridgeInMultiProcess finish %p %p", server_handler_.get(), - server_handler.get()); +LOGE("ScriptBridgeInMultiProcess finish"); return true; }, [this](const char *page_id, const char *func, diff --git a/weex_core/Source/android/bridge/
[incubator-weex] branch master updated (f64a866 -> 8722cf3)
This is an automated email from the ASF dual-hosted git repository. luckychen pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-weex.git. from f64a866 Fix npe (#2842) add 8722cf3 avoid log npe (#2856) No new revisions were added by this update. Summary of changes: weex_core/Source/base/log_defines.h | 5 + 1 file changed, 5 insertions(+)
[incubator-weex] 03/10: [Android] Add `isJSFrameworkInit` before calling `nativeInvokeOnSuccess`
This is an automated email from the ASF dual-hosted git repository. luckychen pushed a commit to branch feature/0.26.2.19-jit in repository https://gitbox.apache.org/repos/asf/incubator-weex.git commit 92982eea6224ccefe41a5682e8e845b11e486b71 Author: YorkShen AuthorDate: Thu Aug 15 17:59:07 2019 +0800 [Android] Add `isJSFrameworkInit` before calling `nativeInvokeOnSuccess` --- .../main/java/com/taobao/weex/bridge/RequestHandler.java | 14 -- .../main/java/com/taobao/weex/bridge/WXBridgeManager.java | 5 - 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/android/sdk/src/main/java/com/taobao/weex/bridge/RequestHandler.java b/android/sdk/src/main/java/com/taobao/weex/bridge/RequestHandler.java index f8a505e..f49ba9c 100644 --- a/android/sdk/src/main/java/com/taobao/weex/bridge/RequestHandler.java +++ b/android/sdk/src/main/java/com/taobao/weex/bridge/RequestHandler.java @@ -102,7 +102,12 @@ public class RequestHandler { WXBridgeManager.getInstance().post(new Runnable() { @Override public void run() { -nativeInvokeOnSuccess(nativeCallback, content, bundleTypeStr); +if(WXBridgeManager.getInstance().isJSFrameworkInit()) { + nativeInvokeOnSuccess(nativeCallback, content, bundleTypeStr); +} +else { + nativeInvokeOnFailed(nativeCallback); +} } }); } @@ -132,7 +137,12 @@ public class RequestHandler { WXBridgeManager.getInstance().post(new Runnable() { @Override public void run() { -nativeInvokeOnSuccess(sNativeCallback, script, bundleTypeStr); +if(WXBridgeManager.getInstance().isJSFrameworkInit()) { + nativeInvokeOnSuccess(sNativeCallback, script, bundleTypeStr); +} +else{ + nativeInvokeOnFailed(sNativeCallback); +} } }); } diff --git a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java index 9dafd92..8efa104 100755 --- a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java +++ b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java @@ -29,6 +29,8 @@ import android.os.Looper; import android.os.Message; import android.support.annotation.NonNull; import android.support.annotation.Nullable; +import android.support.annotation.RestrictTo; +import android.support.annotation.RestrictTo.Scope; import android.support.annotation.UiThread; import android.support.v4.util.ArrayMap; import android.text.TextUtils; @@ -366,7 +368,8 @@ public class WXBridgeManager implements Callback, BactchExecutor { // setJSFrameworkInit and isJSFrameworkInit may use on diff thread // use volatile - private boolean isJSFrameworkInit() { + @RestrictTo(Scope.LIBRARY) + boolean isJSFrameworkInit() { return mInit; }
[incubator-weex] 05/10: add new TimeCalculator for defaultConstructor
This is an automated email from the ASF dual-hosted git repository. luckychen pushed a commit to branch feature/0.26.2.19-jit in repository https://gitbox.apache.org/repos/asf/incubator-weex.git commit af772ae91eb3933586026c6c5a58bc2478e1bb35 Author: 东煜 AuthorDate: Fri Aug 16 17:44:33 2019 +0800 add new TimeCalculator for defaultConstructor --- android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java index 23d4089..9e0f2dc 100644 --- a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java +++ b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java @@ -501,6 +501,7 @@ public class WXSDKInstance implements IWXActivityStateListener,View.OnLayoutChan mWXPerformance = new WXPerformance(mInstanceId); mApmForInstance = new WXInstanceApm(mInstanceId); WXSDKManager.getInstance().getAllInstanceMap().put(mInstanceId,this); +mTimeCalculator = new TimeCalculator(this); } @@ -586,7 +587,9 @@ public class WXSDKInstance implements IWXActivityStateListener,View.OnLayoutChan // WXBridgeManager.getInstance().checkJsEngineMultiThread(); mDisableSkipFrameworkInit = isDisableSkipFrameworkInDataRender(); -mTimeCalculator = new TimeCalculator(this); +if(mTimeCalculator == null) { + mTimeCalculator = new TimeCalculator(this); +} } /**
[incubator-weex] 08/10: add pid and genId to ashmem
This is an automated email from the ASF dual-hosted git repository. luckychen pushed a commit to branch feature/0.26.2.19-jit in repository https://gitbox.apache.org/repos/asf/incubator-weex.git commit 3c6ba22914c2107b67e1fa38e4169c4d543e4d82 Author: 东煜 AuthorDate: Mon Aug 19 18:22:43 2019 +0800 add pid and genId to ashmem --- .../Source/android/multiprocess/weex_js_connection.cpp | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/weex_core/Source/android/multiprocess/weex_js_connection.cpp b/weex_core/Source/android/multiprocess/weex_js_connection.cpp index 11bd292..13dfb48 100644 --- a/weex_core/Source/android/multiprocess/weex_js_connection.cpp +++ b/weex_core/Source/android/multiprocess/weex_js_connection.cpp @@ -196,10 +196,16 @@ static void *newIPCServer(void *_td) { } return nullptr; } - +static int s_memId = 0; IPCSender *WeexJSConnection::start(IPCHandler *handler, IPCHandler *serverHandler, bool reinit) { - int fd = ashmem_create_region("WEEX_IPC_CLIENT", IPCFutexPageQueue::ipc_size); + pid_t pid = getpid(); + int id = __sync_fetch_and_add(_memId, 1); + std::string clientName("WEEX_IPC_CLIENT-"); + clientName += std::to_string(pid); + clientName += "-"; + clientName += std::to_string(id); + int fd = ashmem_create_region(clientName.c_str(), IPCFutexPageQueue::ipc_size); if (-1 == fd) { throw IPCException("failed to create ashmem region: %s", strerror(errno)); } @@ -215,11 +221,15 @@ IPCSender *WeexJSConnection::start(IPCHandler *handler, IPCHandler *serverHandle std::unique_ptr sender(createIPCSender(futexPageQueue.get(), handler)); m_impl->serverSender = std::move(sender); m_impl->futexPageQueue = std::move(futexPageQueue); - - int fd2 = ashmem_create_region("WEEX_IPC_SERVER", IPCFutexPageQueue::ipc_size); + std::string serverName("WEEX_IPC_SERVER-"); + serverName += std::to_string(pid); + serverName += "-"; + serverName += std::to_string(id); + int fd2 = ashmem_create_region(serverName.c_str(), IPCFutexPageQueue::ipc_size); if (-1 == fd2) { throw IPCException("failed to create ashmem region: %s", strerror(errno)); } + LOGE("weex create Client's Name is %s Server's name is %s",clientName.c_str(), serverName.c_str()); fd_server_closed = false; ThreadData td = { static_cast(fd2), static_cast(serverHandler) };
[incubator-weex] 06/10: Merge branch 'master' into release/20190814
This is an automated email from the ASF dual-hosted git repository. luckychen pushed a commit to branch feature/0.26.2.19-jit in repository https://gitbox.apache.org/repos/asf/incubator-weex.git commit a547aa55cacf8a622b03067e9656675a255fd3a8 Merge: af772ae fc20444 Author: YorkShen AuthorDate: Mon Aug 19 14:39:41 2019 +0800 Merge branch 'master' into release/20190814 ios/sdk/WeexSDK/Sources/Bridge/WXCoreBridge.mm | 16 ios/sdk/WeexSDK/Sources/Component/WXEditComponent.mm | 3 ++- ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.h | 1 + ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.m | 6 ++ weex_core/Source/android/wrap/wx_bridge.cpp| 5 - 5 files changed, 21 insertions(+), 10 deletions(-)
[incubator-weex] 07/10: Merge branch 'master' into release/20190814
This is an automated email from the ASF dual-hosted git repository. luckychen pushed a commit to branch feature/0.26.2.19-jit in repository https://gitbox.apache.org/repos/asf/incubator-weex.git commit 702803625575ff5ec329984a694c25c1907607a5 Merge: a547aa5 5bce92c Author: YorkShen AuthorDate: Mon Aug 19 16:17:05 2019 +0800 Merge branch 'master' into release/20190814 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(-)
[incubator-weex] 01/10: Revert "[Android] Android] restart weexCoreThread when reload JSEngine because thread maybe in lock state and can't execute reload action (block) (#2824)"
This is an automated email from the ASF dual-hosted git repository. luckychen pushed a commit to branch feature/0.26.2.19-jit in repository https://gitbox.apache.org/repos/asf/incubator-weex.git commit a608301233d230da0bc3100f4c81ada4a87200ea Author: chen AuthorDate: Thu Aug 15 11:32:16 2019 +0800 Revert "[Android] Android] restart weexCoreThread when reload JSEngine because thread maybe in lock state and can't execute reload action (block) (#2824)" This reverts commit c72e6b5a833f66ed048042d1e4fb385aa61ed97c. --- .../java/com/taobao/weex/bridge/WXBridgeManager.java | 19 --- 1 file changed, 19 deletions(-) diff --git a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java index 145730c..91aba2a 100755 --- a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java +++ b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java @@ -867,14 +867,6 @@ public class WXBridgeManager implements Callback, BactchExecutor { } - 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 { @@ -926,17 +918,6 @@ public class WXBridgeManager implements Callback, BactchExecutor { 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(); }
[incubator-weex] 02/10: Merge branch 'bugfix/android_msgloop_crash' into release/20190814
This is an automated email from the ASF dual-hosted git repository. luckychen pushed a commit to branch feature/0.26.2.19-jit in repository https://gitbox.apache.org/repos/asf/incubator-weex.git commit 01d720a4923b97793ed457c0906521f46b2818d7 Merge: a608301 6b010a0 Author: YorkShen AuthorDate: Thu Aug 15 17:19:06 2019 +0800 Merge branch 'bugfix/android_msgloop_crash' into release/20190814 .../com/taobao/weex/bridge/RequestHandler.java | 22 -- .../com/taobao/weex/bridge/WXBridgeManager.java| 15 --- weex_core/Source/core/bridge/eagle_bridge.cpp | 7 --- 3 files changed, 28 insertions(+), 16 deletions(-)
[incubator-weex] 10/10: [Android] build fix
This is an automated email from the ASF dual-hosted git repository. luckychen pushed a commit to branch feature/0.26.2.19-jit in repository https://gitbox.apache.org/repos/asf/incubator-weex.git commit 33940bd504113c2736e811d9c9ee169cfe3c1e18 Author: chen AuthorDate: Mon Aug 26 15:12:13 2019 +0800 [Android] build fix --- android/sdk/build.gradle | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/android/sdk/build.gradle b/android/sdk/build.gradle index 1f2645f..e183968 100755 --- a/android/sdk/build.gradle +++ b/android/sdk/build.gradle @@ -130,17 +130,17 @@ android { versionCode 1 versionName project.version ndk { - // if(!project.hasProperty('supportArmeabi-v7a') || "false" != project.getProperty('supportArmeabi-v7a')){ +if(!project.hasProperty('supportArmeabi-v7a') || "false" != project.getProperty('supportArmeabi-v7a')){ abiFilters 'armeabi-v7a' -//} - -//if(!project.hasProperty('supportArm64-v8a') || "false" != project.getProperty('supportArm64-v8a')){ -//abiFilters 'arm64-v8a' -//} -// -//if(!project.hasProperty('supportX86') || "false" != project.getProperty('supportX86')){ -//abiFilters 'x86' -//} +} + +if(!project.hasProperty('supportArm64-v8a') || "false" != project.getProperty('supportArm64-v8a')){ +abiFilters 'arm64-v8a' +} + +if(!project.hasProperty('supportX86') || "false" != project.getProperty('supportX86')){ +abiFilters 'x86' +} } externalNativeBuild { cmake {
[incubator-weex] branch feature/0.26.2.19-jit created (now 33940bd)
This is an automated email from the ASF dual-hosted git repository. luckychen pushed a change to branch feature/0.26.2.19-jit in repository https://gitbox.apache.org/repos/asf/incubator-weex.git. at 33940bd [Android] build fix This branch includes the following new commits: new a608301 Revert "[Android] Android] restart weexCoreThread when reload JSEngine because thread maybe in lock state and can't execute reload action (block) (#2824)" new 01d720a Merge branch 'bugfix/android_msgloop_crash' into release/20190814 new 92982ee [Android] Add `isJSFrameworkInit` before calling `nativeInvokeOnSuccess` new 582a945 Merge branch 'bugfix/android_msgloop_crash' into release/20190814 new af772ae add new TimeCalculator for defaultConstructor new a547aa5 Merge branch 'master' into release/20190814 new 7028036 Merge branch 'master' into release/20190814 new 3c6ba22 add pid and genId to ashmem new 724ea6a [Android] update jsc for jit new 33940bd [Android] build fix The 10 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[incubator-weex] 09/10: [Android] update jsc for jit
This is an automated email from the ASF dual-hosted git repository. luckychen pushed a commit to branch feature/0.26.2.19-jit in repository https://gitbox.apache.org/repos/asf/incubator-weex.git commit 724ea6a0138a7ee324fc1065472f9ba7d052ee70 Author: chen AuthorDate: Fri Aug 23 11:09:11 2019 +0800 [Android] update jsc for jit --- android/sdk/build.gradle | 20 ++-- android/sdk/libs/armeabi-v7a/libJavaScriptCore.so | Bin 5237568 -> 8852700 bytes android/sdk/libs/armeabi-v7a/libWTF.so | Bin 472828 -> 378920 bytes weex_core/Source/android/jsengine/CMakeLists.txt | 7 +++ weex_core/Source/js_runtime/CMakeLists.txt | 6 ++ .../Source/libs/armeabi-v7a/libJavaScriptCore.so | Bin 5237308 -> 0 bytes weex_core/Source/libs/armeabi-v7a/libWTF.so| Bin 472828 -> 0 bytes weex_core/Source/libs/armeabi/libJavaScriptCore.so | Bin 5237308 -> 0 bytes weex_core/Source/libs/armeabi/libWTF.so| Bin 472828 -> 0 bytes 9 files changed, 23 insertions(+), 10 deletions(-) diff --git a/android/sdk/build.gradle b/android/sdk/build.gradle index e183968..1f2645f 100755 --- a/android/sdk/build.gradle +++ b/android/sdk/build.gradle @@ -130,17 +130,17 @@ android { versionCode 1 versionName project.version ndk { -if(!project.hasProperty('supportArmeabi-v7a') || "false" != project.getProperty('supportArmeabi-v7a')){ + // if(!project.hasProperty('supportArmeabi-v7a') || "false" != project.getProperty('supportArmeabi-v7a')){ abiFilters 'armeabi-v7a' -} - -if(!project.hasProperty('supportArm64-v8a') || "false" != project.getProperty('supportArm64-v8a')){ -abiFilters 'arm64-v8a' -} - -if(!project.hasProperty('supportX86') || "false" != project.getProperty('supportX86')){ -abiFilters 'x86' -} +//} + +//if(!project.hasProperty('supportArm64-v8a') || "false" != project.getProperty('supportArm64-v8a')){ +//abiFilters 'arm64-v8a' +//} +// +//if(!project.hasProperty('supportX86') || "false" != project.getProperty('supportX86')){ +//abiFilters 'x86' +//} } externalNativeBuild { cmake { diff --git a/android/sdk/libs/armeabi-v7a/libJavaScriptCore.so b/android/sdk/libs/armeabi-v7a/libJavaScriptCore.so index d6b471c..2eaa2af 100755 Binary files a/android/sdk/libs/armeabi-v7a/libJavaScriptCore.so and b/android/sdk/libs/armeabi-v7a/libJavaScriptCore.so differ diff --git a/android/sdk/libs/armeabi-v7a/libWTF.so b/android/sdk/libs/armeabi-v7a/libWTF.so index 790bef2..6e91e81 100755 Binary files a/android/sdk/libs/armeabi-v7a/libWTF.so and b/android/sdk/libs/armeabi-v7a/libWTF.so differ diff --git a/weex_core/Source/android/jsengine/CMakeLists.txt b/weex_core/Source/android/jsengine/CMakeLists.txt index fd61378..8162f1a 100644 --- a/weex_core/Source/android/jsengine/CMakeLists.txt +++ b/weex_core/Source/android/jsengine/CMakeLists.txt @@ -27,6 +27,10 @@ add_definitions(-DPRINT_LOG_CACHEFILE=0) add_definitions(-DOS_ANDROID) #add_definitions(-DNDEBUG) add_definitions(-DUSE_SYSTEM_MALLOC=1) + +add_definitions(-DENABLE_JIT=1) +add_definitions(-DENABLE_FTL_JIT=1) +add_definitions(-DENABLE_DFG_JIT=1) if (${ANDROID_PLATFORM} STREQUAL "android-21") else () add_definitions(-D_POSIX_THREAD_KEYS_MAX=128) @@ -52,6 +56,9 @@ else () endif () set(USE_SYSTEM_MALLOC 1) +set(ENABLE_JIT 1) +set(ENABLE_FTL_JIT 1) +set(ENABLE_DFG_JIT 1) set(WEEXJSSERVER_NAME weexjss) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/weex_core/Source/js_runtime/CMakeLists.txt b/weex_core/Source/js_runtime/CMakeLists.txt index 42bd160..bde108b 100644 --- a/weex_core/Source/js_runtime/CMakeLists.txt +++ b/weex_core/Source/js_runtime/CMakeLists.txt @@ -54,6 +54,9 @@ add_definitions(-DUSE_JS_RUNTIME=1) add_definitions(-DUSE_SYSTEM_MALLOC=1) +add_definitions(-DENABLE_JIT=1) +add_definitions(-DENABLE_FTL_JIT=1) +add_definitions(-DENABLE_DFG_JIT=1) if (${ANDROID_PLATFORM} STREQUAL "android-21") else () add_definitions(-D_POSIX_THREAD_KEYS_MAX=128) @@ -79,6 +82,9 @@ else () endif () set(USE_SYSTEM_MALLOC 1) +set(ENABLE_JIT 1) +set(ENABLE_FTL_JIT 1) +set(ENABLE_DFG_JIT 1) set(WEEXJSSERVER_NAME weexjss) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/weex_core/Source/libs/armeabi-v7a/libJavaScriptCore.so b/weex_core/Source/libs/armeabi-v7a/libJavaScriptCore.so deleted file mode 100755 index 2d59099..000 Binary files a/weex_core/Source/libs/armeabi-v7a/libJavaScriptCore.so and /dev/null differ diff --git a/weex_core/Source/libs/armeabi-v7a/libWTF.so b/weex_core/Source/libs/armeabi-
[incubator-weex] 04/10: Merge branch 'bugfix/android_msgloop_crash' into release/20190814
This is an automated email from the ASF dual-hosted git repository. luckychen pushed a commit to branch feature/0.26.2.19-jit in repository https://gitbox.apache.org/repos/asf/incubator-weex.git commit 582a9452e14de3a1f0dcc9223d3560b7531ff441 Merge: 92982ee b9c23bf Author: YorkShen AuthorDate: Thu Aug 15 18:16:51 2019 +0800 Merge branch 'bugfix/android_msgloop_crash' into release/20190814 android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java | 4 +++- weex_core/Source/core/network/android/default_request_handler.cc | 4 2 files changed, 7 insertions(+), 1 deletion(-)
[incubator-weex] branch master updated: Fix npe (#2842)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 f64a866 Fix npe (#2842) f64a866 is described below commit f64a8660887c6767d6ec7fc927b58871661bd751 Author: darin AuthorDate: Wed Aug 21 19:55:23 2019 +0800 Fix npe (#2842) --- weex_core/Source/android/bridge/script_bridge_in_multi_process.cpp | 6 +++--- weex_core/Source/android/jsengine/weex_jsc_utils.cpp | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/weex_core/Source/android/bridge/script_bridge_in_multi_process.cpp b/weex_core/Source/android/bridge/script_bridge_in_multi_process.cpp index 524a9e6..96ca9f0 100644 --- a/weex_core/Source/android/bridge/script_bridge_in_multi_process.cpp +++ b/weex_core/Source/android/bridge/script_bridge_in_multi_process.cpp @@ -72,9 +72,9 @@ static std::unique_ptr HandleReportException( } WeexCoreManager::Instance()->script_thread()->message_loop()->PostTask( - weex::base::MakeCopyable([pageId = std::string(pageId), -funcS = std::string(func), -exceptionStr = std::string(exceptionInfo)] { + weex::base::MakeCopyable([pageId = std::string(pageId == nullptr ? "" : pageId), +funcS = std::string(func == nullptr ? "" : func), +exceptionStr = std::string(exceptionInfo == nullptr ? "" : exceptionInfo)] { WeexCoreManager::Instance() ->script_bridge() ->core_side() diff --git a/weex_core/Source/android/jsengine/weex_jsc_utils.cpp b/weex_core/Source/android/jsengine/weex_jsc_utils.cpp index f1182a0..2db4bb9 100644 --- a/weex_core/Source/android/jsengine/weex_jsc_utils.cpp +++ b/weex_core/Source/android/jsengine/weex_jsc_utils.cpp @@ -540,7 +540,8 @@ void ReportException(JSGlobalObject *_globalObject, Exception *exception, const CString data = exceptionInfo.utf8(); auto *globalObject = static_cast(_globalObject); -globalObject->js_bridge()->core_side()->ReportException(instanceid, func, data.data()); +const char *exception_char = data.data(); +globalObject->js_bridge()->core_side()->ReportException(instanceid, func, exception_char == nullptr? "" : exception_char); }
[incubator-weex] branch master updated: add new TimeCalculator for defaultConstructor (#2836)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 5e96986 add new TimeCalculator for defaultConstructor (#2836) 5e96986 is described below commit 5e969866c3c909c67cf9d04f58322240ad841d98 Author: darin AuthorDate: Mon Aug 19 15:18:00 2019 +0800 add new TimeCalculator for defaultConstructor (#2836) --- android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java index 23d4089..9e0f2dc 100644 --- a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java +++ b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java @@ -501,6 +501,7 @@ public class WXSDKInstance implements IWXActivityStateListener,View.OnLayoutChan mWXPerformance = new WXPerformance(mInstanceId); mApmForInstance = new WXInstanceApm(mInstanceId); WXSDKManager.getInstance().getAllInstanceMap().put(mInstanceId,this); +mTimeCalculator = new TimeCalculator(this); } @@ -586,7 +587,9 @@ public class WXSDKInstance implements IWXActivityStateListener,View.OnLayoutChan // WXBridgeManager.getInstance().checkJsEngineMultiThread(); mDisableSkipFrameworkInit = isDisableSkipFrameworkInDataRender(); -mTimeCalculator = new TimeCalculator(this); +if(mTimeCalculator == null) { + mTimeCalculator = new TimeCalculator(this); +} } /**
[incubator-weex] branch master updated: [iOS] add flag of grey bundle (#2828)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 84c3bb9 [iOS] add flag of grey bundle (#2828) 84c3bb9 is described below commit 84c3bb9e6b9ee7f58d4b8563a15c4f39a8ee2e3c Author: jianhan-he <41508406+jianhan...@users.noreply.github.com> AuthorDate: Thu Aug 15 11:43:48 2019 +0800 [iOS] add flag of grey bundle (#2828) --- ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.h | 1 + ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.m | 6 ++ 2 files changed, 7 insertions(+) diff --git a/ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.h b/ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.h index 335b639..b843c64 100644 --- a/ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.h +++ b/ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.h @@ -32,6 +32,7 @@ extern NSString* const KEY_PAGE_PROPERTIES_JSLIB_VERSION; extern NSString* const KEY_PAGE_PROPERTIES_WEEX_VERSION; extern NSString* const KEY_PAGE_PROPERTIES_REQUEST_TYPE; extern NSString* const KEY_PAGE_PROPERTIES_Z_CACHE_INFO; +extern NSString* const KEY_PAGE_PROPERTIES_GREY_BUNDLE; extern NSString* const KEY_PAGE_PROPERTIES_JS_FM_INIT; extern NSString* const KEY_PAGE_PROPERTIES_BUNDLE_TYPE; extern NSString* const KEY_PAGE_PROPERTIES_CONTAINER_NAME; diff --git a/ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.m b/ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.m index 1966b8d..33d6b4b 100644 --- a/ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.m +++ b/ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.m @@ -44,6 +44,7 @@ NSString* const KEY_PAGE_PROPERTIES_JSLIB_VERSION = @"wxJSLibVersion"; NSString* const KEY_PAGE_PROPERTIES_WEEX_VERSION = @"wxSDKVersion"; NSString* const KEY_PAGE_PROPERTIES_REQUEST_TYPE = @"wxRequestType"; NSString* const KEY_PAGE_PROPERTIES_Z_CACHE_INFO = @"wxZCacheInfo"; +NSString* const KEY_PAGE_PROPERTIES_GREY_BUNDLE = @"wxGreyBundle"; NSString* const KEY_PAGE_PROPERTIES_JS_FM_INIT = @"wxJsFrameworkInit"; NSString* const KEY_PAGE_PROPERTIES_BUNDLE_TYPE = @"wxBundleType"; NSString* const KEY_PAGE_PROPERTIES_CONTAINER_NAME = @"wxContainerName"; @@ -441,6 +442,11 @@ NSString* const VALUE_ERROR_CODE_DEFAULT = @"0"; return; } +id wxGreyBundle = [extInfo objectForKey:KEY_PAGE_PROPERTIES_GREY_BUNDLE]; +if (nil != wxGreyBundle && [wxGreyBundle isKindOfClass:NSString.class]) { +[self setProperty:KEY_PAGE_PROPERTIES_GREY_BUNDLE withValue:wxGreyBundle]; +} + id wxRequestType = [extInfo objectForKey:KEY_PAGE_PROPERTIES_REQUEST_TYPE]; if (nil != wxRequestType && [wxRequestType isKindOfClass: NSString.class]) { [self setProperty:KEY_PAGE_PROPERTIES_REQUEST_TYPE withValue:wxRequestType];
[incubator-weex] branch master updated: [Android] Fix Android JNI Crash (#2827)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 7e54ac5 [Android] Fix Android JNI Crash (#2827) 7e54ac5 is described below commit 7e54ac5c10bc93b8d72659d7dc9b5faa84753f5d Author: YorkShen AuthorDate: Thu Aug 15 10:22:38 2019 +0800 [Android] Fix Android JNI Crash (#2827) * [Android] Fix Android JNI Crash `jni_object()` in `ReportException()` could be nullptr if `InitFramework()` is not invoked. ``` JNI DETECTED ERROR IN APPLICATION: obj == null in call to CallVoidMethodV from int com.taobao.weex.bridge.WXBridge.nativeCreateInstanceContext(java.lang.String, java.lang.String, java.lang.String, com.taobao.weex.bridge.WXJSObject[]) .. (_JNIEnv::CallVoidMethod(_jobject*, _jmethodID*, ...)+22) (WeexCore::WXBridge::ReportException(_JNIEnv*, char const*, char const*, char const*)+132) (WeexCore::AndroidSide::ReportException(char const*, char const*, char const*)+34) .. (WeexCore::CoreSideInPlatform::CreateInstance(char const*, char const*, char const*, int, char const*, char const*, char const*, std::__ndk1::vector>&, char const*)+820) at com.taobao.weex.bridge.WXBridge.nativeCreateInstanceContext(Native method) at com.taobao.weex.bridge.WXBridge.createInstanceContext(Taobao:233) at com.taobao.weex.bridge.WXBridgeManager.invokeCreateInstanceContext(Taobao:1981) at com.taobao.weex.bridge.WXBridgeManager.invokeCreateInstance(Taobao:1709) ``` * Fix crash in EagleBridge::WeexCoreHandler::PostTaskToMsgLoop message_loop() in PostTaskToMsgLoop() could be nullptr if InitFramework() is not invoked. * Avoid multiple initialization. * Revert changes of InitSciptThread * Post successCallback in RequestHandler to JSThread. * Revert "Post successCallback in RequestHandler to JSThread." This reverts commit 04bc4068 * Delete `;` --- weex_core/Source/android/wrap/wx_bridge.cpp | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/weex_core/Source/android/wrap/wx_bridge.cpp b/weex_core/Source/android/wrap/wx_bridge.cpp index e73bc12..53ec056 100755 --- a/weex_core/Source/android/wrap/wx_bridge.cpp +++ b/weex_core/Source/android/wrap/wx_bridge.cpp @@ -39,7 +39,6 @@ #include "base/android/jni_type.h" #include "base/android/jni/jbytearray_ref.h" #include "base/android/jniprebuild/jniheader/WXBridge_jni.h" -#include "base/log_defines.h" #include "core/config/core_environment.h" #include "core/layout/layout.h" #include "core/layout/measure_func_adapter_impl_android.h" @@ -305,7 +304,9 @@ static void SetDeviceDisplay(JNIEnv* env, jobject jcaller, jstring instanceId, static jint InitFramework(JNIEnv* env, jobject object, jstring script, jobject params) { - WXBridge::Instance()->Reset(env, object); + if (!WXBridge::Instance()->jni_object()) { +WXBridge::Instance()->Reset(env, object); + } // Init platform thread --- ScriptThread WeexCoreManager::Instance()->InitScriptThread(); // Exception handler for so @@ -620,6 +621,9 @@ static jint CreateInstanceContext(JNIEnv* env, jobject jcaller, // If strategy is DATA_RENDER_BINARY, jscript is a jbyteArray, otherwise jstring // TODO use better way + if (!WXBridge::Instance()->jni_object()) { +WXBridge::Instance()->Reset(env, jcaller); + } if (scoped_render_strategy.getChars() != nullptr && strcmp(scoped_render_strategy.getChars(), "DATA_RENDER_BINARY") == 0) { JByteArrayRef byte_array(env, static_cast(jscript.Get()));
[incubator-weex] branch master updated: [Travis] Change git clone depth to 1(false) (#2796)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 3980f26 [Travis] Change git clone depth to 1(false) (#2796) 3980f26 is described below commit 3980f26a43c980527ae46e58a0063fe8dfbe1636 Author: YorkShen AuthorDate: Thu Aug 8 15:53:34 2019 +0800 [Travis] Change git clone depth to 1(false) (#2796) * [Travis] Change git clone depth to 1 * Remove noisy message in Travis --- .travis.yml| 3 +++ dangerfile-jsfm.js | 5 + 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 868c588..6004074 100644 --- a/.travis.yml +++ b/.travis.yml @@ -54,6 +54,9 @@ cache: - $HOME/android-ndk-r18b - bundle +git: + depth: false + before_cache: - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock - rm -fr $HOME/.gradle/caches/*/plugin-resolution/ diff --git a/dangerfile-jsfm.js b/dangerfile-jsfm.js index 36c4b46..dfa8c86 100644 --- a/dangerfile-jsfm.js +++ b/dangerfile-jsfm.js @@ -98,7 +98,4 @@ if(hasJsfmFile){ } }else{ console.log('has no jsfm file changed.'); - message('has no jsfm file changed.'); -} - -message('jsfm test finished.') +} \ No newline at end of file
[incubator-weex] branch master updated: Do not reboot jsc manually if jsc is crashed (#2782)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 6da71f0 Do not reboot jsc manually if jsc is crashed (#2782) 6da71f0 is described below commit 6da71f05eeac507e70e3e3ace569c34ea2113017 Author: darin AuthorDate: Fri Aug 2 17:59:17 2019 +0800 Do not reboot jsc manually if jsc is crashed (#2782) --- android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java | 1 + 1 file changed, 1 insertion(+) diff --git a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java index 781a2b0..aca5ac2 100755 --- a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java +++ b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java @@ -874,6 +874,7 @@ public class WXBridgeManager implements Callback, BactchExecutor { WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(instanceId); if (instance != null) { url = instance.getBundleUrl(); +instance.setHasException(true); } if(!isCrashFileEmpty) { try {
[incubator-weex] branch master updated: [Android] Add some annotation to suppress android lint. (#2779)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 9ea64b9 [Android] Add some annotation to suppress android lint. (#2779) 9ea64b9 is described below commit 9ea64b90a61b1e3f888d2bf18828acdd2f4c874a Author: YorkShen AuthorDate: Fri Aug 2 16:06:09 2019 +0800 [Android] Add some annotation to suppress android lint. (#2779) --- .../main/java/com/taobao/weex/ui/component/WXComponent.java| 1 + .../src/main/java/com/taobao/weex/ui/component/WXSlider.java | 2 ++ .../com/taobao/weex/ui/component/list/BasicListComponent.java | 1 + .../weex/ui/component/pesudo/TouchActivePseudoListener.java| 2 ++ .../com/taobao/weex/ui/component/richtext/WXRichTextView.java | 2 ++ .../main/java/com/taobao/weex/ui/view/WXCircleViewPager.java | 1 + .../sdk/src/main/java/com/taobao/weex/ui/view/WXEditText.java | 1 + .../java/com/taobao/weex/ui/view/WXHorizontalScrollView.java | 2 ++ .../sdk/src/main/java/com/taobao/weex/ui/view/WXImageView.java | 4 +--- .../src/main/java/com/taobao/weex/ui/view/WXScrollView.java| 1 + .../src/main/java/com/taobao/weex/ui/view/WXSwitchView.java| 2 ++ .../sdk/src/main/java/com/taobao/weex/ui/view/WXTextView.java | 5 ++--- .../sdk/src/main/java/com/taobao/weex/ui/view/WXVideoView.java | 1 + .../main/java/com/taobao/weex/ui/view/gesture/WXGesture.java | 10 +- .../java/com/taobao/weex/ui/view/listview/WXRecyclerView.java | 2 ++ .../src/main/java/com/taobao/weex/utils/WXSoInstallMgrSdk.java | 2 ++ 16 files changed, 28 insertions(+), 11 deletions(-) diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java index 7d4fdcb..e7be2ff 100644 --- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java +++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java @@ -1680,6 +1680,7 @@ public abstract class WXComponent extends WXBasicComponent imple new int[]{rippleColor}); return new RippleDrawable(colorStateList, new ColorDrawable(colorInt), null) { @Override +@SuppressLint("CanvasSize") public void draw(@NonNull Canvas canvas) { if (mBackgroundDrawable != null) { Path border = mBackgroundDrawable.getContentPath(new RectF(0, 0, canvas.getWidth(), canvas.getHeight())); diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXSlider.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXSlider.java index 6a91644..c2806fa 100644 --- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXSlider.java +++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXSlider.java @@ -18,6 +18,7 @@ */ package com.taobao.weex.ui.component; +import android.annotation.SuppressLint; import android.content.Context; import android.support.annotation.NonNull; import android.support.v4.view.ViewPager; @@ -554,6 +555,7 @@ public class WXSlider extends WXVContainer { } } + @SuppressLint("ClickableViewAccessibility") private void hackTwoItemsInfiniteScroll() { if (mViewPager == null || mAdapter == null) { return; diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/BasicListComponent.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/BasicListComponent.java index 3eeeb57..eba3b3f 100644 --- a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/BasicListComponent.java +++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/BasicListComponent.java @@ -939,6 +939,7 @@ public abstract class BasicListComponent
[incubator-weex] branch master updated: [Android] Fix problems in Android Lint (#2777)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 756eb78 [Android] Fix problems in Android Lint (#2777) 756eb78 is described below commit 756eb787424f7e92a855c60a7ed975804148bcdf Author: YorkShen AuthorDate: Thu Aug 1 20:27:11 2019 +0800 [Android] Fix problems in Android Lint (#2777) --- android/sdk/build.gradle | 1 + .../main/java/com/taobao/weex/WXEnvironment.java | 9 .../com/taobao/weex/bridge/WXBridgeManager.java| 2 +- .../java/com/taobao/weex/bridge/WXJSObject.java| 4 ++-- .../java/com/taobao/weex/http/WXStreamModule.java | 9 .../com/taobao/weex/ui/component/WXComponent.java | 3 ++- .../java/com/taobao/weex/ui/component/WXImage.java | 3 ++- .../com/taobao/weex/ui/component/WXScroller.java | 21 +-- .../weex/ui/component/list/BasicListComponent.java | 2 +- .../java/com/taobao/weex/ui/view/WXEditText.java | 2 ++ .../java/com/taobao/weex/ui/view/WXImageView.java | 2 ++ .../view/refresh/circlebar/CircleProgressBar.java | 2 ++ .../weex/ui/view/refresh/core/WXSwipeLayout.java | 7 +++ .../com/taobao/weex/utils/WXResourceUtils.java | 7 +++ .../com/taobao/weex/utils/WXSoInstallMgrSdk.java | 20 +++--- .../com/taobao/weex/utils/tools/LogDetail.java | 3 ++- android/sdk/src/main/res/values/isrtl.xml | 24 ++ 17 files changed, 78 insertions(+), 43 deletions(-) diff --git a/android/sdk/build.gradle b/android/sdk/build.gradle index b6dd8fa..e183968 100755 --- a/android/sdk/build.gradle +++ b/android/sdk/build.gradle @@ -220,6 +220,7 @@ dependencies { testImplementation 'org.hamcrest:hamcrest-core:1.3' testImplementation 'org.javassist:javassist:3.20.0-GA' testImplementation 'org.mockito:mockito-core:1.10.19' +//noinspection GradleDependency testImplementation 'org.objenesis:objenesis:2.1' testImplementation 'org.powermock:powermock-core:1.6.4' testImplementation 'org.powermock:powermock-api-mockito:1.6.4' diff --git a/android/sdk/src/main/java/com/taobao/weex/WXEnvironment.java b/android/sdk/src/main/java/com/taobao/weex/WXEnvironment.java index 519861d..fc51378 100644 --- a/android/sdk/src/main/java/com/taobao/weex/WXEnvironment.java +++ b/android/sdk/src/main/java/com/taobao/weex/WXEnvironment.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -48,6 +48,7 @@ import java.io.IOException; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.HashMap; +import java.util.Locale; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; @@ -58,10 +59,10 @@ public class WXEnvironment { public static final String OS = "android"; public static String SYS_VERSION = android.os.Build.VERSION.RELEASE; static{ -if(SYS_VERSION != null && SYS_VERSION.toUpperCase().equals("P")){ +if(SYS_VERSION != null && SYS_VERSION.toUpperCase(Locale.ROOT).equals("P")){ SYS_VERSION = "9.0.0"; } -if(SYS_VERSION != null && SYS_VERSION.toUpperCase().equals("Q")){ +if(SYS_VERSION != null && SYS_VERSION.toUpperCase(Locale.ROOT).equals("Q")){ SYS_VERSION = "10.0.0"; } } diff --git a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java index d9d09cc..781a2b0 100755 --- a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java +++ b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java @@ -957,7 +957,7 @@ public class WXBridgeManager implements Callback, BactchExecutor { public void callReportCrash(String crashFile, final String instanceId, final String url) { // statistic weex core process crash Date date = new Date(); -DateFormat format = new SimpleDateFormat("MMddHHmmss"); +DateFormat format = new SimpleDateFormat("MMddHHmmss", Locale.US); String time = format.format(date); final String origin_filename = crashFile + "." + time; File oldfile = new File(crashFile); diff --git a/android/sdk/src/main/java/com/taobao/weex/bridge/WXJSObject.java b/android/sdk/src/main/java/com/taobao/weex/bridge/WXJSObj
[incubator-weex] branch master updated: Fix some lint problems (#2776)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 529a56f Fix some lint problems (#2776) 529a56f is described below commit 529a56fee97897178795d8167a1ab0b1d53023e5 Author: YorkShen AuthorDate: Thu Aug 1 19:23:28 2019 +0800 Fix some lint problems (#2776) --- android/sdk/build.gradle| 3 +++ android/sdk/src/main/AndroidManifest.xml| 5 ++--- .../main/java/com/taobao/weex/render/WXAbstractRenderContainer.java | 5 +++-- .../sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java | 5 ++--- .../java/com/taobao/weex/ui/component/list/BasicListComponent.java | 2 ++ .../src/main/java/com/taobao/weex/ui/module/WXModalUIModule.java| 6 ++ .../sdk/src/main/java/com/taobao/weex/ui/module/WXTimerModule.java | 2 ++ android/sdk/src/main/java/com/taobao/weex/ui/view/WXWebView.java| 2 ++ .../com/taobao/weex/ui/view/refresh/wrapper/BounceRecyclerView.java | 2 ++ .../com/taobao/weex/ui/view/refresh/wrapper/BounceScrollerView.java | 2 ++ weex-playground | 2 +- 11 files changed, 23 insertions(+), 13 deletions(-) diff --git a/android/sdk/build.gradle b/android/sdk/build.gradle index f80bd7d..b6dd8fa 100755 --- a/android/sdk/build.gradle +++ b/android/sdk/build.gradle @@ -207,8 +207,11 @@ android { dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') +//noinspection GradleDependency compileOnly "com.android.support:recyclerview-v7:${project.supportLibVersion}" +//noinspection GradleDependency compileOnly "com.android.support:support-v4:${project.supportLibVersion}" +//noinspection GradleDependency compileOnly "com.android.support:appcompat-v7:${project.supportLibVersion}" compileOnly "com.alibaba:fastjson:${project.fastjsonLibVersion}" diff --git a/android/sdk/src/main/AndroidManifest.xml b/android/sdk/src/main/AndroidManifest.xml index 33d2f69..e0d8d4b 100755 --- a/android/sdk/src/main/AndroidManifest.xml +++ b/android/sdk/src/main/AndroidManifest.xml @@ -18,9 +18,8 @@ specific language governing permissions and limitations under the License. --> http://schemas.android.com/apk/res/android; - package="com.taobao.weex" - android:versionCode="1" - android:versionName="1.0"> + package="com.taobao.weex"> + extends WXBasicComponent imple } + @SuppressLint("RtlHardcoded") public void setMarginsSupportRTL(ViewGroup.MarginLayoutParams lp, int left, int top, int right, int bottom) { lp.setMargins(left, top, right, bottom); if (lp instanceof FrameLayout.LayoutParams) { diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/BasicListComponent.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/BasicListComponent.java index 402f456..721ea7f 100644 --- a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/BasicListComponent.java +++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/BasicListComponent.java @@ -18,6 +18,7 @@ */ package com.taobao.weex.ui.component.list; +import android.annotation.SuppressLint; import android.annotation.TargetApi; import android.content.Context; import android.graphics.Color; @@ -174,6 +175,7 @@ public abstract class BasicListComponent= android.os.Build.VERSION_CODES.JELLY_BEAN_MR1) { diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/module/WXModalUIModule.java b/android/sdk/src/main/java/com/taobao/weex/ui/module/WXModalUIModule.java index fc1367f..a158dcc 100644 --- a/android/sdk/src/main/java/com/taobao/weex/ui/module/WXModalUIModule.java +++ b/android/sdk/src/main/java/com/taobao/weex/ui/module/WXModalUIModule.java @@ -18,6 +18,7 @@ */ package com.taobao.weex.ui.module; +import android.annotation.SuppressLint; import android.app.Activity; import android.app.AlertDialog; import android.app.Dialog; @@ -27,15 +28,11 @@ import android.text.TextUtils; import android.view.Gravity; import android.widget.EditText; import android.widget.Toast; - -import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.taobao.weex.WXSDKEngine; import com.taobao.weex.annotation.JSMethod; import com.taobao.weex.bridge.JSCallback; import com.taobao.weex.utils.WXLogUtils; - -import java.net.URLDecoder; import java.util.HashMap; import java.util.Map; @@ -59,6 +56,7 @@ public class WXModalUIModule extends WXSDKEngine.DestroyableModule { private Toast toast; private Dialog activeDialog; + @SuppressLint("ShowToast") @JSMethod(uiThread = true) public void toast(JSONObject jsOb
[incubator-weex] branch master updated: [iOS] add fake performance detail data for server test (#2775)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 cf31bc0 [iOS] add fake performance detail data for server test (#2775) cf31bc0 is described below commit cf31bc0bbfc72b4f7bdb39ec3969cf7c78c85145 Author: jianhan-he <41508406+jianhan...@users.noreply.github.com> AuthorDate: Thu Aug 1 16:38:37 2019 +0800 [iOS] add fake performance detail data for server test (#2775) --- ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m | 6 +++--- ios/sdk/WeexSDK/Sources/Model/WXComponent.mm | 3 +++ ios/sdk/WeexSDK/Sources/Model/WXSDKInstance_performance.h | 7 +-- ios/sdk/WeexSDK/Sources/Model/WXSDKInstance_performance.m | 12 ++-- ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.h| 3 +++ ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.m| 3 +++ weex_core/Source/base/log_defines.h | 2 +- 7 files changed, 28 insertions(+), 8 deletions(-) diff --git a/ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m b/ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m index e351ef0..cca0d10 100644 --- a/ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m +++ b/ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m @@ -1104,10 +1104,10 @@ _Pragma("clang diagnostic pop") \ } else { [self callJSMethod:@"callJS" args:@[execIns, [tasks copy]]]; } -if (execInstance && !(execInstance.isJSCreateFinish)) { +if (execInstance) { NSTimeInterval diff = CACurrentMediaTime()*1000 - start; -execInstance.performance.fsCallJsNum++; -execInstance.performance.fsCallJsTime = execInstance.performance.fsCallJsTime+ diff; +execInstance.performance.callJsNum++; +execInstance.performance.callJsTime = execInstance.performance.callJsTime+ diff; } if (execInstance && !execInstance.apmInstance.isFSEnd) { NSTimeInterval diff = CACurrentMediaTime()*1000 - start; diff --git a/ios/sdk/WeexSDK/Sources/Model/WXComponent.mm b/ios/sdk/WeexSDK/Sources/Model/WXComponent.mm index 3a6da5e..4a80adf 100644 --- a/ios/sdk/WeexSDK/Sources/Model/WXComponent.mm +++ b/ios/sdk/WeexSDK/Sources/Model/WXComponent.mm @@ -359,6 +359,7 @@ static BOOL bNeedRemoveEvents = YES; return _view; } else { WXAssertMainThread(); +double startCreateViewTime = CACurrentMediaTime()*1000; // compositing child will be drew by its composited ancestor if (_isCompositingChild) { @@ -446,6 +447,8 @@ static BOOL bNeedRemoveEvents = YES; [self _buildViewHierarchyLazily]; } +double diffTime = CACurrentMediaTime()*1000 - startCreateViewTime; +[self.weexInstance.performance recordViewCreatePerformance:diffTime]; [self _handleFirstScreenTime]; [self.weexInstance.performance onViewLoad:self]; diff --git a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance_performance.h b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance_performance.h index c9fca16..d4604bf 100644 --- a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance_performance.h +++ b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance_performance.h @@ -30,9 +30,9 @@ @property (nonatomic, assign) double jsCreateFinishTime; //firsrScreen call jsMethod totalTime -@property (nonatomic, assign) double fsCallJsTime; +@property (nonatomic, assign) double callJsTime; //firsrScreen call jsMethod totalNum -@property (nonatomic, assign) double fsCallJsNum; +@property (nonatomic, assign) double callJsNum; //firsrScreen call nativeMethod totalTime @property (nonatomic, assign) double fsCallNativeTime; //firsrScreen call nativeMethod totalNum @@ -61,12 +61,15 @@ //all componentCreate time in instance life @property (nonatomic,assign) double componentCreateTime; +@property (nonatomic,assign) double viewCreateTime; + @property (nonatomic,assign) double newFsRenderTime; @property (nonatomic,assign) long lastRealInteractionTime; //for performance record - (void)onViewLoad:(WXComponent *)targetComponent; - (void)recordComponentCreatePerformance:(double) diffTime forComponent:(WXComponent *)targetComponent; +- (void)recordViewCreatePerformance:(double) diffTime; - (void)onInstanceRenderSuccess:(WXSDKInstance*) instance; @end diff --git a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance_performance.m b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance_performance.m index a5ebcf2..c57b918 100644 --- a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance_performance.m +++ b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance_performance.m @@ -42,6 +42,10 @@ self.componentCreateTime+=diffTime; } +- (void)recordViewCreatePerformance:(double) diffTime { +self.viewCreateTime += diffTime; +} + /** on UI t
[incubator-weex] branch master updated: Update ReadMe and contributing (#2760)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 31f7089 Update ReadMe and contributing (#2760) 31f7089 is described below commit 31f7089038db11c46254bf3667a9cfb3fa9cfb1b Author: YorkShen AuthorDate: Tue Jul 30 15:14:45 2019 +0800 Update ReadMe and contributing (#2760) --- CONTRIBUTING.md | 16 +++- README.md | 6 ++ 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f1f764c..beecfc2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,9 +4,11 @@ Weex community respects all kinds of contributing, including but not limited to * [Code of Conduct](#code-of-conduct) * [Mailing List](#mailing-list) * [Ask or Answer Questions](#mailing-list) +* [Development Process](#development-process) * [Contribute Code or document](#contribute-code-or-document) * [Contribute Documentation](contribute-documentation) * [Contribute Code](#contribute-code) +* [Members and Governance Model](#members-and-governance-model) # Code of Conduct To make an open and friendly community, Weex community adopt [Contributor Covenant](./CODE_OF_CONDUCT.md) as the code of conduct. @@ -36,6 +38,15 @@ Compared to the amount of issues, Weex community may not response to your issues *Tip*: > If your Github issue doesn't get any response over a week, you can ask > developers through [weex mailing > list](https://weex.apache.org/guide/contribute/how-to-contribute.html#mailing-list). +# Development Process +Most of the development process is described in [confluence](https://cwiki.apache.org/confluence/x/eJBTBw), which services the contributors of Weex and is transparent to all users. + +* [Release Plan](https://github.com/apache/incubator-weex/milestones): All feature, bugfix, issue-solved are associated with a certain milestone since Weex 0.27. As every Weex release needs approval from PPMC and IPMC, the due date of milestone is just an estimation of release date, not accuracy schedule. +* [Release Procedure](https://cwiki.apache.org/confluence/x/_I5TBw) +* [Major feature](https://github.com/apache/incubator-weex/projects) +* [System Design](https://cwiki.apache.org/confluence/x/XYxTBw) +* [Road Map](https://cwiki.apache.org/confluence/x/fJBTBw) + # Contribute Code or document In Weex community, **Documentation is as important as code**, and Weex community respects all the contribution of documentation or code. @@ -131,4 +142,7 @@ There will be a static check program when you submit a PR,and the following rule 1. Check if your PR modify the changelog.md, if not,you will receive a warning message. *Tip*: -> Reviewing PR may take a great deal of time, please be patient. If your PR doesn't get response over 96 hours, you might send an email to [mailing list](https://weex.apache.org/guide/contribute/how-to-contribute.html#mailing-list) to ask the progress. \ No newline at end of file +> Reviewing PR may take a great deal of time, please be patient. If your PR doesn't get response over 96 hours, you might send an email to [mailing list](https://weex.apache.org/guide/contribute/how-to-contribute.html#mailing-list) to ask the progress. + +# Members and Governance Model +You can find committers, PPMCs and governance model of Weex from [confluence](https://cwiki.apache.org/confluence/x/bFoyBw). \ No newline at end of file diff --git a/README.md b/README.md index 5b22750..5ff48fe 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ Please ***INSTALL [Git for Windows](https://git-scm.com/download/win)*** and run Runtime -On Android Platform , Weex code is executed in [weex_v8core](https://github.com/alibaba/weex_v8core) which is based on Google V8 JavaScript engine. +On Android Platform , Weex code is executed in [weex_js_engine](https://github.com/alibaba/weex_js_engine/tree/bridge_branch_mergeTimer) which is based on JavaScriptCore engine. ### iOS * run playground @@ -100,11 +100,9 @@ Weex team have developed a [DevTool](https://github.com/weexteam/weex-devtool) t See more stuff on [this wiki page](https://github.com/alibaba/weex/wiki/Weex-Community) ## Weex Community -* [Mailing List](https://weex-project.io/contributing.html#join-in-discussions) Weex Mailing List, where most discussion happens. +* [Mailing List](https://weex.apache.org/guide/contribute/how-to-contribute.html#mailing-list) Weex Mailing List, where most discussion happens. * [StackOverflow](http://stackoverflow.com/questions/tagged/weex): Ask questions about Weex. * [SegmentFault (cn)](https://segmentfault.com/t/weex): 中文交流与讨论 -* [FAQ](https://weex.apache.org/faq.html) -* [Articles (cn)](https://github.com/weexteam/article/issues): Weex 相关文章集合 * [Telegram Russian Community Group](https://tele
[incubator-weex] branch master updated: [Android] Fix show-indicators doesn't work. (#2746)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 7e7bec0 [Android] Fix show-indicators doesn't work. (#2746) 7e7bec0 is described below commit 7e7bec08b2a05a81b90a2b53f7dbd434940545a5 Author: YorkShen AuthorDate: Tue Jul 23 17:58:55 2019 +0800 [Android] Fix show-indicators doesn't work. (#2746) http://dotwe.org/vue/d99248504f47b25309f80aa5b11eb9d6 --- android/sdk/src/main/java/com/taobao/weex/ui/component/WXSlider.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXSlider.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXSlider.java index 3b65c02..6a91644 100644 --- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXSlider.java +++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXSlider.java @@ -91,7 +91,7 @@ public class WXSlider extends WXVContainer { */ protected WXCirclePageAdapter mAdapter; - protected boolean mShowIndicators; + protected boolean mShowIndicators = true; protected OnPageChangeListener mPageChangeListener = new SliderPageChangeListener(); @@ -264,6 +264,7 @@ public class WXSlider extends WXVContainer { return; } mIndicator = indicator; +mIndicator.setShowIndicators(mShowIndicators); WXCircleIndicator indicatorView = indicator.getHostView(); if (indicatorView != null) { indicatorView.setCircleViewPager(mViewPager);
[incubator-weex] branch master updated: [Doc] Update contributing.md (#2745)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 1d81470 [Doc] Update contributing.md (#2745) 1d81470 is described below commit 1d81470ca7f6ccbf25726ca40c6f5993b7758c94 Author: YorkShen AuthorDate: Tue Jul 23 17:08:55 2019 +0800 [Doc] Update contributing.md (#2745) * Update contributing.md * Update table of content --- CONTRIBUTING.md | 154 ++-- 1 file changed, 117 insertions(+), 37 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8bbe069..f1f764c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,54 +1,134 @@ -# Join Weex community - -> Community over code - -Weex project belongs to Apache Software Foundation and Weex community respects and fulfills the Apache rule, which is **Community over code** . - -## Code of Conduct - -To make an open and friendly community, Weex community adopt [Contributor Covenant](https://www.contributor-covenant.org/version/1/4/code-of-conduct) as the code of conduct. - -## Mailing List +# Contributing to Weex +Weex community respects all kinds of contributing, including but not limited to code, documentation, mailing list. +## Table of Content +* [Code of Conduct](#code-of-conduct) +* [Mailing List](#mailing-list) +* [Ask or Answer Questions](#mailing-list) +* [Contribute Code or document](#contribute-code-or-document) +* [Contribute Documentation](contribute-documentation) +* [Contribute Code](#contribute-code) + +# Code of Conduct +To make an open and friendly community, Weex community adopt [Contributor Covenant](./CODE_OF_CONDUCT.md) as the code of conduct. + +# Mailing List > If it didn't happen on a mailing list, it didn't happen. -**Subscribing mailing list of weex is necessary to join weex community.** +In Weex community, feature requests, discussions and decisions happen on the mailing list, which is open to the whole world. Ref our [website](https://weex.apache.org/guide/contribute/how-to-contribute.html#mailing-list) to see more. -In Weex community, feature requests, discussions and decisions happen on the mailing list, which is open to the whole world. +# Ask or Answer Questions +Weex Community [Github Issue](https://github.com/apache/incubator-weex/issues) to report and track bugs 。The more information provided in a Github issue, the sooner it get solved. -`d...@weex.incubator.apache.org` is the mailing list's address. Developers can subscribe this list to know what is happening in weex community and express his/her idea. Send an email to [subscription](mailto:dev-subscr...@weex.incubator.apache.org?subject=%28send%20this%20email%20to%20subscribe%29) then you will receive a confirmation email. Once you reply the confirmation email, the subscription is done. +*Tip*: +> * Avoid duplicated: Always search on Github before you fire a new one. +> * Always run with the latest version before you fire a bug +> * Only report one bug in one Github Issue. -If you want to unsubscribe, send an email to [Canceling subscription](mailto:dev-unsubscr...@weex.incubator.apache.org?subject=%28send%20this%20email%20to%20unsubscribe%29) +## Format of Github issue +Please use the [Bug Report](https://github.com/apache/incubator-weex/issues/new/choose) template when firing a bug. All the information needed to solve a bug is listed in the Bug report template , please fill it out as much as you can. **The more information provided in a Github issue, the sooner it get solved.** -Read [Apache mailing list](https://apache.org/foundation/mailinglists.html) to have a deeper view of mailing list. +*Tip*: +> Report bug with fact and expected behavior, not complaint or emotional words. +## Be patient +Compared to the amount of issues, Weex community may not response to your issues in time, please be patient. -## Ask or Answer Questions -* You ask questions on [stackoverflow.com](http://stackoverflow.com/questions/tagged/weex) for basic use problems and concepts. -* You can report a bug through Github Issue as mention in [bug report](https://weex.io/guide/contribute/bug-report-guidelines.html). +*Tip*: +> If your Github issue doesn't get any response over a week, you can ask developers through [weex mailing list](https://weex.apache.org/guide/contribute/how-to-contribute.html#mailing-list). -**Tip**: -> Formally speaking, StackOverflow is not part of Weex community though developers around the world continually contribute to it. If your question on StackOverflow doesn't get response within 96 hours, you can fire a [Github Issue](https://github.com/apache/incubator-weex/issues) with link to your question on StackOverflow. - -**Warning**: -> Only the following types of issues are valid Github issu
[incubator-weex] branch master updated: [Android] Remove duplicated file which is the same as weex_core/Source/base/android/jniprebuild/jniheader/WXBridge_jni.h (#2744)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 d91e735 [Android] Remove duplicated file which is the same as weex_core/Source/base/android/jniprebuild/jniheader/WXBridge_jni.h (#2744) d91e735 is described below commit d91e735a6c9942326db04625911f0d1450defe96 Author: YorkShen AuthorDate: Tue Jul 23 15:46:18 2019 +0800 [Android] Remove duplicated file which is the same as weex_core/Source/base/android/jniprebuild/jniheader/WXBridge_jni.h (#2744) --- weex-playground|2 +- .../com/taobao/weex/bridge/WXBridge_jni.h | 1193 2 files changed, 1 insertion(+), 1194 deletions(-) diff --git a/weex-playground b/weex-playground index 91ea38c..996e447 16 --- a/weex-playground +++ b/weex-playground @@ -1 +1 @@ -Subproject commit 91ea38c581beb56513ada32a0e93743cf0682f91 +Subproject commit 996e447ef1e0ecc5416e91147e05632c4f4802fa diff --git a/weex_core/Source/base/android/jniprebuild/jniheader/com/taobao/weex/bridge/WXBridge_jni.h b/weex_core/Source/base/android/jniprebuild/jniheader/com/taobao/weex/bridge/WXBridge_jni.h deleted file mode 100644 index 014f574..000 --- a/weex_core/Source/base/android/jniprebuild/jniheader/com/taobao/weex/bridge/WXBridge_jni.h +++ /dev/null @@ -1,1193 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -// Copyright 2014 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// This file is autogenerated by -// base/android/jniprebuild/jni_generator.py -// For -// com/taobao/weex/bridge/WXBridge - -#ifndef com_taobao_weex_bridge_WXBridge_JNI -#define com_taobao_weex_bridge_WXBridge_JNI - -#include - -//#include "base/android/jni_int_wrapper.h" - -// Step 1: forward declarations. -namespace { -const char kWXBridgeClassPath[] = "com/taobao/weex/bridge/WXBridge"; -// Leaking this jclass as we cannot use LazyInstance from some threads. -jclass g_WXBridge_clazz = NULL; -#define WXBridge_clazz(env) g_WXBridge_clazz - -} // namespace - -static jint InitFrameworkEnv(JNIEnv* env, jobject jcaller, -jstring framework, -jobject params, -jstring cacheDir, -jboolean pieSupport); - -static jint InitFramework(JNIEnv* env, jobject jcaller, -jstring framework, -jobject params); - -static void RefreshInstance(JNIEnv* env, jobject jcaller, -jstring instanceId, -jstring namespace, -jstring function, -jobjectArray args); - -static jint ExecJS(JNIEnv* env, jobject jcaller, -jstring instanceId, -jstring name, -jstring function, -jobjectArray args); - -static jint ExecJSService(JNIEnv* env, jobject jcaller, -jstring javascript); - -static jbyteArray ExecJSWithResult(JNIEnv* env, jobject jcaller, -jstring instanceId, -jstring _namespace, -jstring _function, -jobjectArray args); - -static void ExecJSWithCallback(JNIEnv* env, jobject jcaller, -jstring instanceId, -jstring _namespace, -jstring _function, -jobjectArray args, -jlong callbackId); - -static jint CreateInstanceContext(JNIEnv* env, jobject jcaller, -jstring instanceId, -jstring name, -jstring function, -jobjectArray args); - -static jint DestoryInstance(JNIEnv* env, jobject jcaller, -jstring instanceId, -jstring name, -jstring function, -jobjectArray args); - -static jstring ExecJSOnInstance(JNIEnv* env, jobject jcaller, -jstring instanceId, -jstring script, -jint type); - -static void FireEventOnDataRenderNode(JNIEnv* env, jobject jcaller, -jstring instanceId, -jstring ref, -jstring type, -jstring data, -jstring domChanges); - -static void RegisterModuleOnDataRenderNode(JNIEnv* env, jobject jcaller, -jstring data); - -static void TakeHeapSnapshot(JNIEnv* env, jobject jcaller, -jstring filename); - -static void BindMeasurementToRenderObject(JNIEnv* env, jobject
[incubator-weex] branch master updated: Move uikit type report to proper position so that apmInstance will not ignore it. (#2741)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 e93bd91 Move uikit type report to proper position so that apmInstance will not ignore it. (#2741) e93bd91 is described below commit e93bd91418005a031554aabdb0cd4bceb95deff9 Author: wqyfavor AuthorDate: Mon Jul 22 21:28:38 2019 +0800 Move uikit type report to proper position so that apmInstance will not ignore it. (#2741) --- ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m index cb46690..4781615 100644 --- a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m +++ b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m @@ -141,8 +141,6 @@ typedef enum : NSUInteger { _performance = [[WXPerformance alloc] init]; _apmInstance = [[WXApmForInstance alloc] init]; -[_apmInstance setProperty:KEY_PAGE_PROPERTIES_UIKIT_TYPE withValue:_renderType?: WEEX_RENDER_TYPE_PLATFORM]; - _defaultDataRender = NO; _useBackupJsThread = NO; @@ -391,6 +389,8 @@ typedef enum : NSUInteger { //some case , with out render (url) [self.apmInstance startRecord:self.instanceId]; self.apmInstance.isStartRender = YES; + +[_apmInstance setProperty:KEY_PAGE_PROPERTIES_UIKIT_TYPE withValue:_renderType?: WEEX_RENDER_TYPE_PLATFORM]; if (self.dataRender) { [self.apmInstance setProperty:KEY_PAGE_PROPERTIES_RENDER_TYPE withValue:@"eagle"]; } @@ -477,6 +477,8 @@ typedef enum : NSUInteger { [self _checkPageName]; [self.apmInstance startRecord:self.instanceId]; self.apmInstance.isStartRender = YES; + +[_apmInstance setProperty:KEY_PAGE_PROPERTIES_UIKIT_TYPE withValue:_renderType?: WEEX_RENDER_TYPE_PLATFORM]; if (self.dataRender) { [self.apmInstance setProperty:KEY_PAGE_PROPERTIES_RENDER_TYPE withValue:@"eagle"]; }
[incubator-weex] branch master updated: [Android] Change log. (#2739)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 9768a92 [Android] Change log. (#2739) 9768a92 is described below commit 9768a92da812b1942a28418db2fd1bff84e7b525 Author: YorkShen AuthorDate: Mon Jul 22 17:04:32 2019 +0800 [Android] Change log. (#2739) --- android/sdk/src/main/java/com/taobao/weex/utils/WXUtils.java | 6 +++--- weex-playground | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/android/sdk/src/main/java/com/taobao/weex/utils/WXUtils.java b/android/sdk/src/main/java/com/taobao/weex/utils/WXUtils.java index 44fe49e..95bdfae 100644 --- a/android/sdk/src/main/java/com/taobao/weex/utils/WXUtils.java +++ b/android/sdk/src/main/java/com/taobao/weex/utils/WXUtils.java @@ -26,12 +26,10 @@ import android.os.SystemClock; import android.support.annotation.Nullable; import android.support.v4.util.LruCache; import android.text.TextUtils; -import android.util.Log; import com.taobao.weex.WXEnvironment; import com.taobao.weex.WXSDKManager; import com.taobao.weex.adapter.IWXConfigAdapter; import com.taobao.weex.common.Constants; -import com.taobao.weex.common.WXConfig; public class WXUtils { @@ -306,7 +304,9 @@ public class WXUtils { } } } catch (NumberFormatException nfe) { - WXLogUtils.e("Argument format error! value is " + value, nfe); + if (WXEnvironment.isApkDebugable()) { +WXLogUtils.w("The parameter format is not supported", nfe); + } } catch (Exception e) { WXLogUtils.e("Argument error! value is " + value, e); } diff --git a/weex-playground b/weex-playground index 1341be3..91ea38c 16 --- a/weex-playground +++ b/weex-playground @@ -1 +1 @@ -Subproject commit 1341be37c6184f61bae9e6f917b09005f29df974 +Subproject commit 91ea38c581beb56513ada32a0e93743cf0682f91
[incubator-weex] branch master updated: Update build.gradle (#2711)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 d2d2b61 Update build.gradle (#2711) d2d2b61 is described below commit d2d2b614b57332d6a4045168e3297b09e0bf5486 Author: YorkShen AuthorDate: Tue Jul 16 14:56:28 2019 +0800 Update build.gradle (#2711) --- android/build.gradle | 3 +-- android/sdk/build.gradle | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index b378333..e97c970 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -52,11 +52,10 @@ subprojects { } ext { compileSdkVersion=26 -buildToolsVersion="26.0.3" minSdkVersion=14 targetSdkVersion=26 supportLibVersion="26.0.2" -fastjsonLibVersion="1.1.46.android" +fastjsonLibVersion="1.1.70.android" //Default value for disableCov is false disableCov = project.hasProperty("disableCov") && disableCov.equals("true") implementFromWeex = true diff --git a/android/sdk/build.gradle b/android/sdk/build.gradle index a89d87d..6363fd5 100755 --- a/android/sdk/build.gradle +++ b/android/sdk/build.gradle @@ -71,7 +71,6 @@ if (!project.hasProperty('ignoreVersionCheck') || !project.getProperty('ignoreVe android { compileSdkVersion project.compileSdkVersion -//buildToolsVersion project.buildToolsVersion resourcePrefix "weex" useLibrary 'org.apache.http.legacy' if(project.hasProperty('removeSharedLib') && "true".equals(project.getProperty('removeSharedLib'))) {
[incubator-weex] branch master updated: [Android] Update build.gradle and TravisCI (#2703)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 0b3 [Android] Update build.gradle and TravisCI (#2703) 0b3 is described below commit 0b3629fffcc279f3c9ebfec127cc49a4e864 Author: YorkShen AuthorDate: Mon Jul 15 21:01:12 2019 +0800 [Android] Update build.gradle and TravisCI (#2703) * Update build.gradle and submodule * Remove gradle-wrapper in sdk dir. * Update danger.js * Update submodule * Update travis * Update build.gradle * Update travis --- .travis.yml | 3 ++- android/build.gradle | 3 --- android/sdk/build.gradle | 6 +++--- android/sdk/gradle/wrapper/gradle-wrapper.jar| Bin 52266 -> 0 bytes android/sdk/gradle/wrapper/gradle-wrapper.properties | 6 -- dangerfile-android.js| 4 +--- weex-playground | 2 +- 7 files changed, 7 insertions(+), 17 deletions(-) diff --git a/.travis.yml b/.travis.yml index a6c8505..7a5d60d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -90,7 +90,8 @@ script: echo "The value of hasAndroidFile is ${hasAndroidFile}" if [[ "$hasAndroidFile" =~ "hasAndroidFile" ]]; then cd android - ./gradlew clean install ${GRADLE_ABI} --info + ./gradlew clean install -PbuildRuntimeApi=true ${GRADLE_ABI} --info + ./gradlew install -PbuildRuntimeApi=false ${GRADLE_ABI} --info fi ;; "jsfm" ) diff --git a/android/build.gradle b/android/build.gradle index b8646ac..b378333 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -57,12 +57,9 @@ ext { targetSdkVersion=26 supportLibVersion="26.0.2" fastjsonLibVersion="1.1.46.android" -//Default value for buildCpp is true -buildCpp = !project.hasProperty("buildCpp") || buildCpp.equals("true") //Default value for disableCov is false disableCov = project.hasProperty("disableCov") && disableCov.equals("true") implementFromWeex = true - } //task clean(type: Delete) { diff --git a/android/sdk/build.gradle b/android/sdk/build.gradle index 9085083..a89d87d 100755 --- a/android/sdk/build.gradle +++ b/android/sdk/build.gradle @@ -48,13 +48,13 @@ checkstyle { toolVersion = '6.9' } -version = project.hasProperty('weexVersion') ? project.getProperty('weexVersion') : "0.20.0.1" +version = project.hasProperty('weexVersion') ? project.getProperty('weexVersion') : '0.26.0.1' //Check version, the version must have 4 sections. The leading three section must be number, and the last section is odd number with or without suffix string. if (!project.hasProperty('ignoreVersionCheck') || !project.getProperty('ignoreVersionCheck').equals("true")) { version.tokenize('.').eachWithIndex { it, i -> if (i < 3) { -assert it.isNumber() : "Please use semantic versioning witch 4 sections, you are using ${$ { i } + 1} section instead." +assert it.isNumber() : "Please use semantic versioning witch 4 sections, you are using ${${i} + 1} section instead." } else if (i == 3) { it.split("[-_]").toList().eachWithIndex { inner_it, inner_i -> if (inner_i == 0) { @@ -64,7 +64,7 @@ if (!project.hasProperty('ignoreVersionCheck') || !project.getProperty('ignoreVe } }.size == 4 } else { -assert false: "Please use semantic versioning witch 4 sections, you are using ${$ { i } + 1} section instead." +assert false: "Please use semantic versioning witch 4 sections, you are using ${${i} + 1} section instead." } } } diff --git a/android/sdk/gradle/wrapper/gradle-wrapper.jar b/android/sdk/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index b5166da..000 Binary files a/android/sdk/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/android/sdk/gradle/wrapper/gradle-wrapper.properties b/android/sdk/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index d649982..000 --- a/android/sdk/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Wed May 03 18:06:49 CST 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=http://gw.alicdn.com/bao/uploaded/LB1J5WLJVcMXpXX.zip diff --git a/dangerfile-android.js b/dangerfile-android.js index 59e39dd..0ee29d6 1006
[incubator-weex] branch master updated: [jsfm] Also enable the promise polyfill on Android (#2704)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 eae533c [jsfm] Also enable the promise polyfill on Android (#2704) eae533c is described below commit eae533c5a07755c7040efff10fa51e122d997715 Author: Hanks AuthorDate: Mon Jul 15 14:42:11 2019 +0800 [jsfm] Also enable the promise polyfill on Android (#2704) Since the internal Promise API may have unpredictable behavior on some legacy Android devices, so using the js polyfill instead (as iOS does). Modify the js framework version in package.json, since it has already been updated in https://github.com/apache/incubator-weex/pull/2669 --- package.json | 2 +- runtime/shared/polyfill/promise.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 48b5222..80cccf9 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "weex", "version": "0.12.2", "subversion": { -"framework": "0.29.6", +"framework": "0.29.7", "transformer": ">=0.1.5 <0.5" }, "description": "A framework for building Mobile cross-platform UI", diff --git a/runtime/shared/polyfill/promise.js b/runtime/shared/polyfill/promise.js index 1bb0ee3..51fca79 100644 --- a/runtime/shared/polyfill/promise.js +++ b/runtime/shared/polyfill/promise.js @@ -24,7 +24,7 @@ const { WXEnvironment } = global /* istanbul ignore next */ if (typeof WXEnvironment !== 'undefined' - && WXEnvironment.platform === 'iOS' + && (WXEnvironment.platform === 'iOS' || WXEnvironment.platform === 'android') && !WXEnvironment.__enable_native_promise__) { global.Promise = undefined }
[incubator-weex] branch master updated: [Android] Fix createFinish problem (#2701)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 23c8f3e [Android] Fix createFinish problem (#2701) 23c8f3e is described below commit 23c8f3e47a2be02174b381a8df78b622f5b2dbc3 Author: YorkShen AuthorDate: Fri Jul 12 20:31:00 2019 +0800 [Android] Fix createFinish problem (#2701) --- .../java/com/taobao/weex/ui/action/GraphicActionCreateFinish.java | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/action/GraphicActionCreateFinish.java b/android/sdk/src/main/java/com/taobao/weex/ui/action/GraphicActionCreateFinish.java index e09e2ea..c768b08 100644 --- a/android/sdk/src/main/java/com/taobao/weex/ui/action/GraphicActionCreateFinish.java +++ b/android/sdk/src/main/java/com/taobao/weex/ui/action/GraphicActionCreateFinish.java @@ -19,9 +19,7 @@ package com.taobao.weex.ui.action; import android.support.annotation.NonNull; - import com.taobao.weex.WXSDKInstance; -import com.taobao.weex.WXSDKManager; import com.taobao.weex.common.RenderTypes; import com.taobao.weex.common.WXRenderStrategy; import com.taobao.weex.performance.WXInstanceApm; @@ -56,8 +54,6 @@ public class GraphicActionCreateFinish extends BasicGraphicAction { return; } -instance.mHasCreateFinish = true; - if (instance.getRenderStrategy() == WXRenderStrategy.APPEND_ONCE) { instance.onCreateFinish(); }else{ @@ -66,6 +62,8 @@ public class GraphicActionCreateFinish extends BasicGraphicAction { } } +instance.mHasCreateFinish = true; + if (null != instance.getWXPerformance()){ instance.getWXPerformance().callCreateFinishTime = System.currentTimeMillis()-instance.getWXPerformance().renderTimeOrigin; }
[incubator-weex] branch master updated: [Android] Change license rule in build.gradle (#2690)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 674f95f [Android] Change license rule in build.gradle (#2690) 674f95f is described below commit 674f95fc23b81dc7470a69e7402db19f3dc9668c Author: YorkShen AuthorDate: Thu Jul 11 21:46:13 2019 +0800 [Android] Change license rule in build.gradle (#2690) --- android/sdk/build.gradle | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/android/sdk/build.gradle b/android/sdk/build.gradle index b3c7201..b034eb3 100755 --- a/android/sdk/build.gradle +++ b/android/sdk/build.gradle @@ -242,10 +242,11 @@ if(file('../license/LICENSE').exists()){ task weex_core_license(type: com.hierynomus.gradle.license.tasks.LicenseFormat){ source = fileTree(dir:"../../weex_core").include(['**/*.h','**/*.cpp', '**/*.cc', '**/*.c']). exclude(['Source/rapidjson/**/*.h','Source/rapidjson/**/*.cpp', - 'Source/android/base/base64/**/*.h','Source/android/base/base64/**/*.cpp', 'Source/android/jniprebuild/jniheader/*.h', 'Source/base/Compatible.cpp', 'Source/IPC/**/*.h','Source/IPC/**/*.cpp', 'Source/IPC/**/*.c', + 'Source/base/base64/modp_base64/**/*.h', + 'Source/base/base64/modp_base64/**/*.cc', 'Source/base/third_party/icu/*.h', 'Source/base/third_party/icu/*.cpp', 'Source/android/jsengine/dependence/**/*.h',
[incubator-weex] branch master updated: Fix crash of accessing apm stage data not in component thread. (#2678)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 56444e0 Fix crash of accessing apm stage data not in component thread. (#2678) 56444e0 is described below commit 56444e0c10b3f229b41863d3d30efc0eba4676f0 Author: wqyfavor AuthorDate: Thu Jul 11 10:25:17 2019 +0800 Fix crash of accessing apm stage data not in component thread. (#2678) --- ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.m | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.m b/ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.m index 2e3d1a9..a86d226 100644 --- a/ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.m +++ b/ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.m @@ -294,12 +294,14 @@ NSString* const VALUE_ERROR_CODE_DEFAULT = @"0"; [self.apmProtocolInstance onEnd]; } -WXLogInfo(@"apm data: %@", self.recordStageMap); -NSNumber* stageRenderOrigin = self.recordStageMap[KEY_PAGE_STAGES_RENDER_ORGIGIN]; -NSNumber* stageInteraction = self.recordStageMap[KEY_PAGE_STAGES_INTERACTION]; -if (stageRenderOrigin && stageInteraction) { -WXLogInfo(@"apm interaction time(ms): %lld", [stageInteraction longLongValue] - [stageRenderOrigin longLongValue]); -} +WXPerformBlockOnComponentThread(^{ +WXLogInfo(@"APM data of instance: %@, %@", self.instanceId, self.recordStageMap); +NSNumber* stageRenderOrigin = self.recordStageMap[KEY_PAGE_STAGES_RENDER_ORGIGIN]; +NSNumber* stageInteraction = self.recordStageMap[KEY_PAGE_STAGES_INTERACTION]; +if (stageRenderOrigin && stageInteraction) { +WXLogInfo(@"APM interaction time(ms): %lld", [stageInteraction longLongValue] - [stageRenderOrigin longLongValue]); +} +}); } - (void) updateFSDiffStats:(NSString *)name withDiffValue:(double)diff
[incubator-weex] branch master updated: Add render time origin fix. Fix issue that interaction time calculated by heron is much different with platform. (#2666)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 354c15d Add render time origin fix. Fix issue that interaction time calculated by heron is much different with platform. (#2666) 354c15d is described below commit 354c15de6f7d28e59cf369bd3c7df9f9ea209d08 Author: wqyfavor AuthorDate: Wed Jul 10 16:05:05 2019 +0800 Add render time origin fix. Fix issue that interaction time calculated by heron is much different with platform. (#2666) --- ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m | 14 ++ ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.h | 2 +- ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.m | 9 ++--- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m index b01c263..cb46690 100644 --- a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m +++ b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m @@ -396,9 +396,12 @@ typedef enum : NSUInteger { } self.performance.renderTimeOrigin = CACurrentMediaTime()*1000; -[WXCoreBridge setPageArgument:_instanceId key:@"renderTimeOrigin" value:[NSString stringWithFormat:@"%lld", (long long)([[NSDate date] timeIntervalSince1970] * 1000)]]; self.performance.renderUnixTimeOrigin = [WXUtility getUnixFixTimeMillis]; -[self.apmInstance onStage:KEY_PAGE_STAGES_RENDER_ORGIGIN]; +long renderOriginTimePlatform = [self.apmInstance onStage:KEY_PAGE_STAGES_RENDER_ORGIGIN]; + +// pass render origin time to page +[WXCoreBridge setPageArgument:_instanceId key:@"renderTimeOrigin" value:[NSString stringWithFormat:@"%lld", (long long)([[NSDate date] timeIntervalSince1970] * 1000)]]; +[WXCoreBridge setPageArgument:_instanceId key:@"renderTimeOriginPlatform" value:[NSString stringWithFormat:@"%lld", (long long)renderOriginTimePlatform]]; if (![WXUtility isBlankString:self.pageName]) { WXLog(@"Start rendering page:%@", self.pageName); @@ -479,9 +482,12 @@ typedef enum : NSUInteger { } self.performance.renderTimeOrigin = CACurrentMediaTime()*1000; -[WXCoreBridge setPageArgument:_instanceId key:@"renderTimeOrigin" value:[NSString stringWithFormat:@"%lld", (long long)([[NSDate date] timeIntervalSince1970] * 1000)]]; self.performance.renderUnixTimeOrigin = [WXUtility getUnixFixTimeMillis]; -[self.apmInstance onStage:KEY_PAGE_STAGES_RENDER_ORGIGIN]; +long renderOriginTimePlatform = [self.apmInstance onStage:KEY_PAGE_STAGES_RENDER_ORGIGIN]; + +// pass render origin time to page +[WXCoreBridge setPageArgument:_instanceId key:@"renderTimeOrigin" value:[NSString stringWithFormat:@"%lld", (long long)([[NSDate date] timeIntervalSince1970] * 1000)]]; +[WXCoreBridge setPageArgument:_instanceId key:@"renderTimeOriginPlatform" value:[NSString stringWithFormat:@"%lld", (long long)renderOriginTimePlatform]]; if (![WXUtility isBlankString:self.pageName]) { WXLog(@"Start rendering page:%@", self.pageName); diff --git a/ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.h b/ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.h index 1e254dd..d6f3d45 100644 --- a/ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.h +++ b/ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.h @@ -119,7 +119,7 @@ extern NSString* const VALUE_ERROR_CODE_DEFAULT; #pragma mark - basic method - (void) onEvent:(NSString *)name withValue:(id)value; -- (void) onStage:(NSString *)name; +- (long) onStage:(NSString *)name; - (void) onStageWithTime:(NSString*)name time:(long)unixTime; - (void) setProperty:(NSString *)name withValue:(id)value; - (void) setStatistic:(NSString *)name withValue:(double)value; diff --git a/ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.m b/ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.m index 85946c7..2e3d1a9 100644 --- a/ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.m +++ b/ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.m @@ -160,12 +160,15 @@ NSString* const VALUE_ERROR_CODE_DEFAULT = @"0"; [self.apmProtocolInstance onEvent:name withValue:value]; } -- (void) onStage:(NSString *)name +- (long) onStage:(NSString *)name { if(_isEnd){ -return; +return 0; } -[self onStageWithTime:name time:[WXUtility getUnixFixTimeMillis]]; + +long result = [WXUtility getUnixFixTimeMillis]; +[self onStageWithTime:name time:result]; +return result; } - (void) onStageWithTime:(NSString*)name time:(long)unixTime
[incubator-weex] branch master updated: [Android] Fix potential NPE (#2662)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 159ccdc [Android] Fix potential NPE (#2662) 159ccdc is described below commit 159ccdc2f80baea89c559d547b857dacf2203000 Author: YorkShen AuthorDate: Tue Jul 9 18:17:41 2019 +0800 [Android] Fix potential NPE (#2662) --- .../main/java/com/taobao/weex/ui/view/WXHorizontalScrollView.java | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/view/WXHorizontalScrollView.java b/android/sdk/src/main/java/com/taobao/weex/ui/view/WXHorizontalScrollView.java index 7c17d33..9f4cdde 100644 --- a/android/sdk/src/main/java/com/taobao/weex/ui/view/WXHorizontalScrollView.java +++ b/android/sdk/src/main/java/com/taobao/weex/ui/view/WXHorizontalScrollView.java @@ -24,12 +24,10 @@ import android.util.AttributeSet; import android.view.MotionEvent; import android.view.View; import android.widget.HorizontalScrollView; - import com.taobao.weex.ui.view.gesture.WXGesture; import com.taobao.weex.ui.view.gesture.WXGestureObservable; - -import java.util.ArrayList; import java.util.List; +import java.util.concurrent.CopyOnWriteArrayList; public class WXHorizontalScrollView extends HorizontalScrollView implements IWXScroller, WXGestureObservable { @@ -77,7 +75,7 @@ public class WXHorizontalScrollView extends HorizontalScrollView implements IWXS public void addScrollViewListener(ScrollViewListener scrollViewListener) { if (mScrollViewListeners == null) { - mScrollViewListeners = new ArrayList<>(); + mScrollViewListeners = new CopyOnWriteArrayList<>(); } if (!mScrollViewListeners.contains(scrollViewListener)) { mScrollViewListeners.add(scrollViewListener);
[incubator-weex] branch master updated: [Android] Fix potential NPE (#2663)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 ce01b5b [Android] Fix potential NPE (#2663) ce01b5b is described below commit ce01b5b95f0ab5db74181eb75a5cf2805bfca176 Author: YorkShen AuthorDate: Tue Jul 9 18:14:04 2019 +0800 [Android] Fix potential NPE (#2663) --- android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java index f897433..49880c0 100644 --- a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java +++ b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java @@ -18,7 +18,6 @@ */ package com.taobao.weex; -import static com.taobao.weex.common.WXErrorCode.WX_ERR_JSC_CRASH; import static com.taobao.weex.common.WXErrorCode.WX_ERR_RELOAD_PAGE; import static com.taobao.weex.http.WXHttpUtil.KEY_USER_AGENT; @@ -72,9 +71,9 @@ import com.taobao.weex.http.WXHttpUtil; import com.taobao.weex.instance.InstanceOnFireEventInterceptor; import com.taobao.weex.layout.ContentBoxMeasurement; import com.taobao.weex.performance.WXInstanceApm; -import com.taobao.weex.render.WXAbstractRenderContainer; import com.taobao.weex.performance.WXStateRecord; import com.taobao.weex.performance.WhiteScreenUtils; +import com.taobao.weex.render.WXAbstractRenderContainer; import com.taobao.weex.tracing.WXTracing; import com.taobao.weex.ui.action.GraphicActionAddElement; import com.taobao.weex.ui.component.NestedContainer; @@ -92,7 +91,6 @@ import com.taobao.weex.utils.WXReflectionUtils; import com.taobao.weex.utils.WXUtils; import com.taobao.weex.utils.WXViewUtils; import com.taobao.weex.utils.cache.RegisterCache; - import java.io.Serializable; import java.lang.ref.WeakReference; import java.util.ArrayList; @@ -1351,7 +1349,11 @@ public class WXSDKInstance implements IWXActivityStateListener,View.OnLayoutChan if (null != mContext){ mContext.sendBroadcast(intent); }else { -WXEnvironment.getApplication().sendBroadcast(intent); +try { + WXEnvironment.getApplication().sendBroadcast(intent); +} catch (Exception e){ + WXLogUtils.e("weex",e); +} } this.mCurrentGround = true; }
[incubator-weex] branch master updated: Update TravisCI (#2634)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 fdec2ee Update TravisCI (#2634) fdec2ee is described below commit fdec2eeaefa9bfca4e46533049f1507a0b1ab9be Author: YorkShen AuthorDate: Fri Jul 5 14:55:19 2019 +0800 Update TravisCI (#2634) * Update travisCI * Update travisCI * Update travisCI of Android * Update travisCI for performance. * Update travisCI * Update danger * Speed up travisCI * Update travis * Update travis * Update travis * Update Log * Update switch case * Update android * Update gradle * Update travisCI * Update travisCI for good * Update travis * Update travis * Add repository back * Update for android * Update travis * Remove tools * Remove platform tools * Remove google repo * Add google back for travisCI * Update build.gradle * Update test * Update travis * Add ruby for good * Update travis * Update travis * Update travis * Update for travis * Remove unrelated import * Update Travsi * Update travis * Remove rvm * Update danger for good. --- .travis.yml | 125 --- android/build.gradle | 5 -- android/sdk/build.gradle | 12 - dangerfile-android.js| 31 +++- 4 files changed, 94 insertions(+), 79 deletions(-) diff --git a/.travis.yml b/.travis.yml index de89b2b..a6c8505 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,27 +1,35 @@ +os: linux language: node_js node_js: 7.6 -rvm: 2.0.0 matrix: fast_finish: true include: - - os: linux -env: TEST_SUITE=android + - env: TEST_SUITE=danger + - env: TEST_SUITE=jsfm + - env: TEST_SUITE=android ABI=armeabi-v7a +language: android +dist: trusty jdk: oraclejdk8 +android: + components: +- android-26 +- extra-android-m2repository + - env: TEST_SUITE=android ABI=arm64-v8a language: android dist: trusty +jdk: oraclejdk8 +android: + components: +- android-26 +- extra-android-m2repository + - env: TEST_SUITE=android ABI=x86 +language: android +dist: trusty +jdk: oraclejdk8 android: components: -- platform-tools -- tools -- build-tools-26.0.3 - android-26 -- extra-google-m2repository - extra-android-m2repository -- sys-img-x86-android-26 - - os: linux -env: TEST_SUITE=jsfm - - os: osx -env: TEST_SUITE=danger cache: directories: - npm @@ -34,47 +42,64 @@ before_cache: - rm -fr $HOME/.gradle/caches/*/plugin-resolution/ install: - | -if [[ $TEST_SUITE = "android" ]]; then - curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash - nvm install 7.0 - npm install - echo y | sdkmanager "cmake;3.6.4111459" - if find "${HOME}/android-ndk-r18b" -mindepth 1 | read; then -echo "dir not empty" - else -echo "dir empty" -rmdir "${HOME}/android-ndk-r18b" - fi +case $TEST_SUITE in + "android") +curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash +nvm install 7.6 +npm install +echo y | sdkmanager "cmake;3.6.4111459" +if find "${HOME}/android-ndk-r18b" -mindepth 1 | read; then + echo "NDK cache hit" +else + echo "NDK cache missed" + rmdir "${HOME}/android-ndk-r18b" +fi - if [[ ! -d "${HOME}/android-ndk-r18b" ]]; then -wget https://dl.google.com/android/repository/android-ndk-r18b-linux-x86_64.zip -unzip android-ndk-r18b-linux-x86_64.zip -d $HOME - fi - export ANDROID_NDK_HOME=$HOME/android-ndk-r18b - export PATH=$PATH:$ANDROID_NDK_HOME - echo "ndk.dir=$ANDROID_NDK_HOME" > android/local.properties -fi - - | -if [[ $TEST_SUITE = "jsfm" ]]; then - npm install -fi - - | -if [[ $TEST_SUITE = "danger" ]]; then - npm install -fi +if [[ ! -d "${HOME}/android-ndk-r18b" ]]; then + wget https://dl.google.com/android/repository/android-ndk-r18b-linux-x86_64.zip + unzip android-ndk-r18b-linux-x86_64.zip -d $HOME +
[incubator-weex] branch release/0.26 updated: [Android] update jsfm to 0.27
This is an automated email from the ASF dual-hosted git repository. luckychen pushed a commit to branch release/0.26 in repository https://gitbox.apache.org/repos/asf/incubator-weex.git The following commit(s) were added to refs/heads/release/0.26 by this push: new ebb943a [Android] update jsfm to 0.27 ebb943a is described below commit ebb943a162aa9775497df778e6396e446845d78e Author: zhongcang AuthorDate: Thu Jul 4 18:02:11 2019 +0800 [Android] update jsfm to 0.27 [Android] add data record [Android] add build script for build runtime-jss.so --- android/sdk/build_jss_r.sh | 24 ++ .../com/taobao/weex/performance/WXInstanceApm.java | 1 + .../com/taobao/weex/utils/WXExceptionUtils.java| 7 --- pre-build/weex-main-jsfm.js| 4 ++-- 4 files changed, 31 insertions(+), 5 deletions(-) diff --git a/android/sdk/build_jss_r.sh b/android/sdk/build_jss_r.sh new file mode 100755 index 000..7334cd3 --- /dev/null +++ b/android/sdk/build_jss_r.sh @@ -0,0 +1,24 @@ +echo "--> # buils jsc_runtime so" + + +../gradlew assembleRelease -PbuildRuntimeApi=true + + +echo "--> ## cp jss_runtime so" + +unzip -o build/outputs/aar/weex_sdk-release.aar -d build/outputs/aar/weex_sdk-release + + +cp build/outputs/aar/weex_sdk-release/jni/armeabi-v7a/libweexjss.so libs/armeabi-v7a/libweexjssr.so +cp build/outputs/aar/weex_sdk-release/jni/arm64-v8a/libweexjss.so libs/arm64-v8a/libweexjssr.so +cp build/outputs/aar/weex_sdk-release/jni/x86/libweexjss.so libs/x86/libweexjssr.so + + +echo "--> ## cp jss_runtime Symbol so" + +rm -rf unstrippedSo +mkdir unstrippedSo + +cp build/unstrippedSo/armeabi-v7a_libweexjss.so unstrippedSo/armeabi-v7a_libweexjssr.so +cp build/unstrippedSo/arm64-v8a_libweexjss.so unstrippedSo/arm64-v8a_libweexjssr.so +cp build/unstrippedSo/x86_libweexjss.so unstrippedSo/x86_libweexjssr.so \ No newline at end of file diff --git a/android/sdk/src/main/java/com/taobao/weex/performance/WXInstanceApm.java b/android/sdk/src/main/java/com/taobao/weex/performance/WXInstanceApm.java index 860eeb2..e17adef 100644 --- a/android/sdk/src/main/java/com/taobao/weex/performance/WXInstanceApm.java +++ b/android/sdk/src/main/java/com/taobao/weex/performance/WXInstanceApm.java @@ -315,6 +315,7 @@ public class WXInstanceApm { addProperty(KEY_PROPERTIES_ERROR_CODE, VALUE_ERROR_CODE_DEFAULT); addProperty(KEY_PAGE_PROPERTIES_JSLIB_VERSION, WXEnvironment.JS_LIB_SDK_VERSION); addProperty(KEY_PAGE_PROPERTIES_WEEX_VERSION, WXEnvironment.WXSDK_VERSION); +addProperty("wxUseRuntimeApi",WXEnvironment.sUseRunTimeApi); if (instance != null && (instance.getRenderStrategy() == WXRenderStrategy.DATA_RENDER || instance.getRenderStrategy() == WXRenderStrategy.DATA_RENDER_BINARY)) { addProperty(KEY_PAGE_PROPERTIES_RENDER_TYPE, WXEnvironment.EAGLE); diff --git a/android/sdk/src/main/java/com/taobao/weex/utils/WXExceptionUtils.java b/android/sdk/src/main/java/com/taobao/weex/utils/WXExceptionUtils.java index 70acf60..5581ad9 100644 --- a/android/sdk/src/main/java/com/taobao/weex/utils/WXExceptionUtils.java +++ b/android/sdk/src/main/java/com/taobao/weex/utils/WXExceptionUtils.java @@ -155,10 +155,11 @@ public class WXExceptionUtils { Map commitMap = extParams; if (null == commitMap){ commitMap = new HashMap<>(); -commitMap.put("wxSdkInitStartTime", String.valueOf(WXEnvironment.sSDKInitStart)); -commitMap.put("wxSDKInitCostTime", String.valueOf(WXEnvironment.sSDKInitTime)); -commitMap.put("wxSDKCurExceptionTime", String.valueOf(System.currentTimeMillis())); } +commitMap.put("wxSdkInitStartTime", String.valueOf(WXEnvironment.sSDKInitStart)); +commitMap.put("wxSDKInitCostTime", String.valueOf(WXEnvironment.sSDKInitTime)); +commitMap.put("wxSDKCurExceptionTime", String.valueOf(System.currentTimeMillis())); + commitMap.put("wxUseRuntimeApi",String.valueOf(WXEnvironment.sUseRunTimeApi)); if (!TextUtils.isEmpty(instanceId)) { instanceIdCommit = instanceId; instance = WXSDKManager.getInstance().getAllInstanceMap().get(instanceId); diff --git a/pre-build/weex-main-jsfm.js b/pre-build/weex-main-jsfm.js index c6b4dc1..ddceb30 100644 --- a/pre-build/weex-main-jsfm.js +++ b/pre-build/weex-main-jsfm.js @@ -1,2 +1,2 @@ -(this.nativeLog||function(e){console.log(e)})("Start JS Framework 0.29.6, Build at 2019-04-08 17:04. (Vue: 2.5.16-weex.5, Rax: 0.4.20)");var global=this,process={env:{}},setTimeout=global.setTimeout;!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t():"function"==typeof define&?define(t):t()}(0,f
[incubator-weex] branch master updated: [Android] Supply message for version check tool failure. (#2649)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 d8bbe74 [Android] Supply message for version check tool failure. (#2649) d8bbe74 is described below commit d8bbe7453e0f0ffd3a4c21e5141112cf5eff56f2 Author: YorkShen AuthorDate: Thu Jul 4 11:41:24 2019 +0800 [Android] Supply message for version check tool failure. (#2649) * [Android] Supply message for version check tool failure. * Add google repo for Travis purpose --- android/build.gradle | 6 +++--- android/sdk/build.gradle | 14 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 23a83f1..626b343 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,7 +1,7 @@ buildscript { repositories { -mavenLocal() +google() maven(){ url 'https://maven.aliyun.com/repository/google' } @@ -26,12 +26,12 @@ subprojects { } } repositories { -mavenLocal() if(project.hasProperty('external_repositories')){ maven { url external_repositories } } +google() maven(){ url 'https://maven.aliyun.com/repository/google' } @@ -45,7 +45,7 @@ subprojects { classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' } repositories { -mavenLocal() +google() maven(){ url 'https://maven.aliyun.com/repository/google' } diff --git a/android/sdk/build.gradle b/android/sdk/build.gradle index ba80f68..cce843a 100755 --- a/android/sdk/build.gradle +++ b/android/sdk/build.gradle @@ -51,21 +51,21 @@ version = project.hasProperty('weexVersion') ? project.getProperty('weexVersion' //Check version, the version must have 4 sections. The leading three section must be number, and the last section is odd number with or without suffix string. if (!project.hasProperty('ignoreVersionCheck') || !project.getProperty('ignoreVersionCheck').equals("true")) { -assert version.tokenize('.').eachWithIndex { it, i -> +version.tokenize('.').eachWithIndex { it, i -> if (i < 3) { -assert it.isNumber() +assert it.isNumber() : "Please use semantic versioning witch 4 sections, you are using ${$ { i } + 1} section instead." } else if (i == 3) { -it.split("-|_").toList().eachWithIndex { inner_it, inner_i -> +it.split("[-_]").toList().eachWithIndex { inner_it, inner_i -> if (inner_i == 0) { -assert inner_it.isNumber() && inner_it.toInteger() % 2 +assert inner_it.isNumber() && inner_it.toInteger() % 2 : "The 4th dight in the versioning number must be a odd number, and it is ${inner_it} currently." } else { -assert !inner_it.isNumber() +assert !inner_it.isNumber() : "The suffix of the versioning number is not allowed to contain any number, and it is ${inner_it} currently." } }.size == 4 } else { -assert false: "Please use semantic versioning witch 4 sections, you are using ${$ { i } + 1} section instead" +assert false: "Please use semantic versioning witch 4 sections, you are using ${$ { i } + 1} section instead." } -}.size == 4 +} } android {
[incubator-weex] branch release/0.26 updated: [Android] update jsc.so
This is an automated email from the ASF dual-hosted git repository. luckychen pushed a commit to branch release/0.26 in repository https://gitbox.apache.org/repos/asf/incubator-weex.git The following commit(s) were added to refs/heads/release/0.26 by this push: new 8cfb154 [Android] update jsc.so 8cfb154 is described below commit 8cfb154e88d255d765643db70861b0e66c77a94b Author: zhongcang AuthorDate: Thu Jul 4 11:19:47 2019 +0800 [Android] update jsc.so --- android/sdk/build.gradle | 2 +- android/sdk/libs/arm64-v8a/libJavaScriptCore.so| Bin 9278912 -> 9258456 bytes android/sdk/libs/armeabi-v7a/libJavaScriptCore.so | Bin 5237568 -> 5237568 bytes android/sdk/libs/x86/libJavaScriptCore.so | Bin 12134672 -> 12134688 bytes .../com/taobao/weex/utils/WXSoInstallMgrSdk.java | 22 ++--- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/android/sdk/build.gradle b/android/sdk/build.gradle index 9d18ecc..7a437a7 100755 --- a/android/sdk/build.gradle +++ b/android/sdk/build.gradle @@ -117,7 +117,7 @@ android { def android_project_dir = projectDir -def buildRuntimeApi = project.hasProperty('buildRuntimeApi') ? project.property('buildRuntimeApi') : false; +def buildRuntimeApi = project.hasProperty('buildRuntimeApi') ? project.property('buildRuntimeApi') : true defaultConfig { buildConfigField "String", "buildJavascriptFrameworkVersion", "\"${jsfmVersion}\"" diff --git a/android/sdk/libs/arm64-v8a/libJavaScriptCore.so b/android/sdk/libs/arm64-v8a/libJavaScriptCore.so index 56307f0..7f33280 100755 Binary files a/android/sdk/libs/arm64-v8a/libJavaScriptCore.so and b/android/sdk/libs/arm64-v8a/libJavaScriptCore.so differ diff --git a/android/sdk/libs/armeabi-v7a/libJavaScriptCore.so b/android/sdk/libs/armeabi-v7a/libJavaScriptCore.so index 3cc8a8a..d6b471c 100755 Binary files a/android/sdk/libs/armeabi-v7a/libJavaScriptCore.so and b/android/sdk/libs/armeabi-v7a/libJavaScriptCore.so differ diff --git a/android/sdk/libs/x86/libJavaScriptCore.so b/android/sdk/libs/x86/libJavaScriptCore.so index e41d979..3cdfd01 100755 Binary files a/android/sdk/libs/x86/libJavaScriptCore.so and b/android/sdk/libs/x86/libJavaScriptCore.so differ diff --git a/android/sdk/src/main/java/com/taobao/weex/utils/WXSoInstallMgrSdk.java b/android/sdk/src/main/java/com/taobao/weex/utils/WXSoInstallMgrSdk.java index 3ca91db..d00293d 100644 --- a/android/sdk/src/main/java/com/taobao/weex/utils/WXSoInstallMgrSdk.java +++ b/android/sdk/src/main/java/com/taobao/weex/utils/WXSoInstallMgrSdk.java @@ -131,17 +131,17 @@ public class WXSoInstallMgrSdk { //if (checkSoIsValid(libName, BuildConfig.ARMEABI_Size) ||checkSoIsValid(libName, BuildConfig.X86_Size)) { -try { - // If a library loader adapter exists, use this adapter to load library - // instead of System.loadLibrary. - if (mSoLoader != null) { -mSoLoader.doLoadLibrary("c++_shared"); - } else { -System.loadLibrary("c++_shared"); - } -} catch (Exception e) { - -} +//try { +// // If a library loader adapter exists, use this adapter to load library +// // instead of System.loadLibrary. +// if (mSoLoader != null) { +//mSoLoader.doLoadLibrary("c++_shared"); +// } else { +//System.loadLibrary("c++_shared"); +// } +//} catch (Exception e) { +// +//} /** * Load library with {@link System#loadLibrary(String)}
[incubator-weex] branch release/0.26 updated (d6dee7c -> 718dc0b)
This is an automated email from the ASF dual-hosted git repository. luckychen pushed a change to branch release/0.26 in repository https://gitbox.apache.org/repos/asf/incubator-weex.git. from d6dee7c [jsruntime] add runtime code (a/b) and build success new dcea494 Fix License issue for javaScriptCore (#2498) new 718dc0b Update license The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: LICENSE| 2210 ++-- android/sdk/build.gradle | 56 +- weex_core/Source/base/third_party/icu/icu_utf.cpp | 18 - weex_core/Source/base/third_party/icu/icu_utf.h| 18 - .../JavaScriptCore/API/APICallbackFunction.h | 37 +- .../Source/include/JavaScriptCore/API/APICast.h| 37 +- .../Source/include/JavaScriptCore/API/APIUtils.h | 37 +- .../JavaScriptCore/API/JSAPIWrapperObject.h| 37 +- .../Source/include/JavaScriptCore/API/JSBase.h | 37 +- .../include/JavaScriptCore/API/JSBasePrivate.h | 37 +- .../JavaScriptCore/API/JSCTestRunnerUtils.h| 37 +- .../JavaScriptCore/API/JSCallbackConstructor.h | 37 +- .../JavaScriptCore/API/JSCallbackFunction.h| 37 +- .../include/JavaScriptCore/API/JSCallbackObject.h | 38 +- .../JavaScriptCore/API/JSCallbackObjectFunctions.h | 38 +- .../Source/include/JavaScriptCore/API/JSClassRef.h | 37 +- .../Source/include/JavaScriptCore/API/JSContext.h | 37 +- .../include/JavaScriptCore/API/JSContextInternal.h | 37 +- .../include/JavaScriptCore/API/JSContextPrivate.h | 37 +- .../include/JavaScriptCore/API/JSContextRef.h | 37 +- .../API/JSContextRefInspectorSupport.h | 37 +- .../JavaScriptCore/API/JSContextRefInternal.h | 37 +- .../JavaScriptCore/API/JSContextRefPrivate.h | 37 +- .../Source/include/JavaScriptCore/API/JSExport.h | 37 +- .../include/JavaScriptCore/API/JSManagedValue.h| 37 +- .../JavaScriptCore/API/JSManagedValueInternal.h| 37 +- .../include/JavaScriptCore/API/JSObjectRef.h | 38 +- .../JavaScriptCore/API/JSObjectRefPrivate.h| 37 +- .../include/JavaScriptCore/API/JSRemoteInspector.h | 37 +- .../include/JavaScriptCore/API/JSRetainPtr.h | 40 +- .../JavaScriptCore/API/JSScriptRefPrivate.h| 37 +- .../include/JavaScriptCore/API/JSStringRef.h | 37 +- .../include/JavaScriptCore/API/JSStringRefBSTR.h | 40 +- .../include/JavaScriptCore/API/JSStringRefCF.h | 37 +- .../JavaScriptCore/API/JSStringRefPrivate.h| 37 +- .../include/JavaScriptCore/API/JSTypedArray.h | 38 +- .../Source/include/JavaScriptCore/API/JSValue.h| 37 +- .../include/JavaScriptCore/API/JSValueInternal.h | 37 +- .../Source/include/JavaScriptCore/API/JSValueRef.h | 37 +- .../include/JavaScriptCore/API/JSVirtualMachine.h | 37 +- .../JavaScriptCore/API/JSVirtualMachineInternal.h | 37 +- .../API/JSWeakObjectMapRefInternal.h | 37 +- .../JavaScriptCore/API/JSWeakObjectMapRefPrivate.h | 37 +- .../include/JavaScriptCore/API/JSWrapperMap.h | 37 +- .../Source/include/JavaScriptCore/API/JavaScript.h | 38 +- .../include/JavaScriptCore/API/JavaScriptCore.h| 37 +- .../JavaScriptCore/API/ObjCCallbackFunction.h | 36 +- .../include/JavaScriptCore/API/ObjcRuntimeExtras.h | 37 +- .../include/JavaScriptCore/API/OpaqueJSString.h| 37 +- .../JavaScriptCore/API/WebKitAvailability.h| 37 +- .../ForwardingHeaders/JavaScriptCore/APICast.h | 18 - .../ForwardingHeaders/JavaScriptCore/JSBase.h | 18 - .../JavaScriptCore/JSCTestRunnerUtils.h| 18 - .../JavaScriptCore/JSContextRef.h | 18 - .../ForwardingHeaders/JavaScriptCore/JSObjectRef.h | 18 - .../JavaScriptCore/JSObjectRefPrivate.h| 18 - .../ForwardingHeaders/JavaScriptCore/JSRetainPtr.h | 18 - .../ForwardingHeaders/JavaScriptCore/JSStringRef.h | 18 - .../JavaScriptCore/JSStringRefCF.h | 18 - .../JavaScriptCore/JSTypedArray.h | 18 - .../ForwardingHeaders/JavaScriptCore/JSValueRef.h | 18 - .../ForwardingHeaders/JavaScriptCore/JavaScript.h | 18 - .../JavaScriptCore/JavaScriptCore.h| 18 - .../JavaScriptCore/OpaqueJSString.h| 18 - .../JavaScriptCore/WebKitAvailability.h| 18 - .../JavaScriptCore/assembler/ARM64Assembler.h | 37 +- .../JavaScriptCore/assembler/ARMAssembler.h| 39 +- .../JavaScriptCore/assembler/ARMv7Assembler.h | 38 +- .../include/JavaScriptCore/assembler/AbortReason.h | 37 +- .../assembler/AbstractMacroAssembler.h | 37 +- .../assembler/AllowMacroSc
[incubator-weex] 02/02: Update license
This is an automated email from the ASF dual-hosted git repository. luckychen pushed a commit to branch release/0.26 in repository https://gitbox.apache.org/repos/asf/incubator-weex.git commit 718dc0b8dc03785e8e2ca652fa428e89b94ff287 Author: YorkShen AuthorDate: Wed Jun 5 15:18:33 2019 +0800 Update license --- LICENSE| 2210 ++-- android/sdk/build.gradle |2 + weex_core/Source/base/third_party/icu/icu_utf.cpp | 18 - weex_core/Source/base/third_party/icu/icu_utf.h| 18 - .../Source/include/wtf/icu/unicode/bytestream.h| 18 - .../Source/include/wtf/icu/unicode/localpointer.h | 18 - .../Source/include/wtf/icu/unicode/parseerr.h | 18 - .../Source/include/wtf/icu/unicode/platform.h | 18 - weex_core/Source/include/wtf/icu/unicode/ptypes.h | 18 - weex_core/Source/include/wtf/icu/unicode/putil.h | 18 - weex_core/Source/include/wtf/icu/unicode/rep.h | 18 - .../Source/include/wtf/icu/unicode/std_string.h| 18 - weex_core/Source/include/wtf/icu/unicode/strenum.h | 18 - .../Source/include/wtf/icu/unicode/stringpiece.h | 18 - weex_core/Source/include/wtf/icu/unicode/ubrk.h| 18 - weex_core/Source/include/wtf/icu/unicode/uchar.h | 18 - weex_core/Source/include/wtf/icu/unicode/ucnv.h| 18 - .../Source/include/wtf/icu/unicode/ucnv_err.h | 18 - weex_core/Source/include/wtf/icu/unicode/ucol.h| 18 - weex_core/Source/include/wtf/icu/unicode/uconfig.h | 18 - weex_core/Source/include/wtf/icu/unicode/ucurr.h | 18 - weex_core/Source/include/wtf/icu/unicode/uenum.h | 18 - weex_core/Source/include/wtf/icu/unicode/uiter.h | 18 - weex_core/Source/include/wtf/icu/unicode/uloc.h| 18 - .../Source/include/wtf/icu/unicode/umachine.h | 18 - weex_core/Source/include/wtf/icu/unicode/unistr.h | 18 - weex_core/Source/include/wtf/icu/unicode/unorm.h | 18 - weex_core/Source/include/wtf/icu/unicode/unorm2.h | 18 - weex_core/Source/include/wtf/icu/unicode/uobject.h | 18 - weex_core/Source/include/wtf/icu/unicode/urename.h | 18 - weex_core/Source/include/wtf/icu/unicode/uscript.h | 26 +- weex_core/Source/include/wtf/icu/unicode/uset.h| 18 - weex_core/Source/include/wtf/icu/unicode/ustring.h | 18 - weex_core/Source/include/wtf/icu/unicode/utext.h | 18 - weex_core/Source/include/wtf/icu/unicode/utf.h | 18 - weex_core/Source/include/wtf/icu/unicode/utf16.h | 18 - weex_core/Source/include/wtf/icu/unicode/utf8.h| 18 - weex_core/Source/include/wtf/icu/unicode/utf_old.h | 18 - weex_core/Source/include/wtf/icu/unicode/utypes.h | 18 - weex_core/Source/include/wtf/icu/unicode/uvernum.h | 18 - .../Source/include/wtf/icu/unicode/uversion.h | 18 - 41 files changed, 2048 insertions(+), 874 deletions(-) diff --git a/LICENSE b/LICENSE index d404dba..4e776bc 100644 --- a/LICENSE +++ b/LICENSE @@ -287,180 +287,2040 @@ This product bundles chromium v66.0.3344.2, which is available under a "BSD-styl This product bundles Android Open Source Project vandroid-4.2.2_r1, which is available under a "BSD" license. For details, see https://android.googlesource.com/platform/bionic/+/android-4.2.2_r1/libc/README and following files: weex_core/Source/IPC/futex.h -This product bundles Webkit 2.17.4, which is available under a "BSD 2-clause" license. For details, reference https://webkit.org/licensing-webkit/ for license(Weex only uses the files under BSD license) and see https://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.17.4 for following files: - Files under: weex_core/Source/android/jsengine/dependence/ - OptionsCommon.cmake - OptionsJSCOnly.cmake - WeexCommon.cmake - WeexFS.cmake - WeexFeatures.cmake - WeexHelpers.cmake - WeexMacros.cmake - - Files under: weex_core/Source/android/jsengine/dependence/bmalloc - CMakeLists.txt - ChangeLog - Makefile - - Files under: weex_core/Source/android/jsengine/dependence/bmalloc/Configurations - Base.xcconfig - DebugRelease.xcconfig - bmalloc.xcconfig - mbmalloc.xcconfig - - Files under: weex_core/Source/android/jsengine/dependence/bmalloc/bmalloc - Algorithm.h - Allocator.cpp - Allocator.h - AsyncTask.h - AvailableMemory.cpp - AvailableMemory.h - BAssert.h - BPlatform.h - BumpAllocator.h - BumpRange.h - Cache.cpp - Cache.h - Chunk.h - Deallocator.cpp - Deallocator.h - DebugHeap.cpp - DebugHeap.h - Environment.cpp - Environment.h - FixedVector.h - Heap.cpp - Heap.h - Inline.h - LargeMap.cpp - LargeMap.h - LargeRange.h - LineMetadata.h - List.h - Logging.cpp - Logging.h - Map.h - Mutex.h - Object.h - ObjectType.cpp - ObjectT
[incubator-weex] branch release/0.26 updated (1f0f6d0 -> d6dee7c)
This is an automated email from the ASF dual-hosted git repository. luckychen pushed a change to branch release/0.26 in repository https://gitbox.apache.org/repos/asf/incubator-weex.git. discard 1f0f6d0 [jsruntime] add runtime code (a/b) and build success new d6dee7c [jsruntime] add runtime code (a/b) and build success This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (1f0f6d0) \ N -- N -- N refs/heads/release/0.26 (d6dee7c) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: android/playground/app/build.gradle | 3 +-- android/sdk/build.gradle| 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-)
[incubator-weex] branch master updated: Update TravisCI for android NDK (#2319)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 d23e29c Update TravisCI for android NDK (#2319) d23e29c is described below commit d23e29c0588d7ef1f15b7d2ff4cbb755d8d2fb4d Author: YorkShen AuthorDate: Mon Jul 1 11:29:17 2019 +0800 Update TravisCI for android NDK (#2319) * Update NDK for android travisCI * Update danger file * Update to ndk 16 * Update android_ndk_home environment. * Update local.properties * Update build.gradle * Update travis.yml * Update * Update * Update * Update travis.yml * update travisci * Update travis * Update travis.yml * Update git file * Update travis.yml to use NDK 20 * Update travisCI * Update build.gradle * Update travis * Change to NDK 18 * Update android home * Update ndk address * Update zip name * Update cache * Update shell * Remove empty dir. * Update RMdir * Speed up android build * Update build script. --- .travis.yml | 51 ++- dangerfile-android.js | 8 +++- 2 files changed, 33 insertions(+), 26 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0f9cfb6..de89b2b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,29 +1,14 @@ -os: - - osx - - linux language: node_js node_js: 7.6 rvm: 2.0.0 -env: - - TEST_SUITE=danger - - TEST_SUITE=jsfm - - TEST_SUITE=android matrix: fast_finish: true -exclude: - - os: osx -env: TEST_SUITE=danger - - os: osx -env: TEST_SUITE=jsfm - - os: osx -env: TEST_SUITE=android - - os: linux -env: TEST_SUITE=android include: - os: linux env: TEST_SUITE=android jdk: oraclejdk8 language: android +dist: trusty android: components: - platform-tools @@ -32,18 +17,42 @@ matrix: - android-26 - extra-google-m2repository - extra-android-m2repository -- sys-img-armeabi-v7a-android-22 +- sys-img-x86-android-26 + - os: linux +env: TEST_SUITE=jsfm + - os: osx +env: TEST_SUITE=danger cache: directories: - - node_modules - - $HOME/.m2 - - $HOME/.gradle -before_script: +- npm +- $HOME/.gradle/caches/ +- $HOME/.gradle/wrapper/ +- $HOME/.android/build-cache +- $HOME/android-ndk-r18b +before_cache: + - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock + - rm -fr $HOME/.gradle/caches/*/plugin-resolution/ +install: - | if [[ $TEST_SUITE = "android" ]]; then curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash nvm install 7.0 npm install + echo y | sdkmanager "cmake;3.6.4111459" + if find "${HOME}/android-ndk-r18b" -mindepth 1 | read; then +echo "dir not empty" + else +echo "dir empty" +rmdir "${HOME}/android-ndk-r18b" + fi + + if [[ ! -d "${HOME}/android-ndk-r18b" ]]; then +wget https://dl.google.com/android/repository/android-ndk-r18b-linux-x86_64.zip +unzip android-ndk-r18b-linux-x86_64.zip -d $HOME + fi + export ANDROID_NDK_HOME=$HOME/android-ndk-r18b + export PATH=$PATH:$ANDROID_NDK_HOME + echo "ndk.dir=$ANDROID_NDK_HOME" > android/local.properties fi - | if [[ $TEST_SUITE = "jsfm" ]]; then diff --git a/dangerfile-android.js b/dangerfile-android.js index ef2a29b..c218407 100644 --- a/dangerfile-android.js +++ b/dangerfile-android.js @@ -56,7 +56,7 @@ const getFileType = file => { function checkAndroidFile(file){ var type = getFileType(file); - return type == type_android_test || type == type_android_sdk || type == type_jsfm; + return true } var hasAndroidFile = false; @@ -92,10 +92,8 @@ console.log('-hasAndroidFile if(hasAndroidFile){ var runTryBuildCmd='source ~/.bash_profile; ' +'cd android; ' -+'./gradlew clean assembleDebug --info -PdisableCov=true ' -+'-Dorg.gradle.daemon=true -Dorg.gradle.parallel=true -Dorg.gradle.jvmargs="-Xmx512m ' -+'-XX:+HeapDumpOnOutOfMemoryError" -Dfile.encoding=UTF-8 ' - var runSuccess = shell.exec(runTryBuildCmd,{ async: false, timeout: 8 * 60 * 1000, maxBuffer: 200 * 1024 * 1024 }).code == 0; ++'./gradlew clean install --info' + var runSuccess = shell.exec(runTryBuildCmd,{ async: false, timeout: 60 * 60 * 1000, maxBuffer: 200 * 1024 * 1024 }).code == 0; if(!runSuccess){ fail("Failed to run assembleDebug task for android."); }
[incubator-weex] branch master updated: [iOS] add execute jsbundle time point (#2628)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 1960291 [iOS] add execute jsbundle time point (#2628) 1960291 is described below commit 19602910a3be9db821ebf15356703972846ae07c Author: jianhan-he <41508406+jianhan...@users.noreply.github.com> AuthorDate: Fri Jun 28 16:31:09 2019 +0800 [iOS] add execute jsbundle time point (#2628) --- ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m | 14 -- ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m | 1 + ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.h | 3 +++ ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.m | 3 +++ 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m b/ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m index 240eacc..f74b03c 100644 --- a/ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m +++ b/ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m @@ -427,8 +427,6 @@ _Pragma("clang diagnostic pop") \ [self.sendQueue setValue:sendQueue forKey:instanceIdString]; if (sdkInstance.dataRender && ![options[@"EXEC_JS"] boolValue]) { -WX_MONITOR_INSTANCE_PERF_START(WXFirstScreenJSFExecuteTime, [WXSDKManager instanceForID:instanceIdString]); -WX_MONITOR_INSTANCE_PERF_START(WXPTJSCreateInstance, [WXSDKManager instanceForID:instanceIdString]); if (_dataRenderHandler) { WXPerformBlockOnComponentThread(^{ [_dataRenderHandler createPage:instanceIdString template:jsBundleString options:options data:data]; @@ -444,8 +442,6 @@ _Pragma("clang diagnostic pop") \ }); } } -WX_MONITOR_INSTANCE_PERF_END(WXPTJSCreateInstance, [WXSDKManager instanceForID:instanceIdString]); -[sdkInstance.apmInstance onStage:KEY_PAGE_STAGES_LOAD_BUNDLE_END]; return; } @@ -476,6 +472,7 @@ _Pragma("clang diagnostic pop") \ } if ([WXDebugTool isDevToolDebug]) { [self callJSMethod:@"createInstanceContext" args:@[instanceIdString, newOptions, data?:@[],raxAPIScript?:@""]]; +[sdkInstance.apmInstance onStage:KEY_PAGE_STAGES_LOAD_BUNDLE_END]; if ([NSURL URLWithString:sdkInstance.pageName]) { [sdkInstance.instanceJavaScriptContext executeJavascript:jsBundleString withSourceURL:[NSURL URLWithString:sdkInstance.pageName]]; @@ -483,7 +480,7 @@ _Pragma("clang diagnostic pop") \ [sdkInstance.instanceJavaScriptContext executeJavascript:jsBundleString]; } WX_MONITOR_INSTANCE_PERF_END(WXPTJSCreateInstance, [WXSDKManager instanceForID:instanceIdString]); -[sdkInstance.apmInstance onStage:KEY_PAGE_STAGES_LOAD_BUNDLE_END]; +[sdkInstance.apmInstance onStage:KEY_PAGE_STAGES_EXECUTE_BUNDLE_END]; } else { sdkInstance.callCreateInstanceContext = [NSString stringWithFormat:@"instanceId:%@\noptions:%@\ndata:%@", instanceIdString, newOptions, data]; //add instanceId to weexContext ,if fucn createInstanceContext failure ,then we will know which instance has problem (exceptionhandler) @@ -547,6 +544,7 @@ _Pragma("clang diagnostic pop") \ [sdkInstance.instanceJavaScriptContext executeJavascript:jsBundleString]; } sdkInstance.instanceJavaScriptContext.javaScriptContext[@"wxExtFuncInfo"] = nil; +[sdkInstance.apmInstance onStage:KEY_PAGE_STAGES_EXECUTE_BUNDLE_END]; WX_MONITOR_INSTANCE_PERF_END(WXPTJSCreateInstance, [WXSDKManager instanceForID:instanceIdString]); }]; } @@ -567,7 +565,7 @@ _Pragma("clang diagnostic pop") \ sdkInstance.instanceJavaScriptContext.javaScriptContext[@"wxExtFuncInfo"] = funcInfo; [self callJSMethod:@"createInstance" args:args]; sdkInstance.instanceJavaScriptContext.javaScriptContext[@"wxExtFuncInfo"] = nil; - +[sdkInstance.apmInstance onStage:KEY_PAGE_STAGES_EXECUTE_BUNDLE_END]; WX_MONITOR_INSTANCE_PERF_END(WXPTJSCreateInstance, [WXSDKManager instanceForID:instanceIdString]); } } @@ -607,8 +605,6 @@ _Pragma("clang diagnostic pop") \ [self.sendQueue setValue:sendQueue forKey:instanceIdString]; if (sdkInstance.dataRender) { -WX_MONITOR_INSTANCE_PERF_START(WXFirstScreenJSFExecuteTime, [WXSDKManager instanceForID:instanceIdString]); -WX_MONITOR_INSTANCE_PERF_START(WXPTJSCreateInstance, [WXSDKManager instanceForID:instanceIdString]); if (_dataRenderHandler) { WXPerformBlockOnC
[incubator-weex] branch master updated: Update license format tool (#2617)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 e15d075 Update license format tool (#2617) e15d075 is described below commit e15d0753021495dd99bd633d02b3754e58945a75 Author: YorkShen AuthorDate: Wed Jun 26 15:29:52 2019 +0800 Update license format tool (#2617) --- android/sdk/build.gradle | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/android/sdk/build.gradle b/android/sdk/build.gradle index ca9722c..68336a7 100755 --- a/android/sdk/build.gradle +++ b/android/sdk/build.gradle @@ -233,11 +233,16 @@ dependencies { 'Source/android/jniprebuild/jniheader/*.h', 'Source/base/Compatible.cpp', 'Source/IPC/**/*.h','Source/IPC/**/*.cpp', 'Source/IPC/**/*.c', + 'Source/base/third_party/icu/*.h', + 'Source/base/third_party/icu/*.cpp', 'Source/android/jsengine/dependence/**/*.h', 'Source/android/jsengine/dependence/**/*.cpp', - 'Source/include/wtf/Optional.h', - 'Source/include/wtf/Brigand.h', - 'Source/include/wtf/Variant.h']) + 'Source/include/wtf/**/*.h', + 'Source/include/wtf/**/*.c', + 'Source/include/wtf/**/*.cpp', + 'Source/include/JavaScriptCore/**/*.h', + 'Source/include/JavaScriptCore/**/*.c', + 'Source/include/JavaScriptCore/**/*.cpp']) } preBuild.dependsOn licenseFormat }
[incubator-weex] branch master updated: [iOS] add option to ignore element time calculate (#2580)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 d20be41 [iOS] add option to ignore element time calculate (#2580) d20be41 is described below commit d20be41c9978e931d124bd3375b4a4f626f539a9 Author: jianhan-he <41508406+jianhan...@users.noreply.github.com> AuthorDate: Wed Jun 19 16:38:03 2019 +0800 [iOS] add option to ignore element time calculate (#2580) --- ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m | 2 -- ios/sdk/WeexSDK/Sources/Manager/WXComponentManager.mm | 11 ++- ios/sdk/WeexSDK/Sources/Model/WXComponent.mm | 1 - 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m b/ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m index 1e4fb54..c324794 100644 --- a/ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m +++ b/ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m @@ -567,8 +567,6 @@ _Pragma("clang diagnostic pop") \ sdkInstance.instanceJavaScriptContext.javaScriptContext[@"wxExtFuncInfo"] = funcInfo; [self callJSMethod:@"createInstance" args:args]; sdkInstance.instanceJavaScriptContext.javaScriptContext[@"wxExtFuncInfo"] = nil; - -[WXExceptionUtils commitCriticalExceptionRT:instanceIdString errCode:[NSString stringWithFormat:@"%d", WX_KEY_EXCEPTION_NO_BUNDLE_TYPE] function:@"createInstance" exception:@"Fatal Error : No bundle type in js bundle head, cause white screen or memory leak!!" extParams:nil]; WX_MONITOR_INSTANCE_PERF_END(WXPTJSCreateInstance, [WXSDKManager instanceForID:instanceIdString]); } diff --git a/ios/sdk/WeexSDK/Sources/Manager/WXComponentManager.mm b/ios/sdk/WeexSDK/Sources/Manager/WXComponentManager.mm index 451cc18..e02ea11 100644 --- a/ios/sdk/WeexSDK/Sources/Manager/WXComponentManager.mm +++ b/ios/sdk/WeexSDK/Sources/Manager/WXComponentManager.mm @@ -320,8 +320,17 @@ static NSThread *WXComponentThread; } if (supercomponent.ignoreInteraction) { component.ignoreInteraction = YES; +} else { +if ([[attributes objectForKey:@"ignoreInteraction"] boolValue]) { +component.ignoreInteraction = YES; +} else { +if (component->_positionType == WXPositionTypeFixed) { +component.ignoreInteraction = YES; +} else { +component.ignoreInteraction = NO; +} +} } -component.ignoreInteraction = [[attributes objectForKey:@"ignoreInteraction"] boolValue]; #ifdef DEBUG WXLogDebug(@"flexLayout -> _recursivelyAddComponent : super:(%@,%@):[%f,%f] ,child:(%@,%@):[%f,%f],childClass:%@", diff --git a/ios/sdk/WeexSDK/Sources/Model/WXComponent.mm b/ios/sdk/WeexSDK/Sources/Model/WXComponent.mm index 13720b9..d9c92db 100644 --- a/ios/sdk/WeexSDK/Sources/Model/WXComponent.mm +++ b/ios/sdk/WeexSDK/Sources/Model/WXComponent.mm @@ -604,7 +604,6 @@ static BOOL bNeedRemoveEvents = YES; pthread_mutex_unlock(&_propertyMutex); if (subcomponent->_positionType == WXPositionTypeFixed) { -subcomponent.ignoreInteraction = YES; [self.weexInstance.componentManager addFixedComponent:subcomponent]; }
[incubator-weex] branch master updated: Update gradle-wrapper. (#2571)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 c86b48a Update gradle-wrapper. (#2571) c86b48a is described below commit c86b48af80c6f2fba1ca9ede28eaff87f43daa01 Author: YorkShen AuthorDate: Tue Jun 18 20:55:48 2019 +0800 Update gradle-wrapper. (#2571) --- android/gradle/wrapper/gradle-wrapper.properties | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 5c1b6c9..69927bd 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ +#Tue Jun 18 20:43:32 CST 2019 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
[incubator-weex] branch master updated: Add universal error code. (#2533)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 74ea092 Add universal error code. (#2533) 74ea092 is described below commit 74ea09232edfd7db4b276871f11ef4ce6eb4ed77 Author: wqyfavor AuthorDate: Wed Jun 12 13:41:09 2019 +0800 Add universal error code. (#2533) --- ios/sdk/WeexSDK/Sources/Engine/WXSDKError.h | 20 ios/sdk/WeexSDK/Sources/Engine/WXSDKError.m | 28 +++- 2 files changed, 39 insertions(+), 9 deletions(-) diff --git a/ios/sdk/WeexSDK/Sources/Engine/WXSDKError.h b/ios/sdk/WeexSDK/Sources/Engine/WXSDKError.h index 0909ab6..ecb7f0c 100644 --- a/ios/sdk/WeexSDK/Sources/Engine/WXSDKError.h +++ b/ios/sdk/WeexSDK/Sources/Engine/WXSDKError.h @@ -30,9 +30,26 @@ #define WX_ERROR_TYPE_RENDER@"RENDER_ERROR" #define WX_ERROR_TYPE_DOWNLOAD @"DOWN_LOAD_ERROR" +typedef NS_ENUM(int, WXSDKUniversalErrCode) +{ +WX_UNI_KEY_EXCEPTION_DEGRADE = -1000, +WX_UNI_KEY_EXCEPTION_DEGRADE_CHECK_CONTENT_LENGTH_FAILED = -1003, +WX_UNI_KEY_EXCEPTION_DEGRADE_BUNDLE_CONTENTTYPE_ERROR = -1004, +WX_UNI_KEY_EXCEPTION_DEGRADE_OTHER_CAUSE = -1005, +WX_UNI_KEY_EXCEPTION_DEGRADE_EAGLE_RENDER_ERROR = -1007, +WX_UNI_KEY_EXCEPTION_DEGRADE_NET_CODE_CAUSE = -1008, +}; +/* For legacy usage. + Defines all error codes only for iOS platform which may be different from Android error codes. + For monitor uploads, we will remap the error code to WXSDKUniversalErrCode above if an + error code is declared having a remapped value. + + You could either use WXSDKUniversalErrCode or WXSDKErrCode when committing an error. + */ typedef NS_ENUM(int, WXSDKErrCode) { +// No use WX_ERR_JSFRAMEWORK_START = -1001, WX_ERR_JSFRAMEWORK_LOAD = -1002, WX_ERR_JSFRAMEWORK_EXECUTE = -1003, @@ -70,6 +87,7 @@ typedef NS_ENUM(int, WXSDKErrCode) WX_KEY_EXCEPTION_DOM = -9300, WX_KEY_EXCEPTION_WXBRIDGE=-9400, +// The following error codes have a remapped value defined in WXSDKUniversalErrCode WX_KEY_EXCEPTION_DEGRADE = -9500, WX_KEY_EXCEPTION_DEGRADE_CHECK_CONTENT_LENGTH_FAILED = -9501, WX_KEY_EXCEPTION_DEGRADE_BUNDLE_CONTENTTYPE_ERROR = -9502, @@ -77,6 +95,7 @@ typedef NS_ENUM(int, WXSDKErrCode) WX_KEY_EXCEPTION_DEGRADE_NET_CODE_CAUSE = -9504, WX_KEY_EXCEPTION_DEGRADE_EAGLE_RENDER_ERROR = -9505, +// No use WX_KEY_EXCEPTION_ABILITY_DOWN = -9600, WX_KEY_EXCEPTION_ABILITY_DOWN_IMAGE = -9601, WX_KEY_EXCEPTION_ABILITY_DOWN_TOH5 = -9602, @@ -110,6 +129,7 @@ typedef NS_ENUM (NSInteger,WXSDKErrorGroup){ + (WXSDKErrorGroup) getErrorGroupByCode:(WXSDKErrCode) code; + (NSString *) convertGroupToStringName:(WXSDKErrorGroup) group; + (NSString *) convertTypeToStringName:(WXSDKErrorType)type; ++ (NSString *) convertToUniversalCode:(WXSDKErrCode)code; @end diff --git a/ios/sdk/WeexSDK/Sources/Engine/WXSDKError.m b/ios/sdk/WeexSDK/Sources/Engine/WXSDKError.m index 9db1895..0eb0066 100644 --- a/ios/sdk/WeexSDK/Sources/Engine/WXSDKError.m +++ b/ios/sdk/WeexSDK/Sources/Engine/WXSDKError.m @@ -21,7 +21,8 @@ #import "WXSDKError.h" #define ERROR_TYPE@"type" -#define ERROR_GROUP @"groupe" +#define ERROR_GROUP @"group" +#define ERROR_ALIAS @"alias" @implementation WXSDKErrCodeUtil @@ -64,7 +65,6 @@ @(WX_ERR_JSBRIDGE_END):@{ERROR_TYPE:@(WX_JS_ERROR),ERROR_GROUP:@(WX_JS)}, @(WX_ERR_RENDER_START):@{ERROR_TYPE:@(WX_NATIVE_ERROR),ERROR_GROUP:@(WX_NATIVE)}, - @(WX_ERR_JSFRAMEWORK_START):@{ERROR_TYPE:@(WX_NATIVE_ERROR),ERROR_GROUP:@(WX_NATIVE)}, @(WX_ERR_RENDER_UPDATTR):@{ERROR_TYPE:@(WX_NATIVE_ERROR),ERROR_GROUP:@(WX_NATIVE)}, @(WX_ERR_RENDER_UPDSTYLE):@{ERROR_TYPE:@(WX_NATIVE_ERROR),ERROR_GROUP:@(WX_NATIVE)}, @(WX_ERR_RENDER_ADDELEMENT):@{ERROR_TYPE:@(WX_NATIVE_ERROR),ERROR_GROUP:@(WX_NATIVE)}, @@ -89,17 +89,16 @@ @(WX_KEY_EXCEPTION_DOM):@{ERROR_TYPE:@(WX_NATIVE_ERROR),ERROR_GROUP:@(WX_NATIVE)}, @(WX_KEY_EXCEPTION_WXBRIDGE):@{ERROR_TYPE:@(WX_JS_ERROR),ERROR_GROUP:@(WX_JS)}, - @(WX_KEY_EXCEPTION_DEGRADE):@{ERROR_TYPE:@(WX_DEGRADE_ERROR),ERROR_GROUP:@(WX_NATIVE)}, - @(WX_KEY_EXCEPTION_DEGRADE_CHECK_CONTENT_LENGTH_FAILED):@{ERROR_TYPE:@(WX_DEGRADE_ERROR),ERROR_GROUP:@(WX_NET)}, - @(WX_KEY_EXCEPTION_DEGRADE_BUNDLE_CONTENTTYPE_ERROR):@{ERROR_TYPE:@(WX_DEGRADE_ERROR),ERROR_GROUP:@(WX_NET)}, - @(WX_KEY_EXCEPTION_DEGRADE_EAGLE_RENDER_ERROR):@{ERROR_TYPE:@(WX_DEGRADE_ERROR),ERROR_GROUP:@(WX_JS)}, - @(WX_KEY_EXCEPTION_DEGRADE
[incubator-weex] branch master updated: Revert "[iOS] Update iOS error code. (#2522)" (#2532)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 d3f7560 Revert "[iOS] Update iOS error code. (#2522)" (#2532) d3f7560 is described below commit d3f756075108eb836c004f7ec7bba74935da173d Author: wqyfavor AuthorDate: Wed Jun 12 13:17:01 2019 +0800 Revert "[iOS] Update iOS error code. (#2522)" (#2532) This reverts commit 223d05f31890cdf3d55ee5fcf62559667bcec26d. --- ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m | 2 ++ ios/sdk/WeexSDK/Sources/Engine/WXSDKEngine.m | 1 + ios/sdk/WeexSDK/Sources/Engine/WXSDKError.h | 17 +++-- ios/sdk/WeexSDK/Sources/Engine/WXSDKError.m | 9 - 4 files changed, 22 insertions(+), 7 deletions(-) diff --git a/ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m b/ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m index e01f535..1e4fb54 100644 --- a/ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m +++ b/ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m @@ -838,6 +838,7 @@ _Pragma("clang diagnostic pop") \ NSString *exception = [[self.jsBridge exception] toString]; NSMutableString *errMsg = [NSMutableString stringWithFormat:@"[WX_KEY_EXCEPTION_SDK_INIT_JSFM_INIT_FAILED] %@",exception]; [WXExceptionUtils commitCriticalExceptionRT:@"WX_KEY_EXCEPTION_SDK_INIT" errCode:[NSString stringWithFormat:@"%d", WX_KEY_EXCEPTION_SDK_INIT] function:@"" exception:errMsg extParams:nil]; +WX_MONITOR_FAIL(WXMTJSFramework, WX_ERR_JSFRAMEWORK_EXECUTE, errMsg); } else { WX_MONITOR_SUCCESS(WXMTJSFramework); //the JSFramework has been load successfully. @@ -951,6 +952,7 @@ _Pragma("clang diagnostic pop") \ NSString *exception = [[self.jsBridge exception] toString]; NSMutableString *errMsg = [NSMutableString stringWithFormat:@"[WX_KEY_EXCEPTION_INVOKE_JSSERVICE_EXECUTE] name:%@,arg:%@,exception :$@",name,exception]; [WXExceptionUtils commitCriticalExceptionRT:@"WX_KEY_EXCEPTION_INVOKE" errCode:[NSString stringWithFormat:@"%d", WX_KEY_EXCEPTION_INVOKE] function:@"executeJsService" exception:errMsg extParams:nil]; +WX_MONITOR_FAIL(WXMTJSService, WX_ERR_JSFRAMEWORK_EXECUTE, errMsg); } else { // success } diff --git a/ios/sdk/WeexSDK/Sources/Engine/WXSDKEngine.m b/ios/sdk/WeexSDK/Sources/Engine/WXSDKEngine.m index c498cc1..bdc6a3b 100644 --- a/ios/sdk/WeexSDK/Sources/Engine/WXSDKEngine.m +++ b/ios/sdk/WeexSDK/Sources/Engine/WXSDKEngine.m @@ -266,6 +266,7 @@ if (!script || script.length <= 0) { NSMutableString *errMsg = [NSMutableString stringWithFormat:@"[WX_KEY_EXCEPTION_SDK_INIT_JSFM_INIT_FAILED] script don't exist:%@",script]; [WXExceptionUtils commitCriticalExceptionRT:@"WX_KEY_EXCEPTION_SDK_INIT" errCode:[NSString stringWithFormat:@"%d", WX_KEY_EXCEPTION_SDK_INIT] function:@"initSDKEnvironment" exception:errMsg extParams:nil]; +WX_MONITOR_FAIL(WXMTJSFramework, WX_ERR_JSFRAMEWORK_LOAD, errMsg); return; } static dispatch_once_t onceToken; diff --git a/ios/sdk/WeexSDK/Sources/Engine/WXSDKError.h b/ios/sdk/WeexSDK/Sources/Engine/WXSDKError.h index bfe56d6..0909ab6 100644 --- a/ios/sdk/WeexSDK/Sources/Engine/WXSDKError.h +++ b/ios/sdk/WeexSDK/Sources/Engine/WXSDKError.h @@ -33,12 +33,10 @@ typedef NS_ENUM(int, WXSDKErrCode) { -WX_KEY_EXCEPTION_DEGRADE = -1000, -WX_KEY_EXCEPTION_DEGRADE_CHECK_CONTENT_LENGTH_FAILED = -1003, -WX_KEY_EXCEPTION_DEGRADE_BUNDLE_CONTENTTYPE_ERROR = -1004, -WX_KEY_EXCEPTION_DEGRADE_OTHER_CAUSE = -1005, -WX_KEY_EXCEPTION_DEGRADE_EAGLE_RENDER_ERROR = -1007, -WX_KEY_EXCEPTION_DEGRADE_NET_CODE_CAUSE = -1008, +WX_ERR_JSFRAMEWORK_START = -1001, +WX_ERR_JSFRAMEWORK_LOAD = -1002, +WX_ERR_JSFRAMEWORK_EXECUTE = -1003, +WX_ERR_JSFRAMEWORK_END = -1099, WX_ERR_JSBRIDGE_START = -2001, WX_ERR_JSFUNC_PARAM = -2009, @@ -72,6 +70,13 @@ typedef NS_ENUM(int, WXSDKErrCode) WX_KEY_EXCEPTION_DOM = -9300, WX_KEY_EXCEPTION_WXBRIDGE=-9400, +WX_KEY_EXCEPTION_DEGRADE = -9500, +WX_KEY_EXCEPTION_DEGRADE_CHECK_CONTENT_LENGTH_FAILED = -9501, +WX_KEY_EXCEPTION_DEGRADE_BUNDLE_CONTENTTYPE_ERROR = -9502, +WX_KEY_EXCEPTION_DEGRADE_OTHER_CAUSE = -9503, +WX_KEY_EXCEPTION_DEGRADE_NET_CODE_CAUSE = -9504, +WX_KEY_EXCEPTION_DEGRADE_EAGLE_RENDER_ERROR = -9505, + WX_KEY_EXCEPTION_ABILITY_DOWN = -9600, WX_KEY_EXCEPTION_ABILITY_DOWN_IMAGE = -9601, WX_KEY_EXCEPTION_ABILITY_DOWN_TOH5 = -9602, diff --git a/ios/sdk/WeexSDK/Sources/Engine/WXSDKError.m b/ios/sdk/WeexSDK/Sources/En
[incubator-weex] branch master updated: Fix License Issue (#2499)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 f642e49 Fix License Issue (#2499) f642e49 is described below commit f642e49438dd85683a6ae1d2c9ee2315f59e00c7 Author: YorkShen AuthorDate: Thu May 30 18:05:14 2019 +0800 Fix License Issue (#2499) Convert Git lightweight tag to annotated tag during Apache official release. --- .../main/java/com/taobao/weex/utils/WXDeviceUtils.java | 18 ++ scripts/publish_release_official.sh| 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/android/sdk/src/main/java/com/taobao/weex/utils/WXDeviceUtils.java b/android/sdk/src/main/java/com/taobao/weex/utils/WXDeviceUtils.java index edf9fa9..c5dd78b 100644 --- a/android/sdk/src/main/java/com/taobao/weex/utils/WXDeviceUtils.java +++ b/android/sdk/src/main/java/com/taobao/weex/utils/WXDeviceUtils.java @@ -1,3 +1,21 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package com.taobao.weex.utils; import android.content.Context; diff --git a/scripts/publish_release_official.sh b/scripts/publish_release_official.sh index 9518ba4..cccf82b 100755 --- a/scripts/publish_release_official.sh +++ b/scripts/publish_release_official.sh @@ -51,7 +51,7 @@ svn add "$1" svn commit -m "Release ${1}" # Publish to Github Release -git tag "$1" +git tag -a -F "RELEASE_NOTE.md" "$1" git push "$4" "$1" npm install -g release-it export GITHUB_TOKEN="$5"
[incubator-weex] branch bugfix/preinti-instance created (now 5ab7735)
This is an automated email from the ASF dual-hosted git repository. luckychen pushed a change to branch bugfix/preinti-instance in repository https://gitbox.apache.org/repos/asf/incubator-weex.git. at 5ab7735 [Android] 1. fix instance not found on preDownLoadMode 2. fix memleak after instance destroy This branch includes the following new commits: new 5ab7735 [Android] 1. fix instance not found on preDownLoadMode 2. fix memleak after instance destroy The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[incubator-weex] 01/01: [Android] 1. fix instance not found on preDownLoadMode 2. fix memleak after instance destroy
This is an automated email from the ASF dual-hosted git repository. luckychen pushed a commit to branch bugfix/preinti-instance in repository https://gitbox.apache.org/repos/asf/incubator-weex.git commit 5ab7735d5d60dd7f23839b6652c7606d82dec1ac Author: zhongcang AuthorDate: Wed May 29 21:11:32 2019 +0800 [Android] 1. fix instance not found on preDownLoadMode 2. fix memleak after instance destroy --- android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java index 6220b01..cfd2380 100644 --- a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java +++ b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java @@ -448,6 +448,7 @@ public class WXSDKInstance implements IWXActivityStateListener,View.OnLayoutChan mInstanceId = WXSDKManager.getInstance().generateInstanceId(); mWXPerformance = new WXPerformance(mInstanceId); mApmForInstance = new WXInstanceApm(mInstanceId); +WXSDKManager.getInstance().getAllInstanceMap().put(mInstanceId,this); } @@ -1746,7 +1747,7 @@ public class WXSDKInstance implements IWXActivityStateListener,View.OnLayoutChan public void run() { WXSDKManager.getInstance().getAllInstanceMap().remove(mInstanceId); } - },5000); + },1000); } }
[incubator-weex] branch android-feature-preinit created (now ef1398c)
This is an automated email from the ASF dual-hosted git repository. luckychen pushed a change to branch android-feature-preinit in repository https://gitbox.apache.org/repos/asf/incubator-weex.git. at ef1398c [Android] support preinit && predonload mode No new revisions were added by this update.
[incubator-weex] branch master updated: Fix the tag pushing problems for apache release script. (#2481)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 c3a5b00 Fix the tag pushing problems for apache release script. (#2481) c3a5b00 is described below commit c3a5b00cae7a4c4ae47847fab8c339d92ce51b60 Author: YorkShen AuthorDate: Mon May 27 10:24:33 2019 +0800 Fix the tag pushing problems for apache release script. (#2481) The release script of weex relies on release-it (https://github.com/release-it/release-it), which will push all local tag to remote. I am fixing it by disable the ability of pushing tag in release-it. --- scripts/publish_release_official.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/publish_release_official.sh b/scripts/publish_release_official.sh index d000997..9518ba4 100755 --- a/scripts/publish_release_official.sh +++ b/scripts/publish_release_official.sh @@ -18,7 +18,6 @@ # This scirpt is used to publish release officially in Apache, Github Tag, Github Release, Android JCenter. # One may invoke this script by -# scripts/publish_release_official.sh 0.24.0 RC3 0.19.0 github-Apache token1 token2 # scripts/publish_release_official.sh $RELEASE_CANDIDATE_PREFIX $RELEASE_CANDIDATE_SUFFIX $TAG_OF_LATEST_RELEASE $GIT_REMOTE $GITHUB_PERSONAL_TOKEN $JCENTER_TOKEN # Explanation for variable: @@ -52,9 +51,11 @@ svn add "$1" svn commit -m "Release ${1}" # Publish to Github Release +git tag "$1" +git push "$4" "$1" npm install -g release-it export GITHUB_TOKEN="$5" -release-it --no-npm --no-git.commit --no-git.requireCleanWorkingDir --git.tagName="$1" --git.tagAnnotation='"$(cat RELEASE_NOTE.md)"' --git.tagArgs="--cleanup=verbatim" --git.pushRepo="$4" --github.release --github.releaseName="$1" --github.releaseNotes="cat RELEASE_NOTE.md" +release-it --ci --no-npm --no-git.commit --no-git.requireCleanWorkingDir --no-git.tag --no-git.push --git.pushRepo="$4" --github.release --github.releaseName="$1" --github.releaseNotes="cat RELEASE_NOTE.md" $1 # Publish Android to JCenter cd android
[incubator-weex] branch master updated: Chagne Android Version (#2480)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 340ec4a Chagne Android Version (#2480) 340ec4a is described below commit 340ec4a64cf1dbd0e0866c061a3fed162ccfd925 Author: YorkShen AuthorDate: Fri May 24 16:38:12 2019 +0800 Chagne Android Version (#2480) * Fix android version * Ignore android version check during Apache release --- android/sdk/build.gradle| 2 +- scripts/build_from_source.sh| 2 +- scripts/publish_release_official.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/android/sdk/build.gradle b/android/sdk/build.gradle index c6d8573..931075a 100755 --- a/android/sdk/build.gradle +++ b/android/sdk/build.gradle @@ -63,7 +63,7 @@ checkstyle { toolVersion = '6.9' } -version = project.hasProperty('weexVersion') ? project.getProperty('weexVersion') : "0.24.0" +version = project.hasProperty('weexVersion') ? project.getProperty('weexVersion') : "0.24.0.1" //Check version, the version must have 4 sections. The leading three section must be number, and the last section is odd number with or without suffix string. if (!project.hasProperty('ignoreVersionCheck') || !project.getProperty('ignoreVersionCheck').equals("true")) { diff --git a/scripts/build_from_source.sh b/scripts/build_from_source.sh index f6b7074..4975a06 100755 --- a/scripts/build_from_source.sh +++ b/scripts/build_from_source.sh @@ -74,7 +74,7 @@ then echo 'include ":android_sdk"'>settings.gradle echo "ndk.dir=$2">local.properties -./gradlew :android_sdk:clean :android_sdk:assembleRelease +./gradlew :android_sdk:clean :android_sdk:assembleRelease -PignoreVersionCheck="true" cp android_sdk/.externalNativeBuild/cmake/release/armeabi/Source/android/jsengine/libweexjsb.so android_sdk/libs/armeabi cp android_sdk/.externalNativeBuild/cmake/release/armeabi/Source/android/jsengine/libweexjst.so android_sdk/libs/armeabi diff --git a/scripts/publish_release_official.sh b/scripts/publish_release_official.sh index 3e916a8..d000997 100755 --- a/scripts/publish_release_official.sh +++ b/scripts/publish_release_official.sh @@ -58,6 +58,6 @@ release-it --no-npm --no-git.commit --no-git.requireCleanWorkingDir --git.tagNam # Publish Android to JCenter cd android -./gradlew clean install bintray -Pweexversion="$1" -PbintrayUser=alibabaweex -PbintrayApiKey="$6" +./gradlew clean install bintray -PignoreVersionCheck="true" -Pweexversion="$1" -PbintrayUser=alibabaweex -PbintrayApiKey="$6" # Publish iOS to Cocoapods \ No newline at end of file
[incubator-weex] branch master updated: Update version to 0.24.0 (#2479)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 b41f0c3 Update version to 0.24.0 (#2479) b41f0c3 is described below commit b41f0c36bd62d4401b4ccc3d16c584fc311e9c77 Author: YorkShen AuthorDate: Fri May 24 15:53:23 2019 +0800 Update version to 0.24.0 (#2479) --- android/sdk/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/sdk/build.gradle b/android/sdk/build.gradle index 6635ade..c6d8573 100755 --- a/android/sdk/build.gradle +++ b/android/sdk/build.gradle @@ -63,7 +63,7 @@ checkstyle { toolVersion = '6.9' } -version = project.hasProperty('weexVersion') ? project.getProperty('weexVersion') : "0.20.0.1" +version = project.hasProperty('weexVersion') ? project.getProperty('weexVersion') : "0.24.0" //Check version, the version must have 4 sections. The leading three section must be number, and the last section is odd number with or without suffix string. if (!project.hasProperty('ignoreVersionCheck') || !project.getProperty('ignoreVersionCheck').equals("true")) {
[incubator-weex] branch master updated: [iOS] fix crash when instanceid is nil (#2460)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 f8ea2c4 [iOS] fix crash when instanceid is nil (#2460) f8ea2c4 is described below commit f8ea2c4919ae7f48fe0cdf6122af13d271fcc062 Author: jianhan-he <41508406+jianhan...@users.noreply.github.com> AuthorDate: Mon May 20 11:42:50 2019 +0800 [iOS] fix crash when instanceid is nil (#2460) --- ios/sdk/WeexSDK/Sources/Monitor/WXExceptionUtils.m | 82 +++--- .../core/bridge/platform/core_side_in_platform.cpp | 3 +- 2 files changed, 44 insertions(+), 41 deletions(-) diff --git a/ios/sdk/WeexSDK/Sources/Monitor/WXExceptionUtils.m b/ios/sdk/WeexSDK/Sources/Monitor/WXExceptionUtils.m index ea79376..c913d33 100644 --- a/ios/sdk/WeexSDK/Sources/Monitor/WXExceptionUtils.m +++ b/ios/sdk/WeexSDK/Sources/Monitor/WXExceptionUtils.m @@ -43,56 +43,58 @@ static NSMutableDictionary *recordExceptionHistory = nil; NSMutableDictionary* extInfo = [[NSMutableDictionary alloc] initWithDictionary:extParams]; WXPerformBlockOnComponentThread(^{ +NSString *bundleUrlCommit = @"BundleUrlDefault"; +NSString *instanceIdCommit = @"InstanceIdDefalut"; +WXSDKInstance *instance = nil; +if(![WXUtility isBlankString:instanceId]){ +instanceIdCommit = instanceId; +instance = [WXSDKManager instanceForID:instanceId]; +} + NSString *targetException = exception.length > 200 ? [exception substringWithRange:NSMakeRange(0, 200)] : exception; -NSMutableSet *exceptionSet = [recordExceptionHistory objectForKey:instanceId]; +NSMutableSet *exceptionSet = [recordExceptionHistory objectForKey:instanceIdCommit]; if (!exceptionSet) { exceptionSet = [[NSMutableSet alloc] init]; -[recordExceptionHistory setObject:exceptionSet forKey:instanceId]; +[recordExceptionHistory setObject:exceptionSet forKey:instanceIdCommit]; } else if ([exceptionSet containsObject:targetException]) { return; } [exceptionSet addObject:targetException]; -NSString *bundleUrlCommit = @"BundleUrlDefault"; -NSString *instanceIdCommit = @"InstanceIdDefalut"; -WXSDKInstance * instance ; -if(![WXUtility isBlankString:instanceId]){ -instanceIdCommit = instanceId; -instance = [WXSDKManager instanceForID:instanceId]; -if(instance){ -bundleUrlCommit = instance.pageName?:instance.scriptURL.absoluteString; -if(nil == bundleUrlCommit || [@"" isEqualToString:bundleUrlCommit]){ -bundleUrlCommit = @"instanceUnSetPageNameOrUrl"; -} - -if (instance.containerInfo && instance.containerInfo.count >0) { -[extInfo addEntriesFromDictionary:instance.containerInfo]; -} -if (nil != instance.viewController) { -[extInfo setObject:NSStringFromClass(instance.viewController.class)?:@"unKnowVCName" forKey:KEY_PAGE_PROPERTIES_CONTAINER_NAME]; -} -[extInfo setObject:[self _convertInstanceStageToStr:instance] forKey:@"wxStageList"]; -[extInfo setObject:instance.pageName?:@"unKnowPageNameCaseUnSet" forKey:@"wxBundlePageName"]; -NSString* bundleTemplateCommit = @"has recycle"; -if (nil != instance.bundleTemplate) { -NSUInteger strLength = instance.bundleTemplate.length; -bundleTemplateCommit = [instance.bundleTemplate substringWithRange:NSMakeRange(0, strLength>300?300:strLength)]; -} -[extInfo setObject:bundleTemplateCommit forKey:@"wxTemplateOfBundle"]; -[extInfo setObject:[instance.apmInstance templateInfo] forKey:@"templateInfo"]; -NSNumber* pageStartTime = [instance.apmInstance.stageDic objectForKey:KEY_PAGE_STAGES_DOWN_BUNDLE_START]; -if (nil == pageStartTime) { -pageStartTime = [instance.apmInstance.stageDic objectForKey:KEY_PAGE_STAGES_RENDER_ORGIGIN]; -} -if (nil != pageStartTime) { -long useTime = [WXUtility getUnixFixTimeMillis] - pageStartTime.longValue; -[extInfo setObject:@(useTime) forKey:@"wxUseTime"]; -} - -}else if([instanceIdCommit hasPrefix:@"WX_KEY_EXCEPTION"]){ -bundleUrlCommit = instanceId; +if(instance){ +bundleUrlCommit = instance.pageName?:instance
[incubator-weex] branch master updated: [Android] Copy so. (#2454)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 4da0cea [Android] Copy so. (#2454) 4da0cea is described below commit 4da0cea70fd31f52dfa3dbb81f4a8d031b926e1c Author: YorkShen AuthorDate: Fri May 17 11:17:17 2019 +0800 [Android] Copy so. (#2454) Use a dedicated way to copy unstripped .so file without the importable file path. --- android/sdk/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/sdk/build.gradle b/android/sdk/build.gradle index 182908f..dfb7e22 100755 --- a/android/sdk/build.gradle +++ b/android/sdk/build.gradle @@ -378,11 +378,11 @@ bintray { afterEvaluate { transformNativeLibsWithStripDebugSymbolForRelease << { copy{ -from new File(project.buildDir, "intermediates/transforms/mergeJniLibs/release/folders/2000/3/main/lib") +from transformNativeLibsWithMergeJniLibsForRelease into new File(project.buildDir, "unstrippedSo") include '**/libweexjss.so', '**/libweexcore.so' eachFile { -it.path = "${it.relativePath.segments.first()}_${it.name}" +it.path = "${it.relativePath.segments[5]}_${it.name}" } } }
[incubator-weex] branch master updated: [Android] Check weexVersion (#2451)
This is an automated email from the ASF dual-hosted git repository. luckychen 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 151c469 [Android] Check weexVersion (#2451) 151c469 is described below commit 151c46939847185c6cc58dd97dbbee2e37e5fb18 Author: YorkShen AuthorDate: Thu May 16 17:32:14 2019 +0800 [Android] Check weexVersion (#2451) * [Android] Check weexVersion 1. The version must have 4 sections. 2. The leading three section must be number, and the last section is odd number with or without suffix string. * [Android] Add ignoreVersionCheck --- android/sdk/build.gradle | 21 - 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/android/sdk/build.gradle b/android/sdk/build.gradle index 0e3183d..182908f 100755 --- a/android/sdk/build.gradle +++ b/android/sdk/build.gradle @@ -63,7 +63,26 @@ checkstyle { toolVersion = '6.9' } -version = project.hasProperty('weexVersion')? project.getProperty('weexVersion') : "0.20.0.1" +version = project.hasProperty('weexVersion') ? project.getProperty('weexVersion') : "0.20.0.1" + +//Check version, the version must have 4 sections. The leading three section must be number, and the last section is odd number with or without suffix string. +if (!project.hasProperty('ignoreVersionCheck') || !project.getProperty('ignoreVersionCheck').equals("true")) { +assert version.tokenize('.').eachWithIndex { it, i -> +if (i < 3) { +assert it.isNumber() +} else if (i == 3) { +it.split("-|_").toList().eachWithIndex { inner_it, inner_i -> +if (inner_i == 0) { +assert inner_it.isNumber() && inner_it.toInteger() % 2 +} else { +assert !inner_it.isNumber() +} +}.size == 4 +} else { +assert false: "Please use semantic versioning witch 4 sections, you are using ${$ { i } + 1} section instead" +} +}.size == 4 +} android { compileSdkVersion project.compileSdkVersion