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

Commit

Permalink
[core] bugfix dom module register error and '\xxxxxx' error (#1582)
Browse files Browse the repository at this point in the history
  • Loading branch information
yxping authored and YorkShen committed Sep 26, 2018
1 parent 584374e commit 4652d7f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
4 changes: 0 additions & 4 deletions ios/sdk/WeexSDK/Sources/Bridge/WXCoreBridge.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
5 changes: 5 additions & 0 deletions weex_core/Source/core/data_render/object.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
5 changes: 5 additions & 0 deletions weex_core/Source/core/data_render/vm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
8 changes: 6 additions & 2 deletions weex_core/Source/core/data_render/vnode/vnode_exec_env.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4652d7f

Please sign in to comment.