diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-02-08 10:05:05 -0500 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-02-09 15:55:20 +0000 |
commit | 21e954b59fcef1b84fdcdb9ae337e2d4c060b19e (patch) | |
tree | 2053cd0a8b0d4c1bb6903db3aa6f753a23afedcf /xfa/fde/css/cfde_csssyntaxparser.h | |
parent | 1b08df18300bbc67dabd12fb35ab6ce1732a1024 (diff) | |
download | pdfium-21e954b59fcef1b84fdcdb9ae337e2d4c060b19e.tar.xz |
Remove CopyToLocal from CFDE_CSSDeclaration
This CL removes the CopyToLocal method and creates CFX_WideString's directly.
This fixes several memory leaks as the CopyToLocal strings were not cleaned
up correctly.
Change-Id: Ie5ba4cdc4d713cd0b8e3fb85e02f27dc09f38af1
Reviewed-on: https://pdfium-review.googlesource.com/2553
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fde/css/cfde_csssyntaxparser.h')
-rw-r--r-- | xfa/fde/css/cfde_csssyntaxparser.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xfa/fde/css/cfde_csssyntaxparser.h b/xfa/fde/css/cfde_csssyntaxparser.h index 19a48e2b61..b583b98b15 100644 --- a/xfa/fde/css/cfde_csssyntaxparser.h +++ b/xfa/fde/css/cfde_csssyntaxparser.h @@ -45,7 +45,7 @@ class CFDE_CSSSyntaxParser { int32_t iTextDatSize = 32, bool bOnlyDeclaration = false); FDE_CSSSyntaxStatus DoSyntaxParse(); - const FX_WCHAR* GetCurrentString(int32_t& iLength) const; + CFX_WideStringC GetCurrentString() const; protected: void Reset(bool bOnlyDeclaration); @@ -64,7 +64,7 @@ class CFDE_CSSSyntaxParser { CFDE_CSSTextBuf m_TextData; CFDE_CSSTextBuf m_TextPlane; - int32_t m_iTextDatLen; + int32_t m_iTextDataLen; uint32_t m_dwCheck; FDE_CSSSyntaxMode m_eMode; FDE_CSSSyntaxStatus m_eStatus; |