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

Unified Diff: Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp

Issue 11808004: Merge 138994 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1364/
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/canvas/canvas-measureText-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp
===================================================================
--- Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp (revision 139058)
+++ Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp (working copy)
@@ -2373,8 +2373,13 @@
{
canvas()->document()->updateStyleIfNeeded();
- if (!state().m_realizedFont)
- setFont(state().m_unparsedFont);
+ if (!state().m_realizedFont) {
+ // Create temporary string object to hold ref count in case
+ // state().m_unparsedFont in unreffed by call to realizeSaves in
+ // setFont.
+ String unparsedFont(state().m_unparsedFont);
+ setFont(unparsedFont);
+ }
return state().m_font;
}
« no previous file with comments | « LayoutTests/fast/canvas/canvas-measureText-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698