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

Side by Side Diff: util/test/mac/mach_multiprocess.cc

Issue 577293002: Use task_t, thread_t, and exception_handler_t uniformly (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 6 years, 3 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 unified diff | Download patch
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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 mach_port_t MachMultiprocess::LocalPort() const { 108 mach_port_t MachMultiprocess::LocalPort() const {
109 EXPECT_NE(kMachPortNull, info_->local_port); 109 EXPECT_NE(kMachPortNull, info_->local_port);
110 return info_->local_port; 110 return info_->local_port;
111 } 111 }
112 112
113 mach_port_t MachMultiprocess::RemotePort() const { 113 mach_port_t MachMultiprocess::RemotePort() const {
114 EXPECT_NE(kMachPortNull, info_->remote_port); 114 EXPECT_NE(kMachPortNull, info_->remote_port);
115 return info_->remote_port; 115 return info_->remote_port;
116 } 116 }
117 117
118 mach_port_t MachMultiprocess::ChildTask() const { 118 task_t MachMultiprocess::ChildTask() const {
119 EXPECT_NE(kMachPortNull, info_->child_task); 119 EXPECT_NE(kMachPortNull, info_->child_task);
120 return info_->child_task; 120 return info_->child_task;
121 } 121 }
122 122
123 void MachMultiprocess::MultiprocessParent() { 123 void MachMultiprocess::MultiprocessParent() {
124 ReceiveHelloMessage message = {}; 124 ReceiveHelloMessage message = {};
125 125
126 kern_return_t kr = 126 kern_return_t kr =
127 mach_msg(&message.header, 127 mach_msg(&message.header,
128 MACH_RCV_MSG | MACH_RCV_TRAILER_TYPE(MACH_MSG_TRAILER_FORMAT_0) | 128 MACH_RCV_MSG | MACH_RCV_TRAILER_TYPE(MACH_MSG_TRAILER_FORMAT_0) |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 if (Test::HasFailure()) { 264 if (Test::HasFailure()) {
265 // Trigger the ScopedForbidReturn destructor. 265 // Trigger the ScopedForbidReturn destructor.
266 return; 266 return;
267 } 267 }
268 268
269 forbid_return.Disarm(); 269 forbid_return.Disarm();
270 } 270 }
271 271
272 } // namespace test 272 } // namespace test
273 } // namespace crashpad 273 } // namespace crashpad
OLDNEW
« util/mach/mach_message_server.cc ('K') | « util/test/mac/mach_multiprocess.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698