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

Unified Diff: src/utils/win/SkHRESULT.cpp

Issue 298863002: Fix undefined behavior in DirectWrite GDI compatible metrics. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 7 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 | « src/ports/SkFontHost_win_dw.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/win/SkHRESULT.cpp
===================================================================
--- src/utils/win/SkHRESULT.cpp (revision 14827)
+++ src/utils/win/SkHRESULT.cpp (working copy)
@@ -9,10 +9,11 @@
#include "SkHRESULT.h"
-void SkTraceHR(const char* file, unsigned long line,
- HRESULT hr, const char* msg) {
- SkDEBUGCODE(if (NULL != msg) SkDEBUGF(("%s\n", msg)));
- SkDEBUGF(("%s(%lu) : error 0x%x: ", file, line, hr));
+void SkTraceHR(const char* file, unsigned long line, HRESULT hr, const char* msg) {
+ if (NULL != msg) {
+ SkDebugf("%s\n", msg);
+ }
+ SkDebugf("%s(%lu) : error 0x%x: ", file, line, hr);
LPSTR errorText = NULL;
FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER |
@@ -27,9 +28,9 @@
);
if (NULL == errorText) {
- SkDEBUGF(("<unknown>\n"));
+ SkDebugf("<unknown>\n");
} else {
- SkDEBUGF(("%s", errorText));
+ SkDebugf("%s", errorText);
LocalFree(errorText);
errorText = NULL;
}
« no previous file with comments | « src/ports/SkFontHost_win_dw.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698