summaryrefslogtreecommitdiffstats
path: root/chrome/common/gfx
diff options
context:
space:
mode:
authordkegel@google.com <dkegel@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-14 00:05:41 +0000
committerdkegel@google.com <dkegel@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-14 00:05:41 +0000
commit07f9e165a769c9fccd73b9e80938bb0ec51414af (patch)
tree70b619801022223570ec6fbf6d000df82a97a5b7 /chrome/common/gfx
parent171c51db572d1124a3499ecce8e778b2b7b23b44 (diff)
downloadchromium_src-07f9e165a769c9fccd73b9e80938bb0ec51414af.zip
chromium_src-07f9e165a769c9fccd73b9e80938bb0ec51414af.tar.gz
chromium_src-07f9e165a769c9fccd73b9e80938bb0ec51414af.tar.bz2
Fix refcounting bug in ChromeFont's default constructor.
Found via valgrind. Review URL: http://codereview.chromium.org/47001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11689 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/gfx')
-rw-r--r--chrome/common/gfx/chrome_font_skia.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/chrome/common/gfx/chrome_font_skia.cc b/chrome/common/gfx/chrome_font_skia.cc
index bd83a61..c77b5b9 100644
--- a/chrome/common/gfx/chrome_font_skia.cc
+++ b/chrome/common/gfx/chrome_font_skia.cc
@@ -58,6 +58,7 @@ void ChromeFont::calculateMetrics() {
void ChromeFont::CopyChromeFont(const ChromeFont& other) {
typeface_helper_.reset(new SkAutoUnref(other.typeface_));
typeface_ = other.typeface_;
+ typeface_->ref();
font_name_ = other.font_name_;
font_size_ = other.font_size_;
style_ = other.style_;