summaryrefslogtreecommitdiff
path: root/xfa/fxfa/fm2js
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-05-18 11:42:46 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-05-18 19:22:52 +0000
commit690d456ad54f021063dcc17fde27c7ba4d910717 (patch)
tree75ff5c3a11aa2f1cfc739e20179a8640bd0baae9 /xfa/fxfa/fm2js
parente6792f9901267b2b65611e94713462bc9d0b5191 (diff)
downloadpdfium-690d456ad54f021063dcc17fde27c7ba4d910717.tar.xz
Use UnownedPtr to check CFX_*StringC lifetimeschromium/3104
Change interform to avoid temp StringC with dangling ptr. Change-Id: I8d8659973bcdf2cdbcaa6efa6012e4acce5f1604 Reviewed-on: https://pdfium-review.googlesource.com/5571 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'xfa/fxfa/fm2js')
-rw-r--r--xfa/fxfa/fm2js/cxfa_fmlexer.cpp2
-rw-r--r--xfa/fxfa/fm2js/cxfa_fmlexer.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/xfa/fxfa/fm2js/cxfa_fmlexer.cpp b/xfa/fxfa/fm2js/cxfa_fmlexer.cpp
index db7cc956e8..433839a88c 100644
--- a/xfa/fxfa/fm2js/cxfa_fmlexer.cpp
+++ b/xfa/fxfa/fm2js/cxfa_fmlexer.cpp
@@ -94,6 +94,8 @@ CXFA_FMToken::CXFA_FMToken() : m_type(TOKreserver), m_uLinenum(1) {}
CXFA_FMToken::CXFA_FMToken(uint32_t uLineNum)
: m_type(TOKreserver), m_uLinenum(uLineNum) {}
+CXFA_FMToken::~CXFA_FMToken() {}
+
CXFA_FMLexer::CXFA_FMLexer(const CFX_WideStringC& wsFormCalc)
: m_ptr(wsFormCalc.c_str()),
m_end(m_ptr + wsFormCalc.GetLength() - 1),
diff --git a/xfa/fxfa/fm2js/cxfa_fmlexer.h b/xfa/fxfa/fm2js/cxfa_fmlexer.h
index f4f8a68d8c..3b5b3727e7 100644
--- a/xfa/fxfa/fm2js/cxfa_fmlexer.h
+++ b/xfa/fxfa/fm2js/cxfa_fmlexer.h
@@ -95,6 +95,7 @@ class CXFA_FMToken {
public:
CXFA_FMToken();
explicit CXFA_FMToken(uint32_t uLineNum);
+ ~CXFA_FMToken();
CFX_WideStringC m_wstring;
XFA_FM_TOKEN m_type;