From aee28693976cc246eea8230a999906802e52cab7 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Tue, 14 Nov 2017 21:19:44 +0000 Subject: Cleanup XFA default value code This CL adds helper methods to CXFA_Node to retrieve the default values for attributes with the correct data types. Change-Id: I644435b4b430819f1060a95fa4fffe4ba2826cfe Reviewed-on: https://pdfium-review.googlesource.com/18450 Reviewed-by: Tom Sepez Commit-Queue: dsinclair --- fxjs/cfxjse_engine.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fxjs/cfxjse_engine.cpp') diff --git a/fxjs/cfxjse_engine.cpp b/fxjs/cfxjse_engine.cpp index 633966173a..eb76ef1c57 100644 --- a/fxjs/cfxjse_engine.cpp +++ b/fxjs/cfxjse_engine.cpp @@ -501,11 +501,11 @@ bool CFXJSE_Engine::RunVariablesScript(CXFA_Node* pScriptNode) { if (!pTextNode) return false; - WideStringView wsScript; + WideString wsScript; if (!pTextNode->JSNode()->TryCData(XFA_Attribute::Value, wsScript, true)) return false; - ByteString btScript = FX_UTF8Encode(wsScript); + ByteString btScript = wsScript.UTF8Encode(); auto hRetValue = pdfium::MakeUnique(m_pIsolate); CXFA_Node* pThisObject = pParent->GetNodeItem(XFA_NODEITEM_Parent); CFXJSE_Context* pVariablesContext = -- cgit v1.2.3