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

Issue 2734333005: RenderTextMac: Fix crash when passed an invalid font. (Closed)

Created:
3 years, 9 months ago by karandeepb
Modified:
3 years, 9 months ago
CC:
chromium-reviews, mac-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

RenderTextMac: Fix crash when passed an invalid font. RenderTextMac currently crashes when rendering text if it is passed a FontList with a nil native font. This can generally happen if the Font used was created from a font name. This CL modifies RenderTextMac to ensure that if an invalid font list is passed, the default font list (or a font list derived from it) is used instead. Also added a unit test which fails on master and demonstrates the problem. BUG=668058, 368192 Review-Url: https://codereview.chromium.org/2734333005 Cr-Commit-Position: refs/heads/master@{#455833} Committed: https://chromium.googlesource.com/chromium/src/+/d8958dbde3315979308abe86880cba48879f010c

Patch Set 1 #

Total comments: 1

Patch Set 2 : Nits. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+49 lines, -1 line) Patch
M ui/gfx/render_text.h View 1 chunk +1 line, -1 line 0 comments Download
M ui/gfx/render_text_mac.h View 1 chunk +1 line, -0 lines 0 comments Download
M ui/gfx/render_text_mac.mm View 1 3 chunks +30 lines, -0 lines 0 comments Download
M ui/gfx/render_text_unittest.cc View 1 1 chunk +17 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (10 generated)
karandeepb
PTAL asvitkine@. For more context, please see my comments on issue 668058. https://codereview.chromium.org/2734333005/diff/1/ui/gfx/render_text_mac.mm File ui/gfx/render_text_mac.mm ...
3 years, 9 months ago (2017-03-09 01:33:32 UTC) #8
Alexei Svitkine (slow)
lgtm
3 years, 9 months ago (2017-03-09 16:08:16 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2734333005/30001
3 years, 9 months ago (2017-03-09 18:33:36 UTC) #11
commit-bot: I haz the power
3 years, 9 months ago (2017-03-09 19:44:04 UTC) #14
Message was sent while issue was closed.
Committed patchset #2 (id:30001) as
https://chromium.googlesource.com/chromium/src/+/d8958dbde3315979308abe86880c...

Powered by Google App Engine
This is Rietveld 408576698