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

Side by Side Diff: runtime/bin/platform_macos.cc

Issue 2985963002: [standalone] Register a segfault handler on Android as already done on Linux. (Closed)
Patch Set: . Created 3 years, 4 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 | « runtime/bin/platform_linux.cc ('k') | runtime/vm/profiler.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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "platform/globals.h" 5 #include "platform/globals.h"
6 #if defined(HOST_OS_MACOS) 6 #if defined(HOST_OS_MACOS)
7 7
8 #include "bin/platform.h" 8 #include "bin/platform.h"
9 9
10 #include <CoreFoundation/CoreFoundation.h> 10 #include <CoreFoundation/CoreFoundation.h>
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 return false; 53 return false;
54 } 54 }
55 if (sigaddset(&act.sa_mask, SIGPROF) != 0) { 55 if (sigaddset(&act.sa_mask, SIGPROF) != 0) {
56 perror("sigaddset() failed"); 56 perror("sigaddset() failed");
57 return false; 57 return false;
58 } 58 }
59 if (sigaction(SIGSEGV, &act, NULL) != 0) { 59 if (sigaction(SIGSEGV, &act, NULL) != 0) {
60 perror("sigaction() failed."); 60 perror("sigaction() failed.");
61 return false; 61 return false;
62 } 62 }
63 if (sigaction(SIGBUS, &act, NULL) != 0) {
64 perror("sigaction() failed.");
65 return false;
66 }
63 if (sigaction(SIGTRAP, &act, NULL) != 0) { 67 if (sigaction(SIGTRAP, &act, NULL) != 0) {
64 perror("sigaction() failed."); 68 perror("sigaction() failed.");
65 return false; 69 return false;
66 } 70 }
67 return true; 71 return true;
68 } 72 }
69 73
70 int Platform::NumberOfProcessors() { 74 int Platform::NumberOfProcessors() {
71 int32_t cpus = -1; 75 int32_t cpus = -1;
72 size_t cpus_length = sizeof(cpus); 76 size_t cpus_length = sizeof(cpus);
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 } 206 }
203 207
204 void Platform::Exit(int exit_code) { 208 void Platform::Exit(int exit_code) {
205 exit(exit_code); 209 exit(exit_code);
206 } 210 }
207 211
208 } // namespace bin 212 } // namespace bin
209 } // namespace dart 213 } // namespace dart
210 214
211 #endif // defined(HOST_OS_MACOS) 215 #endif // defined(HOST_OS_MACOS)
OLDNEW
« no previous file with comments | « runtime/bin/platform_linux.cc ('k') | runtime/vm/profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698