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

Unified Diff: compat/mac/kern/exc_resource.h

Issue 1066243002: Accept non-fatal resource exceptions without generating crash reports (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Swallow non-fatal EXC_RESOURCE Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « compat/compat.gyp ('k') | compat/mac/mach-o/getsect.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compat/mac/kern/exc_resource.h
diff --git a/compat/mac/kern/exc_resource.h b/compat/mac/kern/exc_resource.h
new file mode 100644
index 0000000000000000000000000000000000000000..30e9b855115535faf4430ec7920fc1437dfe3a87
--- /dev/null
+++ b/compat/mac/kern/exc_resource.h
@@ -0,0 +1,62 @@
+// Copyright 2015 The Crashpad Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef CRASHPAD_COMPAT_MAC_KERN_EXC_RESOURCE_H_
+#define CRASHPAD_COMPAT_MAC_KERN_EXC_RESOURCE_H_
+
+#if __has_include_next(<kern/exc_resource.h>)
+#include_next <kern/exc_resource.h>
+#endif
+
+// 10.9 SDK
+
+#ifndef EXC_RESOURCE_DECODE_RESOURCE_TYPE
+#define EXC_RESOURCE_DECODE_RESOURCE_TYPE(code) (((code) >> 61) & 0x7ull)
+#endif
+
+#ifndef EXC_RESOURCE_DECODE_FLAVOR
+#define EXC_RESOURCE_DECODE_FLAVOR(code) (((code) >> 58) & 0x7ull)
+#endif
+
+#ifndef RESOURCE_TYPE_CPU
+#define RESOURCE_TYPE_CPU 1
+#endif
+
+#ifndef RESOURCE_TYPE_WAKEUPS
+#define RESOURCE_TYPE_WAKEUPS 2
+#endif
+
+#ifndef RESOURCE_TYPE_MEMORY
+#define RESOURCE_TYPE_MEMORY 3
+#endif
+
+#ifndef FLAVOR_CPU_MONITOR
+#define FLAVOR_CPU_MONITOR 1
+#endif
+
+#ifndef FLAVOR_WAKEUPS_MONITOR
+#define FLAVOR_WAKEUPS_MONITOR 1
+#endif
+
+#ifndef FLAVOR_HIGH_WATERMARK
+#define FLAVOR_HIGH_WATERMARK 1
+#endif
+
+// 10.10 SDK
+
+#ifndef FLAVOR_CPU_MONITOR_FATAL
+#define FLAVOR_CPU_MONITOR_FATAL 2
+#endif
+
+#endif // CRASHPAD_COMPAT_MAC_KERN_EXC_RESOURCE_H_
« no previous file with comments | « compat/compat.gyp ('k') | compat/mac/mach-o/getsect.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698