You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@weex.apache.org by GitBox <gi...@apache.org> on 2018/09/26 06:47:48 UTC

[GitHub] YorkShen closed pull request #1582: [WEEX-633][core] bugfix dom module register error and '\xxxxxx' error

YorkShen closed pull request #1582: [WEEX-633][core] bugfix dom module register error and '\xxxxxx' error
URL: https://github.com/apache/incubator-weex/pull/1582
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/ios/sdk/WeexSDK/Sources/Bridge/WXCoreBridge.mm b/ios/sdk/WeexSDK/Sources/Bridge/WXCoreBridge.mm
index d6066921e2..af629163b0 100644
--- a/ios/sdk/WeexSDK/Sources/Bridge/WXCoreBridge.mm
+++ b/ios/sdk/WeexSDK/Sources/Bridge/WXCoreBridge.mm
@@ -221,10 +221,6 @@ static void MergeBorderWidthValues(NSMutableDictionary* dict,
     {
         // should not enter this function
         do {
-            RenderPage *page = RenderManager::GetInstance()->GetPage(page_id);
-            if (page == nullptr) {
-                break;
-            }
             NSString *instanceId = NSSTRING(page_id);
             WXSDKInstance *instance = [WXSDKManager instanceForID:instanceId];
             if (!instance) {
diff --git a/weex_core/Source/core/data_render/object.cc b/weex_core/Source/core/data_render/object.cc
index 56dee147b5..38f5814eec 100644
--- a/weex_core/Source/core/data_render/object.cc
+++ b/weex_core/Source/core/data_render/object.cc
@@ -205,6 +205,11 @@ bool ValueGT(const Value *a, const Value *b) {
     else if (ToNum(a, d1) && ToNum(b, d2)) {
         return NumGT(d1, d2);
     }
+    else if (IsInt(b) && IsString(a)) {
+        int64_t aval = 0;
+        ToInteger(a, 0, aval);
+        return aval > IntValue(b);
+    }
     else {
         return false;
     }
diff --git a/weex_core/Source/core/data_render/vm.cc b/weex_core/Source/core/data_render/vm.cc
index 4e8bde8dbf..036cebbd0d 100644
--- a/weex_core/Source/core/data_render/vm.cc
+++ b/weex_core/Source/core/data_render/vm.cc
@@ -150,6 +150,11 @@ void VM::RunFrame(ExecState *exec_state, Frame frame, Value *ret) {
               int64_t bval = 0;
               ToInteger(b, 0, bval);
               SetIValue(a, static_cast<int>(NUM_OP(/, bval, IntValue(c))));
+          } else if (IsString(c) && IsString(b)) {
+              int64_t bval = 0, cval = 0;
+              ToInteger(b, 0, bval);
+              ToInteger(c, 0, cval);
+              SetIValue(a, static_cast<int>(NUM_OP(/, bval, cval)));
           } else {
               LOGE("Unspport Type[%d,%d] with OP_CODE[OP_DIV]", b->type, c->type);
           }
diff --git a/weex_core/Source/core/data_render/vnode/vnode_exec_env.cc b/weex_core/Source/core/data_render/vnode/vnode_exec_env.cc
index c3a3dd9682..8623ace2a2 100644
--- a/weex_core/Source/core/data_render/vnode/vnode_exec_env.cc
+++ b/weex_core/Source/core/data_render/vnode/vnode_exec_env.cc
@@ -407,8 +407,12 @@ static Value AppendChild(ExecState *exec_state) {
             }
         }
         else if (IsString(childrens) && parent) {
-            LOGD("[VM][VNode][AppendChild]:string:%s\n", CStringValue(childrens));
-            parent->SetAttribute("value", CStringValue(childrens));
+            std::string value = CStringValue(childrens);
+            if (value == "\\ue7f4") {
+                value = "\ue7f4";
+            }
+            LOGD("[VM][VNode][AppendChild]:string:%s\n", value.c_str());
+            parent->SetAttribute("value", value);
         }
         else {
             VNode *children = reinterpret_cast<VNode *>(exec_state->GetArgument(1)->cptr);


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services