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

Side by Side Diff: handler/win/crashy_test_program.cc

Issue 1432563003: win: crashpad_handler should create its own pipe name in ephemeral mode (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: --help Created 5 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « handler/main.cc ('k') | snapshot/win/exception_snapshot_win_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Crashpad Authors. All rights reserved. 1 // Copyright 2015 The Crashpad Authors. All rights reserved.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 if (!client.StartHandler(base::FilePath(argv[1]), 105 if (!client.StartHandler(base::FilePath(argv[1]),
106 base::FilePath(argv[2]), 106 base::FilePath(argv[2]),
107 std::string(), 107 std::string(),
108 std::map<std::string, std::string>(), 108 std::map<std::string, std::string>(),
109 std::vector<std::string>(), 109 std::vector<std::string>(),
110 false)) { 110 false)) {
111 LOG(ERROR) << "StartHandler"; 111 LOG(ERROR) << "StartHandler";
112 return EXIT_FAILURE; 112 return EXIT_FAILURE;
113 } 113 }
114 } else { 114 } else {
115 fprintf(stderr, "Usage: %s <server_pipe_name>\n", argv[0]); 115 fprintf(stderr, "Usage: %ls <server_pipe_name>\n", argv[0]);
116 fprintf(stderr, " %s <handler_path> <database_path>\n", argv[0]); 116 fprintf(stderr, " %ls <handler_path> <database_path>\n", argv[0]);
117 return EXIT_FAILURE; 117 return EXIT_FAILURE;
118 } 118 }
119 119
120 if (!client.UseHandler()) { 120 if (!client.UseHandler()) {
121 LOG(ERROR) << "UseHandler"; 121 LOG(ERROR) << "UseHandler";
122 return EXIT_FAILURE; 122 return EXIT_FAILURE;
123 } 123 }
124 124
125 AllocateMemoryOfVariousProtections(); 125 AllocateMemoryOfVariousProtections();
126 126
127 if (InitializeCriticalSectionWithDebugInfoIfPossible( 127 if (InitializeCriticalSectionWithDebugInfoIfPossible(
128 &g_test_critical_section)) { 128 &g_test_critical_section)) {
129 EnterCriticalSection(&g_test_critical_section); 129 EnterCriticalSection(&g_test_critical_section);
130 } 130 }
131 131
132 SomeCrashyFunction(); 132 SomeCrashyFunction();
133 133
134 return EXIT_SUCCESS; 134 return EXIT_SUCCESS;
135 } 135 }
136 136
137 } // namespace 137 } // namespace
138 } // namespace crashpad 138 } // namespace crashpad
139 139
140 int wmain(int argc, wchar_t* argv[]) { 140 int wmain(int argc, wchar_t* argv[]) {
141 return crashpad::CrashyMain(argc, argv); 141 return crashpad::CrashyMain(argc, argv);
142 } 142 }
OLDNEW
« no previous file with comments | « handler/main.cc ('k') | snapshot/win/exception_snapshot_win_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698