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

Side by Side Diff: util/mach/exc_server_variants.cc

Issue 799463003: MachMessageServer::Interface implementations: minor cleanups (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 | « util/mach/child_port_server_test.cc ('k') | no next file » | 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 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 destroy_complex_request); 469 destroy_complex_request);
470 if (out_reply->RetCode != KERN_SUCCESS) { 470 if (out_reply->RetCode != KERN_SUCCESS) {
471 return true; 471 return true;
472 } 472 }
473 473
474 out_header->msgh_size = 474 out_header->msgh_size =
475 sizeof(*out_reply) - sizeof(out_reply->new_state) + 475 sizeof(*out_reply) - sizeof(out_reply->new_state) +
476 sizeof(out_reply->new_state[0]) * out_reply->new_stateCnt; 476 sizeof(out_reply->new_state[0]) * out_reply->new_stateCnt;
477 return true; 477 return true;
478 } 478 }
479
480 default: {
481 SetMIGReplyError(out_header, MIG_BAD_ID);
482 return false;
483 }
479 } 484 }
480
481 SetMIGReplyError(out_header, MIG_BAD_ID);
482 return false;
483 } 485 }
484 486
485 //! \brief A server interface for the `exc` or `mach_exc` Mach subsystems, 487 //! \brief A server interface for the `exc` or `mach_exc` Mach subsystems,
486 //! simplified to have only a single interface method needing 488 //! simplified to have only a single interface method needing
487 //! implementation. 489 //! implementation.
488 template <typename Traits> 490 template <typename Traits>
489 class SimplifiedExcServer final : public ExcServer<Traits>, 491 class SimplifiedExcServer final : public ExcServer<Traits>,
490 public ExcServer<Traits>::Interface { 492 public ExcServer<Traits>::Interface {
491 public: 493 public:
492 //! \brief An interface that the different request messages that are a part of 494 //! \brief An interface that the different request messages that are a part of
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 kern_return_t ExcServerSuccessfulReturnValue(exception_behavior_t behavior, 797 kern_return_t ExcServerSuccessfulReturnValue(exception_behavior_t behavior,
796 bool set_thread_state) { 798 bool set_thread_state) {
797 if (!set_thread_state && ExceptionBehaviorHasState(behavior)) { 799 if (!set_thread_state && ExceptionBehaviorHasState(behavior)) {
798 return MACH_RCV_PORT_DIED; 800 return MACH_RCV_PORT_DIED;
799 } 801 }
800 802
801 return KERN_SUCCESS; 803 return KERN_SUCCESS;
802 } 804 }
803 805
804 } // namespace crashpad 806 } // namespace crashpad
OLDNEW
« no previous file with comments | « util/mach/child_port_server_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698