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

Unified Diff: tools/render_pdfs_main.cpp

Issue 12387018: collect minidump if it chrashes (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 9 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 | « gyp/tools.gyp ('k') | tools/win_dbghelp.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/render_pdfs_main.cpp
===================================================================
--- tools/render_pdfs_main.cpp (revision 8016)
+++ tools/render_pdfs_main.cpp (working copy)
@@ -16,6 +16,10 @@
#include "PdfRenderer.h"
#include "picture_utils.h"
+#ifdef SK_USE_CDB
+#include "win_dbghelp.h"
+#endif
+
/**
* render_pdfs
*
@@ -207,9 +211,8 @@
}
}
-int tool_main(int argc, char** argv);
-int tool_main(int argc, char** argv) {
-
+int tool_main_core(int argc, char** argv);
+int tool_main_core(int argc, char** argv) {
SkAutoGraphics ag;
SkTArray<SkString> inputs;
@@ -229,9 +232,27 @@
SkDebugf("Failed to render %i PDFs.\n", failures);
return 1;
}
+
return 0;
}
+int tool_main(int argc, char** argv);
+int tool_main(int argc, char** argv) {
+#ifdef SK_USE_CDB
+ setUpDebuggingFromArgs(argv[0]);
+ __try {
+#endif
+ return tool_main_core(argc, argv);
+#ifdef SK_USE_CDB
+ }
+ __except(GenerateDumpAndPrintCallstack(GetExceptionInformation()))
+ {
+ return -1;
+ }
+#endif
+ return 0;
+}
+
#if !defined SK_BUILD_FOR_IOS
int main(int argc, char * const argv[]) {
return tool_main(argc, (char**) argv);
« no previous file with comments | « gyp/tools.gyp ('k') | tools/win_dbghelp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698