WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
25760
Font leak in Chromium's Skia backend.
https://bugs.webkit.org/show_bug.cgi?id=25760
Summary
Font leak in Chromium's Skia backend.
Evan Martin
Reported
2009-05-13 14:09:00 PDT
Valgrind found this:
http://code.google.com/p/chromium/issues/detail?id=9475
Attachments
fix some stuff
(1.56 KB, patch)
2009-05-13 14:13 PDT
,
Evan Martin
fishd
: review-
Details
Formatted Diff
Diff
fix
(1.54 KB, patch)
2009-05-13 16:13 PDT
,
Evan Martin
fishd
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Evan Martin
Comment 1
2009-05-13 14:13:14 PDT
Created
attachment 30285
[details]
fix some stuff WebCore/ChangeLog | 11 +++++++++++ .../platform/graphics/chromium/FontCacheLinux.cpp | 5 ++--- 2 files changed, 13 insertions(+), 3 deletions(-)
Evan Martin
Comment 2
2009-05-13 14:14:51 PDT
Please note that I don't really know what I'm doing, so review carefully.
Evan Martin
Comment 3
2009-05-13 14:28:16 PDT
I apologize for not quite getting the review process right, but from some offline discussion it appears Brett is the right reviewer. Brett, agl wrote the code but he'd never seen these getCachedFont* bits. As our font man, what do you think?
Brett Wilson (Google)
Comment 4
2009-05-13 15:24:05 PDT
Comment on
attachment 30285
[details]
fix some stuff I believe this is the way it's supposed to work, it's what we do on Windows.
> - FontPlatformData* fpd = > - createFontPlatformData(font.fontDescription(), AtomicString((char*) family)); > - ret = new SimpleFontData(*fpd); > + FontPlatformData* fpd = getCachedFontPlatformData(font.fontDescription(), AtomicString((char*) family), false); > + ret = getCachedFontData(fpd);
Is it WebKit style to require static_cast? Brett
Darin Fisher (:fishd, Google)
Comment 5
2009-05-13 15:54:20 PDT
Comment on
attachment 30285
[details]
fix some stuff
> +2009-05-13 Evan Martin <
evan@chromium.org
> > + > + Reviewed by Darin Fisher <
darin@chromium.org
>. > + > + Fix a font-related leak in Chromium's Skia backend found by Valgrind. > +
http://code.google.com/p/chromium/issues/detail?id=9475
Please add a reference to the bugs.webkit.org bug instead. In that bug you should/may refer to the chromium bug. yes, static_cast for the win!
Evan Martin
Comment 6
2009-05-13 16:04:06 PDT
static_cast where?
Evan Martin
Comment 7
2009-05-13 16:13:47 PDT
Created
attachment 30294
[details]
fix WebCore/ChangeLog | 11 +++++++++++ .../platform/graphics/chromium/FontCacheLinux.cpp | 5 ++--- 2 files changed, 13 insertions(+), 3 deletions(-)
Eric Seidel (no email)
Comment 8
2009-05-13 16:25:01 PDT
Comment on
attachment 30294
[details]
fix WebKit style guidelines: "Use full words, except in the rare case where an abbreviation would be more canonical and easier to understand." I would re-write this block: + FontPlatformData* fpd = getCachedFontPlatformData(font.fontDescription(), AtomicString(reinterpret_cast<char*>(family)), false); + ret = getCachedFontData(fpd); as: AtomicString fontFamily(reinterpret_cast<char*>(family)); ret = getCachedFontData(getCachedFontPlatformData(font.fontDescription(), fontFamily), false) or as platformData = Otherwise looks fine. I can fix it an land for you.
Eric Seidel (no email)
Comment 9
2009-05-13 16:30:01 PDT
review collision it would appear. Stupid bugzilla.
Evan Martin
Comment 10
2009-05-13 16:42:28 PDT
Please feel free to munge at will. (In my defense, note that both the C-style cast and the "ret" were there before my change...)
Eric Seidel (no email)
Comment 11
2009-05-15 00:02:43 PDT
Committing to
http://svn.webkit.org/repository/webkit/trunk
... M WebCore/ChangeLog M WebCore/platform/graphics/chromium/FontCacheLinux.cpp Committed
r43756
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug