summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_node.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/parser/cxfa_node.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_node.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/xfa/fxfa/parser/cxfa_node.cpp b/xfa/fxfa/parser/cxfa_node.cpp
index 16062f7b6f..5dd6c52717 100644
--- a/xfa/fxfa/parser/cxfa_node.cpp
+++ b/xfa/fxfa/parser/cxfa_node.cpp
@@ -1441,13 +1441,16 @@ void CXFA_Node::Script_NodeClass_SaveXML(CFXJSE_Arguments* pArguments) {
}
XFA_DataExporter_DealWithDataGroupNode(this);
}
- std::unique_ptr<IFX_MemoryStream, ReleaseDeleter<IFX_MemoryStream>>
- pMemoryStream(IFX_MemoryStream::Create(true));
+ CFX_RetainPtr<IFX_MemoryStream> pMemoryStream =
+ IFX_MemoryStream::Create(true);
+
+ // Note: ambiguious below without static_cast.
std::unique_ptr<IFGAS_Stream, ReleaseDeleter<IFGAS_Stream>> pStream(
IFGAS_Stream::CreateStream(
- static_cast<IFX_SeekableWriteStream*>(pMemoryStream.get()),
+ CFX_RetainPtr<IFX_SeekableWriteStream>(pMemoryStream),
FX_STREAMACCESS_Text | FX_STREAMACCESS_Write |
FX_STREAMACCESS_Append));
+
if (!pStream) {
pArguments->GetReturnValue()->SetString(bsXMLHeader);
return;