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

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, 10 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 7895)
+++ tools/render_pdfs_main.cpp (working copy)
@@ -16,6 +16,10 @@
#include "PdfRenderer.h"
#include "picture_utils.h"
+#ifdef SK_BUILD_FOR_WIN32
+#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;
@@ -232,6 +235,23 @@
return 0;
}
+int tool_main(int argc, char** argv);
+int tool_main(int argc, char** argv) {
borenet 2013/02/28 20:28:19 Why not put this in main() rather than adding anot
edisonn 2013/03/07 19:25:03 compiler does not like try with all that code d:\
+#ifdef SK_BUILD_FOR_WIN32
+ setUpDebuggingFromArgs(argv[0]);
+ __try {
+#endif
+ return tool_main_core(argc, argv);
+#ifdef win
+ }
+ __except(GenerateDumpAndPrintCallstack(GetExceptionInformation()))
+ {
+ SkDebugf("Exception found, please inspect the minidump for more information.\n");
+ }
+ return 0;
+#endif
+}
+
#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