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

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
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_BUILD_FOR_WIN32
borenet 2013/03/07 20:22:39 Shouldn't this be #ifdef SK_USE_CDB ?
edisonn 2013/03/07 20:43:42 Done.
+#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
borenet 2013/03/07 20:22:39 Can we insert this stuff directly into tool_main w
edisonn 2013/03/07 20:43:42 If I do that, I get compile errors because of the
+ return 0;
+}
+
#if !defined SK_BUILD_FOR_IOS
int main(int argc, char * const argv[]) {
return tool_main(argc, (char**) argv);

Powered by Google App Engine
This is Rietveld 408576698