diff options
Diffstat (limited to 'fxjs/xfa/cjx_list.cpp')
-rw-r--r-- | fxjs/xfa/cjx_list.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/fxjs/xfa/cjx_list.cpp b/fxjs/xfa/cjx_list.cpp index 9cbd32d352..27a4315d5f 100644 --- a/fxjs/xfa/cjx_list.cpp +++ b/fxjs/xfa/cjx_list.cpp @@ -36,7 +36,8 @@ CJS_Return CJX_List::append(CJS_V8* runtime, if (params.size() != 1) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); - auto* pNode = ToNode(runtime->ToXFAObject(params[0])); + auto* pNode = + ToNode(static_cast<CFXJSE_Engine*>(runtime)->ToXFAObject(params[0])); if (!pNode) return CJS_Return(JSGetStringFromID(JSMessage::kValueError)); @@ -49,11 +50,13 @@ CJS_Return CJX_List::insert(CJS_V8* runtime, if (params.size() != 2) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); - auto* pNewNode = ToNode(runtime->ToXFAObject(params[0])); + auto* pNewNode = + ToNode(static_cast<CFXJSE_Engine*>(runtime)->ToXFAObject(params[0])); if (!pNewNode) return CJS_Return(JSGetStringFromID(JSMessage::kValueError)); - auto* pBeforeNode = ToNode(runtime->ToXFAObject(params[1])); + auto* pBeforeNode = + ToNode(static_cast<CFXJSE_Engine*>(runtime)->ToXFAObject(params[1])); GetXFAList()->Insert(pNewNode, pBeforeNode); return CJS_Return(true); } @@ -63,7 +66,8 @@ CJS_Return CJX_List::remove(CJS_V8* runtime, if (params.size() != 1) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); - auto* pNode = ToNode(runtime->ToXFAObject(params[0])); + auto* pNode = + ToNode(static_cast<CFXJSE_Engine*>(runtime)->ToXFAObject(params[0])); if (!pNode) return CJS_Return(JSGetStringFromID(JSMessage::kValueError)); @@ -81,7 +85,7 @@ CJS_Return CJX_List::item(CJS_V8* runtime, if (index < 0 || cast_index >= GetXFAList()->GetLength()) return CJS_Return(JSGetStringFromID(JSMessage::kInvalidInputError)); - return CJS_Return(runtime->NewXFAObject( + return CJS_Return(static_cast<CFXJSE_Engine*>(runtime)->NewXFAObject( GetXFAList()->Item(cast_index), GetDocument()->GetScriptContext()->GetJseNormalClass()->GetTemplate())); } |