Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(296)

Issue 14907005: Check whether font creation is failed to avoid segment fault. (Closed)

Created:
7 years, 7 months ago by yunchao
Modified:
7 years, 7 months ago
Reviewers:
bungeman-skia, reed1
CC:
skia-review_googlegroups.com
Visibility:
Public.

Description

Check whether font creation is failed to avoid segment fault. In some rare cases, SkFontHost::CreateTypeface in src/ports/SkFontHost_fontconfig.cpp will return NULL, this will lead to segment fault because the previous code would access to 0x0 by (SkTypeface *)NULL->unref(). BUG= Committed: http://code.google.com/p/skia/source/detail?r=9034

Patch Set 1 #

Patch Set 2 : remove the tab instead of spaces #

Patch Set 3 : remove unnessary lines #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : #

Patch Set 8 : #

Total comments: 1

Patch Set 9 : use SkSafeUnref instead of unref directly to avoid segmentation fault #

Patch Set 10 : #

Patch Set 11 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -1 line) Patch
M tests/FontHostStreamTest.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 7 (0 generated)
yunchao
7 years, 7 months ago (2013-05-03 11:55:07 UTC) #1
bungeman-skia
https://codereview.chromium.org/14907005/diff/1002/tests/FontHostStreamTest.cpp File tests/FontHostStreamTest.cpp (right): https://codereview.chromium.org/14907005/diff/1002/tests/FontHostStreamTest.cpp#newcode75 tests/FontHostStreamTest.cpp:75: SkTypeface* font = I think this just needs to ...
7 years, 7 months ago (2013-05-03 14:11:41 UTC) #2
yunchao
On 2013/05/03 14:11:41, bungeman1 wrote: > https://codereview.chromium.org/14907005/diff/1002/tests/FontHostStreamTest.cpp > File tests/FontHostStreamTest.cpp (right): > > https://codereview.chromium.org/14907005/diff/1002/tests/FontHostStreamTest.cpp#newcode75 > ...
7 years, 7 months ago (2013-05-06 05:31:27 UTC) #3
bungeman-skia
I like Patch Set 9 the best, but Patch Set 11 is also ok. lgtm
7 years, 7 months ago (2013-05-06 14:01:30 UTC) #4
yunchao
On 2013/05/06 14:01:30, bungeman1 wrote: > I like Patch Set 9 the best, but Patch ...
7 years, 7 months ago (2013-05-07 14:06:15 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/yunchao.he@intel.com/14907005/19002
7 years, 7 months ago (2013-05-07 14:06:57 UTC) #6
commit-bot: I haz the power
7 years, 7 months ago (2013-05-07 14:33:02 UTC) #7
Message was sent while issue was closed.
Change committed as 9034

Powered by Google App Engine
This is Rietveld 408576698