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

Side by Side Diff: client/simulate_crash_mac_test.cc

Issue 756803002: Add a ReceiveLarge parameter to MachMessageServer::Run() (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 6 years 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 | « no previous file | snapshot/mac/mach_o_image_annotations_reader_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 2014 The Crashpad Authors. All rights reserved. 1 // Copyright 2014 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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 // The client has registered EXC_CRASH handlers for both its thread and 240 // The client has registered EXC_CRASH handlers for both its thread and
241 // task targets. Run a server that will return a failure code when the 241 // task targets. Run a server that will return a failure code when the
242 // exception message is sent to the thread target, which will cause the 242 // exception message is sent to the thread target, which will cause the
243 // client to fall back to the task target and send another message. 243 // client to fall back to the task target and send another message.
244 succeed_ = false; 244 succeed_ = false;
245 mr = MachMessageServer::Run(this, 245 mr = MachMessageServer::Run(this,
246 LocalPort(), 246 LocalPort(),
247 MACH_MSG_OPTION_NONE, 247 MACH_MSG_OPTION_NONE,
248 MachMessageServer::kOneShot, 248 MachMessageServer::kOneShot,
249 MachMessageServer::kBlocking, 249 MachMessageServer::kBlocking,
250 MachMessageServer::kReceiveLargeError,
250 MACH_MSG_TIMEOUT_NONE); 251 MACH_MSG_TIMEOUT_NONE);
251 EXPECT_EQ(MACH_MSG_SUCCESS, mr) 252 EXPECT_EQ(MACH_MSG_SUCCESS, mr)
252 << MachErrorMessage(mr, "MachMessageServer::Run"); 253 << MachErrorMessage(mr, "MachMessageServer::Run");
253 } 254 }
254 255
255 succeed_ = true; 256 succeed_ = true;
256 mr = MachMessageServer::Run(this, 257 mr = MachMessageServer::Run(this,
257 LocalPort(), 258 LocalPort(),
258 MACH_MSG_OPTION_NONE, 259 MACH_MSG_OPTION_NONE,
259 MachMessageServer::kOneShot, 260 MachMessageServer::kOneShot,
260 MachMessageServer::kBlocking, 261 MachMessageServer::kBlocking,
262 MachMessageServer::kReceiveLargeError,
261 MACH_MSG_TIMEOUT_NONE); 263 MACH_MSG_TIMEOUT_NONE);
262 EXPECT_EQ(MACH_MSG_SUCCESS, mr) 264 EXPECT_EQ(MACH_MSG_SUCCESS, mr)
263 << MachErrorMessage(mr, "MachMessageServer::Run"); 265 << MachErrorMessage(mr, "MachMessageServer::Run");
264 } 266 }
265 267
266 void MachMultiprocessChild() override { 268 void MachMultiprocessChild() override {
267 bool task_valid = target_ == kExceptionPortsTargetTask || 269 bool task_valid = target_ == kExceptionPortsTargetTask ||
268 target_ == kExceptionPortsTargetBoth; 270 target_ == kExceptionPortsTargetBoth;
269 ExceptionPorts task_exception_ports(ExceptionPorts::kTargetTypeTask, 271 ExceptionPorts task_exception_ports(ExceptionPorts::kTargetTypeTask,
270 TASK_NULL); 272 TASK_NULL);
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 test_simulate_crash_mac.Run(); 370 test_simulate_crash_mac.Run();
369 } 371 }
370 } 372 }
371 } 373 }
372 } 374 }
373 } 375 }
374 376
375 } // namespace 377 } // namespace
376 } // namespace test 378 } // namespace test
377 } // namespace crashpad 379 } // namespace crashpad
OLDNEW
« no previous file with comments | « no previous file | snapshot/mac/mach_o_image_annotations_reader_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698