From 690d456ad54f021063dcc17fde27c7ba4d910717 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Thu, 18 May 2017 11:42:46 -0700 Subject: Use UnownedPtr to check CFX_*StringC lifetimes Change interform to avoid temp StringC with dangling ptr. Change-Id: I8d8659973bcdf2cdbcaa6efa6012e4acce5f1604 Reviewed-on: https://pdfium-review.googlesource.com/5571 Commit-Queue: Tom Sepez Reviewed-by: Lei Zhang --- xfa/fxfa/fm2js/cxfa_fmlexer.cpp | 2 ++ xfa/fxfa/fm2js/cxfa_fmlexer.h | 1 + 2 files changed, 3 insertions(+) (limited to 'xfa/fxfa/fm2js') 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; -- cgit v1.2.3