incubator-weex git commit: * [Core] Fix max-width problem. http://dotwe.org/vue/4022e76a68de681d423ea49ae434deff

2018-05-14 Thread kyork
Repository: incubator-weex
Updated Branches:
  refs/heads/master d0d4f246e -> 71af7585d


* [Core] Fix max-width problem.
http://dotwe.org/vue/4022e76a68de681d423ea49ae434deff


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/71af7585
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/71af7585
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/71af7585

Branch: refs/heads/master
Commit: 71af7585dea980e523376449a78a0514b6c234d9
Parents: d0d4f24
Author: YorkShen 
Authored: Mon May 14 20:58:51 2018 +0800
Committer: YorkShen 
Committed: Tue May 15 11:29:42 2018 +0800

--
 weex_core/Source/core/layout/layout.cpp | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/71af7585/weex_core/Source/core/layout/layout.cpp
--
diff --git a/weex_core/Source/core/layout/layout.cpp 
b/weex_core/Source/core/layout/layout.cpp
index 66d331b..a2fc800 100644
--- a/weex_core/Source/core/layout/layout.cpp
+++ b/weex_core/Source/core/layout/layout.cpp
@@ -175,7 +175,14 @@ namespace WeexCore {
 (widthMeasureMode == kUnspecified
 || heightMeasureMode == kUnspecified)) {
   float constrainsWidth = width;
-  if(widthMeasureMode == kExactly && !isnan(width)){
+  if(isnan(width)){
+if(!isnan(mCssStyle->mMaxWidth)){
+  constrainsWidth = mCssStyle->mMaxWidth;
+}
+  }
+
+  if((!isnan(width)& == kExactly) ||
+  (isnan(width) && !isnan(mCssStyle->mMaxWidth))) {
 constrainsWidth -= sumPaddingBorderAlongAxis(this, true);
   }
   WXCoreSize dimension = measureFunc(this, constrainsWidth,



[2/3] incubator-weex git commit: *[Core] revert so.

2018-05-14 Thread kyork
*[Core] revert so.


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/b5328e5a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/b5328e5a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/b5328e5a

Branch: refs/heads/master
Commit: b5328e5a4156c3eef9475d8ea7122a4ca7159e16
Parents: df73040
Author: Kelvin-May <710584...@qq.com>
Authored: Tue May 15 10:08:46 2018 +0800
Committer: YorkShen 
Committed: Tue May 15 11:27:29 2018 +0800

--
 android/sdk/libs/armeabi/libweexjsc.so | Bin 0 -> 939976 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/b5328e5a/android/sdk/libs/armeabi/libweexjsc.so
--
diff --git a/android/sdk/libs/armeabi/libweexjsc.so 
b/android/sdk/libs/armeabi/libweexjsc.so
new file mode 100644
index 000..6fb838d
Binary files /dev/null and b/android/sdk/libs/armeabi/libweexjsc.so differ



[1/3] incubator-weex git commit: *[android] fix npe.

2018-05-14 Thread kyork
Repository: incubator-weex
Updated Branches:
  refs/heads/master 88670072a -> d0d4f246e


*[android] fix npe.


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/df730408
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/df730408
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/df730408

Branch: refs/heads/master
Commit: df7304083b7e3bda26d7067ea36df45f8afc6e3a
Parents: 8867007
Author: 驱影 
Authored: Mon May 14 19:57:48 2018 +0800
Committer: YorkShen 
Committed: Tue May 15 11:27:28 2018 +0800

--
 android/sdk/libs/armeabi/libweexjsc.so| Bin 939976 -> 0 bytes
 .../java/com/taobao/weex/bridge/WXBridge.java |   5 -
 .../com/taobao/weex/ui/RenderContextImpl.java |   7 ++-
 3 files changed, 10 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/df730408/android/sdk/libs/armeabi/libweexjsc.so
--
diff --git a/android/sdk/libs/armeabi/libweexjsc.so 
b/android/sdk/libs/armeabi/libweexjsc.so
deleted file mode 100644
index 6fb838d..000
Binary files a/android/sdk/libs/armeabi/libweexjsc.so and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/df730408/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridge.java
--
diff --git a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridge.java 
b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridge.java
index 37e4493..f335a8a 100644
--- a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridge.java
+++ b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridge.java
@@ -212,7 +212,10 @@ public class WXBridge implements IWXBridge {
*/
   @Override
   public Object callNativeModule(String instanceId, String module, String 
method, byte[] arguments, byte[] options) {
-JSONArray argArray = JSON.parseArray(new String(arguments));
+JSONArray argArray = null;
+if (arguments != null) {
+  argArray = JSON.parseArray(new String(arguments));
+}
 JSONObject optionsObj = null;
 if (options != null) {
   optionsObj = JSON.parseObject(new String(options));

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/df730408/android/sdk/src/main/java/com/taobao/weex/ui/RenderContextImpl.java
--
diff --git 
a/android/sdk/src/main/java/com/taobao/weex/ui/RenderContextImpl.java 
b/android/sdk/src/main/java/com/taobao/weex/ui/RenderContextImpl.java
index c63bc2b..d5093d1 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/RenderContextImpl.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/RenderContextImpl.java
@@ -48,7 +48,11 @@ class RenderContextImpl implements RenderContext {
 
   public void destroy() {
 mWXSDKInstance = null;
-mRegistry.clear();
+try {
+  mRegistry.clear();
+} catch (Throwable e) {
+  e.printStackTrace();
+}
   }
 
   public WXSDKInstance getWXSDKInstance() {
@@ -69,6 +73,7 @@ class RenderContextImpl implements RenderContext {
 mRegistry.put(ref, comp);
   }
 
+  @Override
   public WXComponent unregisterComponent(String ref) {
 return mRegistry.remove(ref);
   }



[3/3] incubator-weex git commit: *[Core] update so.

2018-05-14 Thread kyork
*[Core] update so.


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/d0d4f246
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/d0d4f246
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/d0d4f246

Branch: refs/heads/master
Commit: d0d4f246e388c5044f33a8860b0b5a109bf5e4bc
Parents: b5328e5
Author: 驱影 
Authored: Tue May 15 10:50:40 2018 +0800
Committer: YorkShen 
Committed: Tue May 15 11:27:29 2018 +0800

--
 android/sdk/libs/armeabi/libweexjsc.so | Bin 939976 -> 972852 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/d0d4f246/android/sdk/libs/armeabi/libweexjsc.so
--
diff --git a/android/sdk/libs/armeabi/libweexjsc.so 
b/android/sdk/libs/armeabi/libweexjsc.so
index 6fb838d..bec8e6d 100644
Binary files a/android/sdk/libs/armeabi/libweexjsc.so and 
b/android/sdk/libs/armeabi/libweexjsc.so differ



[GitHub] incubator-weex issue #1175: [WEEX-363][Android] Fix callNativeModule argumen...

2018-05-14 Thread weex-bot
Github user weex-bot commented on the issue:

https://github.com/apache/incubator-weex/pull/1175
  





  

  
  Warnings

  
  
  :warning:
  No Changelog changes!

  




  

  
  Messages

  
  
  :book:
  danger test finished.

  




  Generated by :no_entry_sign: http://github.com/danger/danger-js/;>dangerJS




---


[GitHub] incubator-weex pull request #1175: [WEEX-363][Android] Fix callNativeModule ...

2018-05-14 Thread Kelvin-May
GitHub user Kelvin-May opened a pull request:

https://github.com/apache/incubator-weex/pull/1175

[WEEX-363][Android] Fix callNativeModule arguments NPE.



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/Kelvin-May/incubator-weex apache_master

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-weex/pull/1175.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1175


commit 192567a3a5ad4c30a9992317e78a089268a17bcf
Author: 驱影 
Date:   2018-05-14T11:57:48Z

*[android] fix npe.

commit 56846a2d059da15488504c1a351e7b3e7d8f5328
Author: Kelvin-May <710584688@...>
Date:   2018-05-15T02:08:46Z

*[Core] revert so.

commit f93b76dff5c2a2017d50ceec5b0a0b2027a818fa
Author: 驱影 
Date:   2018-05-15T02:50:40Z

*[Core] update so.




---


[GitHub] incubator-weex issue #1173: * [Core] Fix max-width problem.

2018-05-14 Thread acton393
Github user acton393 commented on the issue:

https://github.com/apache/incubator-weex/pull/1173
  
@YorkShen   please rename the title to the format like 
[WEEX-jiraid][component] summary, pay much more attention to the commit msg, 
thankshttp://weex.apache.org/development-process.html


---


[GitHub] incubator-weex pull request #1174: [WEEX-362] [iOS] tmp solution if mLayoutR...

2018-05-14 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/incubator-weex/pull/1174


---


incubator-weex git commit: [WEEX-362] [iOS] tmp solution if mLayoutResult is nil (mutil thread ?)

2018-05-14 Thread acton393
Repository: incubator-weex
Updated Branches:
  refs/heads/master b7c069340 -> 88670072a


[WEEX-362] [iOS] tmp solution if mLayoutResult is nil (mutil thread ?)

close #1174


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/88670072
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/88670072
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/88670072

Branch: refs/heads/master
Commit: 88670072a0b472bc8cac2e99f778584933b8ee13
Parents: b7c0693
Author: zhongcang 
Authored: Mon May 14 21:38:34 2018 +0800
Committer: acton393 
Committed: Mon May 14 21:57:17 2018 +0800

--
 ios/sdk/WeexSDK/Sources/Layout/WXCoreLayout.h | 4 
 1 file changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/88670072/ios/sdk/WeexSDK/Sources/Layout/WXCoreLayout.h
--
diff --git a/ios/sdk/WeexSDK/Sources/Layout/WXCoreLayout.h 
b/ios/sdk/WeexSDK/Sources/Layout/WXCoreLayout.h
index 522bc8c..fac9c4f 100644
--- a/ios/sdk/WeexSDK/Sources/Layout/WXCoreLayout.h
+++ b/ios/sdk/WeexSDK/Sources/Layout/WXCoreLayout.h
@@ -257,6 +257,10 @@ namespace WeexCore {
 
 inline void reset() {
   if (isDirty()) {
+//todo tmp solution if mLayoutResult is nil (mutil thread ?)
+if (nullptr == mLayoutResult) {
+mLayoutResult = new WXCorelayoutResult();
+}
 mLayoutResult->reset();
 for (WXCoreFlexLine *flexLine : mFlexLines) {
   if (flexLine != nullptr) {



[GitHub] incubator-weex issue #1174: [WEEX-362] [iOS] tmp solution if mLayoutResult i...

2018-05-14 Thread weex-bot
Github user weex-bot commented on the issue:

https://github.com/apache/incubator-weex/pull/1174
  






  

  
  Messages

  
  
  :book:
  has no jsfm file changed.

  

  :book:
  jsfm test finished.

  




  Generated by :no_entry_sign: http://github.com/danger/danger-js/;>dangerJS




---


[GitHub] incubator-weex pull request #1174: [WEEX-362] [iOS] tmp solution if mLayoutR...

2018-05-14 Thread lucky-chen
GitHub user lucky-chen opened a pull request:

https://github.com/apache/incubator-weex/pull/1174

[WEEX-362] [iOS] tmp solution if mLayoutResult is nil (mutil thread ?)

1. tmp solution if mLayoutResult is nil 


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/lucky-chen/incubator-weex 
ios-bugfix-protectednil

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-weex/pull/1174.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1174






---


[GitHub] incubator-weex issue #1173: * [Core] Fix max-width problem.

2018-05-14 Thread weex-bot
Github user weex-bot commented on the issue:

https://github.com/apache/incubator-weex/pull/1173
  





  

  
  Warnings

  
  
  :warning:
  No Changelog changes!

  




  

  
  Messages

  
  
  :book:
  danger test finished.

  




  Generated by :no_entry_sign: http://github.com/danger/danger-js/;>dangerJS




---


[GitHub] incubator-weex pull request #1173: * [Core] Fix max-width problem.

2018-05-14 Thread YorkShen
GitHub user YorkShen opened a pull request:

https://github.com/apache/incubator-weex/pull/1173

* [Core] Fix max-width problem.

https://issues.apache.org/jira/browse/WEEX-361

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/YorkShen/incubator-weex layout_text_max_width

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-weex/pull/1173.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1173


commit f71f15abed5632a1813c074786681d388335db71
Author: YorkShen 
Date:   2018-05-14T12:58:51Z

* [Core] Fix max-width problem.
http://dotwe.org/vue/4022e76a68de681d423ea49ae434deff




---


[GitHub] incubator-weex issue #1158: [jsfm] Support sending stylesheets and class nam...

2018-05-14 Thread Hanks10100
Github user Hanks10100 commented on the issue:

https://github.com/apache/incubator-weex/pull/1158
  
@MountainHill 这是一个内部改造,对提供的 API 无影响。


---


incubator-weex git commit: [WEEX-355][android] recycle-list adapter for weex-core new architecture

2018-05-14 Thread kyork
Repository: incubator-weex
Updated Branches:
  refs/heads/master 1a2ee1c93 -> b7c069340


[WEEX-355][android] recycle-list adapter for weex-core new architecture


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/b7c06934
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/b7c06934
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/b7c06934

Branch: refs/heads/master
Commit: b7c069340bee5b96801e25114a307c7061f30d43
Parents: 1a2ee1c
Author: jianbai.gbj 
Authored: Mon May 14 17:38:15 2018 +0800
Committer: YorkShen 
Committed: Mon May 14 18:30:49 2018 +0800

--
 android/playground/app/build.gradle   | 2 +-
 weex_core/Source/core/render/node/render_object.h | 3 +--
 weex_core/debug.sh| 2 +-
 3 files changed, 3 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/b7c06934/android/playground/app/build.gradle
--
diff --git a/android/playground/app/build.gradle 
b/android/playground/app/build.gradle
index 2caa695..82ec5c4 100755
--- a/android/playground/app/build.gradle
+++ b/android/playground/app/build.gradle
@@ -99,7 +99,7 @@ dependencies {
 
 compile 'com.taobao.android:dexposed:0.1.8'
 compile 'com.loopj.android:android-async-http:1.4.9@aar'
-compile 'com.facebook.fresco:fresco:0.12.0+'
+compile 'com.facebook.fresco:fresco:0.12.0'
 compile 'com.facebook.fresco:animated-gif:0.12.0'
 
 compile 'com.squareup.okhttp:okhttp:2.3.0'

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/b7c06934/weex_core/Source/core/render/node/render_object.h
--
diff --git a/weex_core/Source/core/render/node/render_object.h 
b/weex_core/Source/core/render/node/render_object.h
index 6fa638c..2671fe1 100644
--- a/weex_core/Source/core/render/node/render_object.h
+++ b/weex_core/Source/core/render/node/render_object.h
@@ -154,8 +154,7 @@ namespace WeexCore {
 
 virtual StyleType ApplyStyle(const std::string , const std::string 
, const bool updating) {
   bool  insert = false;
-  if(value.length() > 0 && value.at(0) == JSON_OBJECT_MARK_CHAR
- || value.at(0) == JSON_ARRAY_MARK_CHAR){
+  if(value.length() > 0 && (value.at(0) == JSON_OBJECT_MARK_CHAR || 
value.at(0) == JSON_ARRAY_MARK_CHAR)){
 mapInsertOrAssign(mStyles, key, value);
 insert = true;
   }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/b7c06934/weex_core/debug.sh
--
diff --git a/weex_core/debug.sh b/weex_core/debug.sh
index 79152ef..c3b6c5f 100755
--- a/weex_core/debug.sh
+++ b/weex_core/debug.sh
@@ -1,2 +1,2 @@
 ## show c plus plus crash stack
-adb logcat | $NDK/ndk-stack -sym  
../android/sdk/build/intermediates/cmake/debug/obj/x86
+adb logcat | $NDK/ndk-stack -sym  
../android/sdk/build/intermediates/cmake/debug/obj/armeabi-v7a



[GitHub] incubator-weex issue #1172: [WEEX-355][android] recycle-list adapter for wee...

2018-05-14 Thread weex-bot
Github user weex-bot commented on the issue:

https://github.com/apache/incubator-weex/pull/1172
  





  

  
  Warnings

  
  
  :warning:
  No Changelog changes!

  




  

  
  Messages

  
  
  :book:
  danger test finished.

  




  Generated by :no_entry_sign: http://github.com/danger/danger-js/;>dangerJS




---


[GitHub] incubator-weex issue #1158: [jsfm] Support sending stylesheets and class nam...

2018-05-14 Thread MountainHill
Github user MountainHill commented on the issue:

https://github.com/apache/incubator-weex/pull/1158
  
请问weex现在的版本(0.18.0)支持这个特性吗?


---


[GitHub] incubator-weex pull request #1171: [WEEX-360] [Android] Fix crash when reini...

2018-05-14 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/incubator-weex/pull/1171


---


incubator-weex git commit: [WEEX-360] [Android] Fix crash when reinit framework serializer will be freed after framework inited finished. So if we use it for re initialize. Will cause null ptr.

2018-05-14 Thread toretto
Repository: incubator-weex
Updated Branches:
  refs/heads/master ddc4f4bd0 -> 1a2ee1c93


[WEEX-360] [Android] Fix crash when reinit framework
serializer will be freed after framework inited finished.
So if we use it for re initialize. Will cause null ptr.

Bug: WEEX-360


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/1a2ee1c9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/1a2ee1c9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/1a2ee1c9

Branch: refs/heads/master
Commit: 1a2ee1c93d4eade5821c986bb896faa074067da2
Parents: ddc4f4b
Author: 东煜 
Authored: Mon May 14 16:17:16 2018 +0800
Committer: 东煜 
Committed: Mon May 14 16:17:16 2018 +0800

--
 .../android/jsengine/multiprocess/WeexProxy.cpp | 57 ++--
 .../android/jsengine/multiprocess/WeexProxy.h   |  4 +-
 2 files changed, 31 insertions(+), 30 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/1a2ee1c9/weex_core/Source/android/jsengine/multiprocess/WeexProxy.cpp
--
diff --git a/weex_core/Source/android/jsengine/multiprocess/WeexProxy.cpp 
b/weex_core/Source/android/jsengine/multiprocess/WeexProxy.cpp
index 2d19683..da2f03f 100644
--- a/weex_core/Source/android/jsengine/multiprocess/WeexProxy.cpp
+++ b/weex_core/Source/android/jsengine/multiprocess/WeexProxy.cpp
@@ -122,7 +122,7 @@ namespace WeexCore {
 }
 
 jint
-WeexProxy::initFrameworkInMultiProcess(JNIEnv *env, jstring script, 
IPCSerializer *serializer) {
+WeexProxy::initFrameworkInMultiProcess(JNIEnv *env, jstring script, 
jobject params) {
 bool reinit = false;
 startInitFrameWork:
 try {
@@ -139,13 +139,15 @@ namespace WeexCore {
 }
 } else {
 // initHandler(sHandler.get());
+
 ExtendJSApi *pExtensionJSApi = new ExtendJSApi();
 
 pExtensionJSApi->initFunction(sHandler.get());
 
 // using base::debug::TraceEvent;
 // TraceEvent::StartATrace(env);
-
+std::unique_ptr 
serializer(createIPCSerializer());
+initFromParam(env, script, params, serializer.get());
 
serializer->setMsg(static_cast(IPCJSMsg::INITFRAMEWORK));
 
 std::unique_ptr buffer = serializer->finish();
@@ -177,30 +179,27 @@ namespace WeexCore {
 jobject params) {
 
 Bridge_Impl_Android::getInstance()->setGlobalRef(jThis);
-std::unique_ptr serializer(createIPCSerializer());
-const std::vector  = 
initFromParam(env, script,
-   
 params,
-   
 serializer.get());
-LOGE("doInitFramework is running");
-if (g_use_single_process) {
-if (initFrameworkInSingleProcess(env, script, 
initFrameworkParams)) {
-//reportNativeInitStatus("-1011", "init Single Process 
Success");
-return true;
-}
-
-if (initFrameworkInMultiProcess(env, script, serializer.get())) {
-return true;
-}
-} else {
-if (initFrameworkInMultiProcess(env, script, serializer.get())) {
-return true;
-}
 
-if (initFrameworkInSingleProcess(env, script, 
initFrameworkParams)) {
-reportNativeInitStatus("-1011", "init Single Process Success");
-return true;
-}
+LOGE("doInitFramework is running");
+//if (g_use_single_process) {
+//if (initFrameworkInSingleProcess(env, script, nullptr)) {
+////reportNativeInitStatus("-1011", "init Single Process 
Success");
+//return true;
+//}
+//
+//if (initFrameworkInMultiProcess(env, script, params)) {
+//return true;
+//}
+//} else {
+if (initFrameworkInMultiProcess(env, script, params)) {
+return true;
 }
+
+//if (initFrameworkInSingleProcess(env, script, nullptr)) {
+//reportNativeInitStatus("-1011", "init Single Process 
Success");
+//return true;
+//}
+//}
 reportNativeInitStatus("-1010", "init Failed");
 return false;
 
@@ -462,9 +461,11 @@ namespace WeexCore {
 WEEX_CORE_JS_API_FUNCTIONS *functions);
 
 jint
-WeexProxy::initFrameworkInSingleProcess(JNIEnv *env, jstring script,
-std::vector 

[GitHub] incubator-weex issue #1171: [WEEX-360] [Android] Fix crash when reinit frame...

2018-05-14 Thread yuhun-alibaba
Github user yuhun-alibaba commented on the issue:

https://github.com/apache/incubator-weex/pull/1171
  
LGTM


---


[GitHub] incubator-weex issue #1171: [WEEX-360] [Android] Fix crash when reinit frame...

2018-05-14 Thread weex-bot
Github user weex-bot commented on the issue:

https://github.com/apache/incubator-weex/pull/1171
  





  

  
  Warnings

  
  
  :warning:
  No Changelog changes!

  




  

  
  Messages

  
  
  :book:
  danger test finished.

  




  Generated by :no_entry_sign: http://github.com/danger/danger-js/;>dangerJS




---


[GitHub] incubator-weex pull request #1171: [WEEX-360] [Android] Fix crash when reini...

2018-05-14 Thread Darin726
GitHub user Darin726 opened a pull request:

https://github.com/apache/incubator-weex/pull/1171

[WEEX-360] [Android] Fix crash when reinit framework

serializer will be freed after framework inited finished.
So if we use it for re initialize. Will cause null ptr.

Bug: WEEX-360

JIRA  https://issues.apache.org/jira/browse/WEEX-360

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/Darin726/incubator-weex 
master-fix-topCrash-05-14

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-weex/pull/1171.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1171


commit 1a2ee1c93d4eade5821c986bb896faa074067da2
Author: 东煜 
Date:   2018-05-14T08:17:16Z

[WEEX-360] [Android] Fix crash when reinit framework
serializer will be freed after framework inited finished.
So if we use it for re initialize. Will cause null ptr.

Bug: WEEX-360




---


[1/5] incubator-weex-site git commit: Update toolkit.md

2018-05-14 Thread hanks
Repository: incubator-weex-site
Updated Branches:
  refs/heads/master d6503a16f -> ecb64a3f7


Update toolkit.md

Project: http://git-wip-us.apache.org/repos/asf/incubator-weex-site/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-weex-site/commit/2a3e863c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex-site/tree/2a3e863c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex-site/diff/2a3e863c

Branch: refs/heads/master
Commit: 2a3e863ce369e38268f87a8a64d0902a34de5a84
Parents: d6503a1
Author: zhang988925 
Authored: Fri May 4 23:41:57 2018 +0800
Committer: GitHub 
Committed: Fri May 4 23:41:57 2018 +0800

--
 source/cn/tools/toolkit.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/2a3e863c/source/cn/tools/toolkit.md
--
diff --git a/source/cn/tools/toolkit.md b/source/cn/tools/toolkit.md
index fb8043e..bd8757d 100644
--- a/source/cn/tools/toolkit.md
+++ b/source/cn/tools/toolkit.md
@@ -22,7 +22,7 @@ $ npm install -g weex-toolkit
 ``` bash
 $ npm install weex-toolkit -g --registry=https://registry.npm.taobao.org
 // 或者
-$ nrm use taobao
+$ npm use taobao
 $ npm install weex-toolkit -g
 ```
 



[4/5] incubator-weex-site git commit: [doc] front-end-frameworks.md: fix typo (#151)

2018-05-14 Thread hanks
[doc] front-end-frameworks.md: fix typo (#151)


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex-site/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-weex-site/commit/3551b9d4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex-site/tree/3551b9d4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex-site/diff/3551b9d4

Branch: refs/heads/master
Commit: 3551b9d4fa9d213cf8356e8a02ca85e3269e8d76
Parents: a6c603b 95c0b0e
Author: Hanks 
Authored: Mon May 14 14:01:14 2018 +0800
Committer: Hanks 
Committed: Mon May 14 14:01:14 2018 +0800

--
 source/guide/front-end-frameworks.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--




[3/5] incubator-weex-site git commit: front-end-frameworks: fix typo

2018-05-14 Thread hanks
front-end-frameworks: fix typo

rely on instead of relay on

Project: http://git-wip-us.apache.org/repos/asf/incubator-weex-site/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-weex-site/commit/95c0b0ef
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex-site/tree/95c0b0ef
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex-site/diff/95c0b0ef

Branch: refs/heads/master
Commit: 95c0b0ef8243d5aef813b03294ce0c13ea05177d
Parents: d6503a1
Author: Ke Ding 
Authored: Sat May 12 07:55:06 2018 +0800
Committer: GitHub 
Committed: Sat May 12 07:55:06 2018 +0800

--
 source/guide/front-end-frameworks.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/95c0b0ef/source/guide/front-end-frameworks.md
--
diff --git a/source/guide/front-end-frameworks.md 
b/source/guide/front-end-frameworks.md
index ee77474..2464a87 100644
--- a/source/guide/front-end-frameworks.md
+++ b/source/guide/front-end-frameworks.md
@@ -14,7 +14,7 @@ version: 2.1
 
 Front-end technologies seem flourishing and productive. Using front-end 
frameworks in production is a good way to write maintainable apps.
 
-However, **Weex is not a front-end framework**. Indeed, front-end frameworks 
are just the syntax layer or DSL (Domain-specific Language) of Weex, they are 
decoupled from native render engines. In another word, Weex does not relay on 
any specific front-end frameworks, with the evolution of technology, Weex can 
integrate more widely used front-end frameworks as well.
+However, **Weex is not a front-end framework**. Indeed, front-end frameworks 
are just the syntax layer or DSL (Domain-specific Language) of Weex, they are 
decoupled from native render engines. In another word, Weex does not rely on 
any specific front-end frameworks. With the evolution of the technology, Weex 
can integrate more widely used front-end frameworks as well.
 
 Currently, Weex mainly supports [Vue.js](https://vuejs.org/) and 
[Rax](https://alibaba.github.io/rax/), and those frameworks are already 
integrated into Weex SDK, you don't need to require them manually.
 



[2/5] incubator-weex-site git commit: * [doc] Update android apil

2018-05-14 Thread hanks
* [doc] Update android apil


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex-site/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-weex-site/commit/a6c603ba
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex-site/tree/a6c603ba
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex-site/diff/a6c603ba

Branch: refs/heads/master
Commit: a6c603bab2a17f22d565594fe517b5396e8641a8
Parents: d6503a1
Author: york.sy 
Authored: Thu May 10 20:15:28 2018 +0800
Committer: york.sy 
Committed: Thu May 10 20:15:28 2018 +0800

--
 source/cn/references/android-apis.md | 288 +++--
 source/references/android-apis.md| 292 +++---
 2 files changed, 299 insertions(+), 281 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/a6c603ba/source/cn/references/android-apis.md
--
diff --git a/source/cn/references/android-apis.md 
b/source/cn/references/android-apis.md
index a00b83b..3c24a4f 100644
--- a/source/cn/references/android-apis.md
+++ b/source/cn/references/android-apis.md
@@ -10,100 +10,141 @@ version: 2.1
 
 Weex 初步接入请参考:https://github.com/weexteam/article/issues/25
 
-## WXSDKEngine 是 Weex 对外的总入口。
+## WXSDKEngine
+WXSDKEngine 是 Weex 对外的总入口。
 主要提供了一下功能:
 
-1. 设置相关 Adapter 和获取 adapter。
-2. 注册自定义 module 和 component
-3. 重置 JSFramework
+1. 注册自定义 module 和 component
+1. 设置相关 adapter 和获取 adapter。
 
-## Adapter 介绍
-Weex 为了重用 Native 通用库提供了对应的接口进行设置。
-1. IWXImgLoaderAdapter 图片适配器。
+### 注册自定义 module 和 component
+ component
+Weex提供多种注册 Component的方式,其中效率最高的为
 
-  Weex 会把需要设置图片的 View 和 URL 透露出来,Native 
端需要实现这个接口进行图片下载。 Weex 
没有提供图片默认实现。
+public static boolean registerComponent(IFComponentHolder holder, boolean 
appendTree, String ... names)
 
-  接口定义如下:
+* holder 为一个抽象工厂,用于创建component,可使用 
SimpleComponentHolder 来快速的构建该对象。
+* appendTree 为一个扩展标记位,目前暂无意义。
+* names 表示该 component 在前端代ç 
ä¸­åç§°ï¼Œå¯æŠŠå¤šä¸ªå‰ç«¯ç»„件映射成一个 component 。
 
-  ```java
-  public interface IWXImgLoaderAdapter {
-void setImage(String url, ImageView view, WXImageQuality quality, 
WXImageStrategy strategy);
-  }
-  ```
+ module
+Weex 提供如下注册 Module 的方式:
 
-  `WXImageQuality` 表示图片的质量,`WXImageQuality` 取如下值 
`LOW`, `NORMAL`, `HIGH`, `ORIGINAL` 图片质量依次变高。默认为 
`LOW`。`WXImageStrategy` 为扩展类,表示了图片是否可以裁剪 
(isClipping) 锐化 (isSharpen) 占位符 (placeHolder) 等。
+public static  boolean registerModule(String 
moduleName, Class moduleClass,boolean global) throws WXException
 
-2. IWXHttpAdapter 网络下载适配器。
+* moduleName 前端代码中module的名称
+* moduleClass module对应的Class,需要提供一个不含参数的构造
函数,或使用默认构造函数。
+* global 是否为全局唯一,true 为全局唯一,false 表示和 
WXSDKInstance 绑定。
 
-  Weex 自定义了 `WXRequest` 和 `OnHttpListener`,Native 
重载接口后可以从 Request 中获取URL,Header 
等参数,网络请求完成后可以通过 `OnHttpListener` 
进行回调通知。Weex 
提供了默认网络请求:`DefaultWXHttpAdapter`, 使用的是 
`HttpURLConnection` 进行网络请求。
+### Adapter 介绍
+第三方 App 可能需要实现下述的 
Adapter,才能完整的使用Weex的能力。
 
-  接口定义如下:
+ 图片适配器
+Weex 图片适配器负责根据URL,加载对应的图片,图片适é…
å™¨åˆ†ä¸ºä¸¤ç§ï¼š
+1. 将 URL 对应的图片加载到 View 上
+1. 将 URL 对应的图片加载到 Drawable 对象上。
 
-  ```java
-  public interface IWXHttpAdapter {
-void sendRequest(WXRequest request, OnHttpListener listener);
-  }
-  ```
+第一种图片适配器是必须实现,第二种图片适é…
å™¨æ˜¯å¯é€‰å®žçŽ°ã€‚Weex对于这两种图片适配器均没有默认实现。
 
-  `WXRequest` 定义了网络请求相å…
³çš„参数,请求方法,请求主体,超时时间。Weex默认超
时时间是3000.
+# IWXImgLoaderAdapter
+Weex 会把需要设置图片的 View 和 URL 透露出来,Native 
端需要实现这个接口进行图片下载。
 
-  `OnHttpListener` 定义了网络请求结束后对应方法。定义如下:
+接口定义如下:
 
-  ```java
-  interface OnHttpListener {

[5/5] incubator-weex-site git commit: [doc] Update toolkit.md (#149)

2018-05-14 Thread hanks
[doc] Update toolkit.md (#149)


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex-site/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-weex-site/commit/ecb64a3f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex-site/tree/ecb64a3f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex-site/diff/ecb64a3f

Branch: refs/heads/master
Commit: ecb64a3f70024fc16ddaa5694b3540a358b72ce1
Parents: 3551b9d 2a3e863
Author: Hanks 
Authored: Mon May 14 14:02:34 2018 +0800
Committer: Hanks 
Committed: Mon May 14 14:02:34 2018 +0800

--
 source/cn/tools/toolkit.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--