diff options
author | vandebo@chromium.org <vandebo@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-09-27 19:49:57 +0000 |
---|---|---|
committer | vandebo@chromium.org <vandebo@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-09-27 19:49:57 +0000 |
commit | f8897e8d5b8bce177caeb89abe5d8ccb360da2c1 (patch) | |
tree | 9beab4692ef4b05844937b8c60f26598f36afc57 /src/ports | |
parent | f65dfbf4e5dd75cc89d4dfafcd964815ea1bf364 (diff) |
Add debug trap to track down crash.
Original CL by arthurhsu: http://codereview.appspot.com/5144046/
BUG=CR 94421
Review URL: http://codereview.appspot.com/5132051
git-svn-id: http://skia.googlecode.com/svn/trunk@2344 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/ports')
-rwxr-xr-x | src/ports/SkFontHost_win.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ports/SkFontHost_win.cpp b/src/ports/SkFontHost_win.cpp index abccbe8778..4f0b9aac24 100755 --- a/src/ports/SkFontHost_win.cpp +++ b/src/ports/SkFontHost_win.cpp @@ -978,12 +978,22 @@ SkAdvancedTypefaceMetrics* SkFontHost::GetAdvancedTypefaceMetrics( OUTLINETEXTMETRIC otm; if (!GetOutlineTextMetrics(hdc, sizeof(otm), &otm) || !GetTextFace(hdc, LF_FACESIZE, lf.lfFaceName)) { + // TODO(arthurhsu): remove after resolving http://crbug.com/94421 + DWORD error_code = GetLastError(); + SK_DEBUGBREAK(error_code == 0); // Possibly caused by sandboxing. + SK_DEBUGBREAK(false); // GDI corruption. + goto Error; } lf.lfHeight = -SkToS32(otm.otmEMSquare); designFont = CreateFontIndirect(&lf); SelectObject(hdc, designFont); if (!GetOutlineTextMetrics(hdc, sizeof(otm), &otm)) { + // TODO(arthurhsu): remove after resolving http://crbug.com/94421 + DWORD error_code = GetLastError(); + SK_DEBUGBREAK(error_code == 0); // Possibly caused by sandboxing. + SK_DEBUGBREAK(false); // GDI corruption. + goto Error; } const unsigned glyphCount = calculateGlyphCount(hdc); |