summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authoragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-31 22:09:34 +0000
committeragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-31 22:09:34 +0000
commit3ac8f67724a0de9a2812140a12884fe03618c44c (patch)
tree7138ed99f41545dc169c2bafc03073e32dc99c8e /chrome
parent556f790a4e67f95023bdd55dcf2acab48b9f16ac (diff)
downloadchromium_src-3ac8f67724a0de9a2812140a12884fe03618c44c.zip
chromium_src-3ac8f67724a0de9a2812140a12884fe03618c44c.tar.gz
chromium_src-3ac8f67724a0de9a2812140a12884fe03618c44c.tar.bz2
Linux: fix segfault on exit
Skia doesn't have a scoped_refptr, it has AutoUnref. The difference is that the latter doesn't take a reference, it only deletes them. Thus we need to increment the reference count manually when creating them. BUG=9592 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12909 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-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 c77b5b9..096513a 100644
--- a/chrome/common/gfx/chrome_font_skia.cc
+++ b/chrome/common/gfx/chrome_font_skia.cc
@@ -26,6 +26,7 @@ ChromeFont::ChromeFont(SkTypeface* tf, const std::wstring& font_name,
font_name_(font_name),
font_size_(font_size),
style_(style) {
+ tf->ref();
calculateMetrics();
}