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

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: It's futile to pick and choose errors, retry on all 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
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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 } else if (argc == 3) { 104 } else if (argc == 3) {
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 LOG(ERROR) << "StartHandler"; 110 LOG(ERROR) << "StartHandler";
111 return EXIT_FAILURE; 111 return EXIT_FAILURE;
112 } 112 }
113 } else { 113 } else {
114 fprintf(stderr, "Usage: %s <server_pipe_name>\n", argv[0]); 114 fprintf(stderr, "Usage: %ls <server_pipe_name>\n", argv[0]);
115 fprintf(stderr, " %s <handler_path> <database_path>\n", argv[0]); 115 fprintf(stderr, " %ls <handler_path> <database_path>\n", argv[0]);
116 return EXIT_FAILURE; 116 return EXIT_FAILURE;
117 } 117 }
118 118
119 if (!client.UseHandler()) { 119 if (!client.UseHandler()) {
120 LOG(ERROR) << "UseHandler"; 120 LOG(ERROR) << "UseHandler";
121 return EXIT_FAILURE; 121 return EXIT_FAILURE;
122 } 122 }
123 123
124 AllocateMemoryOfVariousProtections(); 124 AllocateMemoryOfVariousProtections();
125 125
126 if (InitializeCriticalSectionWithDebugInfoIfPossible( 126 if (InitializeCriticalSectionWithDebugInfoIfPossible(
127 &g_test_critical_section)) { 127 &g_test_critical_section)) {
128 EnterCriticalSection(&g_test_critical_section); 128 EnterCriticalSection(&g_test_critical_section);
129 } 129 }
130 130
131 SomeCrashyFunction(); 131 SomeCrashyFunction();
132 132
133 return EXIT_SUCCESS; 133 return EXIT_SUCCESS;
134 } 134 }
135 135
136 } // namespace 136 } // namespace
137 } // namespace crashpad 137 } // namespace crashpad
138 138
139 int wmain(int argc, wchar_t* argv[]) { 139 int wmain(int argc, wchar_t* argv[]) {
140 return crashpad::CrashyMain(argc, argv); 140 return crashpad::CrashyMain(argc, argv);
141 } 141 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698