| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |