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

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

Issue 654933002: Use exactly one of final, override, and virtual (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: git grep -E '^ {3,}.*override[ Created 6 years, 2 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
« no previous file with comments | « util/mach/exc_server_variants.h ('k') | util/mach/exception_ports_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 921 matching lines...) Expand 10 before | Expand all | Expand 10 after
932 EXPECT_EQ(0u, *new_state_count); 932 EXPECT_EQ(0u, *new_state_count);
933 EXPECT_EQ(NULL, new_state); 933 EXPECT_EQ(NULL, new_state);
934 } 934 }
935 935
936 return ExcServerSuccessfulReturnValue(behavior, false); 936 return ExcServerSuccessfulReturnValue(behavior, false);
937 } 937 }
938 938
939 private: 939 private:
940 // MachMultiprocess: 940 // MachMultiprocess:
941 941
942 virtual void MachMultiprocessParent() override { 942 void MachMultiprocessParent() override {
943 kern_return_t kr = MachMessageServer::Run(this, 943 kern_return_t kr = MachMessageServer::Run(this,
944 LocalPort(), 944 LocalPort(),
945 MACH_MSG_OPTION_NONE, 945 MACH_MSG_OPTION_NONE,
946 MachMessageServer::kOneShot, 946 MachMessageServer::kOneShot,
947 MachMessageServer::kBlocking, 947 MachMessageServer::kBlocking,
948 0); 948 0);
949 EXPECT_EQ(KERN_SUCCESS, kr) 949 EXPECT_EQ(KERN_SUCCESS, kr)
950 << MachErrorMessage(kr, "MachMessageServer::Run"); 950 << MachErrorMessage(kr, "MachMessageServer::Run");
951 951
952 EXPECT_TRUE(handled_); 952 EXPECT_TRUE(handled_);
953 } 953 }
954 954
955 virtual void MachMultiprocessChild() override { 955 void MachMultiprocessChild() override {
956 // Set the parent as the exception handler for EXC_CRASH. 956 // Set the parent as the exception handler for EXC_CRASH.
957 kern_return_t kr = task_set_exception_ports( 957 kern_return_t kr = task_set_exception_ports(
958 mach_task_self(), EXC_MASK_CRASH, RemotePort(), behavior_, flavor_); 958 mach_task_self(), EXC_MASK_CRASH, RemotePort(), behavior_, flavor_);
959 ASSERT_EQ(KERN_SUCCESS, kr) 959 ASSERT_EQ(KERN_SUCCESS, kr)
960 << MachErrorMessage(kr, "task_set_exception_ports"); 960 << MachErrorMessage(kr, "task_set_exception_ports");
961 961
962 // Now crash. 962 // Now crash.
963 __builtin_trap(); 963 __builtin_trap();
964 } 964 }
965 965
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
1167 1167
1168 EXPECT_EQ(test_data.kr, 1168 EXPECT_EQ(test_data.kr,
1169 ExcServerSuccessfulReturnValue(test_data.behavior, 1169 ExcServerSuccessfulReturnValue(test_data.behavior,
1170 test_data.set_thread_state)); 1170 test_data.set_thread_state));
1171 } 1171 }
1172 } 1172 }
1173 1173
1174 } // namespace 1174 } // namespace
1175 } // namespace test 1175 } // namespace test
1176 } // namespace crashpad 1176 } // namespace crashpad
OLDNEW
« no previous file with comments | « util/mach/exc_server_variants.h ('k') | util/mach/exception_ports_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698