summaryrefslogtreecommitdiff
path: root/xfa/fde/css/cfde_csscustomproperty.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-02-08 10:05:05 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-02-09 15:55:20 +0000
commit21e954b59fcef1b84fdcdb9ae337e2d4c060b19e (patch)
tree2053cd0a8b0d4c1bb6903db3aa6f753a23afedcf /xfa/fde/css/cfde_csscustomproperty.cpp
parent1b08df18300bbc67dabd12fb35ab6ce1732a1024 (diff)
downloadpdfium-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_csscustomproperty.cpp')
-rw-r--r--xfa/fde/css/cfde_csscustomproperty.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/xfa/fde/css/cfde_csscustomproperty.cpp b/xfa/fde/css/cfde_csscustomproperty.cpp
new file mode 100644
index 0000000000..92b288eb4f
--- /dev/null
+++ b/xfa/fde/css/cfde_csscustomproperty.cpp
@@ -0,0 +1,15 @@
+// Copyright 2017 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "xfa/fde/css/cfde_csscustomproperty.h"
+
+CFDE_CSSCustomProperty::CFDE_CSSCustomProperty(const CFX_WideString& name,
+ const CFX_WideString& value)
+ : name_(name), value_(value) {}
+
+CFDE_CSSCustomProperty::CFDE_CSSCustomProperty(
+ const CFDE_CSSCustomProperty& prop)
+ : name_(prop.name_), value_(prop.value_) {}
+
+CFDE_CSSCustomProperty::~CFDE_CSSCustomProperty() {}