WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
17153
wxFont objects become invalid and cause a crash
https://bugs.webkit.org/show_bug.cgi?id=17153
Summary
wxFont objects become invalid and cause a crash
Kevin Watters
Reported
2008-02-02 11:21:57 PST
The wxFont objects used in FontPlatformDataWx.h and FontPlatformDataWx.cpp are reference counted value objects meant to be used on the stack. Using a pointer to store them in FontPlatformData objects is causing sporadic crashes.
Attachments
FontPlatformData uses wxFont as a value object
(8.73 KB, patch)
2008-02-02 11:26 PST
,
Kevin Watters
kevino
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Kevin Watters
Comment 1
2008-02-02 11:26:59 PST
Created
attachment 18869
[details]
FontPlatformData uses wxFont as a value object Fixes FontPlatformData issues. Reference counting of wxFont objects happens correctly now because they are stored as value objects. An enum is used to maintain the "uninitialized," "deleted," and "valid" states since all three are used by a HashTable holding FontPlatformData objects. computeHash now uses a hash of the string returned by wxFont::GetNativeInfoDesc, which uniquely identifies a wxFont and all its attributes. Additionally, a missing delete in ImageWx.cpp is added.
Kevin Ollivier
Comment 2
2008-02-02 11:50:29 PST
Comment on
attachment 18869
[details]
FontPlatformData uses wxFont as a value object Looks good. This patch does resolve crashes I've been seeing related to fonts on my machine as well.
Kevin Ollivier
Comment 3
2008-02-02 12:39:41 PST
Landed in
r29940
. THanks!
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