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

Side by Side Diff: Source/wtf/Assertions.h

Issue 615593002: Remove unused functions WTFSetCrashHook, WTFInstallReportBacktraceOnCrashHook and WTFInvokeCrashHoo… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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 | « no previous file | Source/wtf/Assertions.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Google Inc. All rights reserved. 3 * Copyright (C) 2013 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 WTF_EXPORT void WTFReportFatalError(const char* file, int line, const char* func tion, const char* format, ...) WTF_ATTRIBUTE_PRINTF(4, 5); 101 WTF_EXPORT void WTFReportFatalError(const char* file, int line, const char* func tion, const char* format, ...) WTF_ATTRIBUTE_PRINTF(4, 5);
102 WTF_EXPORT void WTFReportError(const char* file, int line, const char* function, const char* format, ...) WTF_ATTRIBUTE_PRINTF(4, 5); 102 WTF_EXPORT void WTFReportError(const char* file, int line, const char* function, const char* format, ...) WTF_ATTRIBUTE_PRINTF(4, 5);
103 WTF_EXPORT void WTFLog(WTFLogChannel*, const char* format, ...) WTF_ATTRIBUTE_PR INTF(2, 3); 103 WTF_EXPORT void WTFLog(WTFLogChannel*, const char* format, ...) WTF_ATTRIBUTE_PR INTF(2, 3);
104 WTF_EXPORT void WTFLogVerbose(const char* file, int line, const char* function, WTFLogChannel*, const char* format, ...) WTF_ATTRIBUTE_PRINTF(5, 6); 104 WTF_EXPORT void WTFLogVerbose(const char* file, int line, const char* function, WTFLogChannel*, const char* format, ...) WTF_ATTRIBUTE_PRINTF(5, 6);
105 WTF_EXPORT void WTFLogAlways(const char* format, ...) WTF_ATTRIBUTE_PRINTF(1, 2) ; 105 WTF_EXPORT void WTFLogAlways(const char* format, ...) WTF_ATTRIBUTE_PRINTF(1, 2) ;
106 106
107 WTF_EXPORT void WTFGetBacktrace(void** stack, int* size); 107 WTF_EXPORT void WTFGetBacktrace(void** stack, int* size);
108 WTF_EXPORT void WTFReportBacktrace(int framesToShow = 31); 108 WTF_EXPORT void WTFReportBacktrace(int framesToShow = 31);
109 WTF_EXPORT void WTFPrintBacktrace(void** stack, int size); 109 WTF_EXPORT void WTFPrintBacktrace(void** stack, int size);
110 110
111 typedef void (*WTFCrashHookFunction)();
112 WTF_EXPORT void WTFSetCrashHook(WTFCrashHookFunction);
113 WTF_EXPORT void WTFInvokeCrashHook();
114 WTF_EXPORT void WTFInstallReportBacktraceOnCrashHook();
115
116 namespace WTF { 111 namespace WTF {
117 112
118 class WTF_EXPORT FrameToNameScope { 113 class WTF_EXPORT FrameToNameScope {
119 public: 114 public:
120 explicit FrameToNameScope(void*); 115 explicit FrameToNameScope(void*);
121 ~FrameToNameScope(); 116 ~FrameToNameScope();
122 const char* nullableName() { return m_name; } 117 const char* nullableName() { return m_name; }
123 118
124 private: 119 private:
125 const char* m_name; 120 const char* m_name;
(...skipping 17 matching lines...) Expand all
143 138
144 Use CRASH() in response to known, unrecoverable errors like out-of-memory. 139 Use CRASH() in response to known, unrecoverable errors like out-of-memory.
145 Macro is enabled in both debug and release mode. 140 Macro is enabled in both debug and release mode.
146 To test for unknown errors and verify assumptions, use ASSERT instead, to avo id impacting performance in release builds. 141 To test for unknown errors and verify assumptions, use ASSERT instead, to avo id impacting performance in release builds.
147 142
148 Signals are ignored by the crash reporter on OS X so we must do better. 143 Signals are ignored by the crash reporter on OS X so we must do better.
149 */ 144 */
150 #ifndef CRASH 145 #ifndef CRASH
151 #define CRASH() \ 146 #define CRASH() \
152 (WTFReportBacktrace(), \ 147 (WTFReportBacktrace(), \
153 WTFInvokeCrashHook(), \
154 (*(int*)0xfbadbeef = 0), \ 148 (*(int*)0xfbadbeef = 0), \
155 IMMEDIATE_CRASH()) 149 IMMEDIATE_CRASH())
156 #endif 150 #endif
157 151
158 #if COMPILER(CLANG) 152 #if COMPILER(CLANG)
159 #define NO_RETURN_DUE_TO_CRASH NO_RETURN 153 #define NO_RETURN_DUE_TO_CRASH NO_RETURN
160 #else 154 #else
161 #define NO_RETURN_DUE_TO_CRASH 155 #define NO_RETURN_DUE_TO_CRASH
162 #endif 156 #endif
163 157
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 } \ 405 } \
412 inline const thisType& to##thisType(const argumentType& argumentName) \ 406 inline const thisType& to##thisType(const argumentType& argumentName) \
413 { \ 407 { \
414 ASSERT_WITH_SECURITY_IMPLICATION(referencePredicate); \ 408 ASSERT_WITH_SECURITY_IMPLICATION(referencePredicate); \
415 return static_cast<const thisType&>(argumentName); \ 409 return static_cast<const thisType&>(argumentName); \
416 } \ 410 } \
417 void to##thisType(const thisType*); \ 411 void to##thisType(const thisType*); \
418 void to##thisType(const thisType&) 412 void to##thisType(const thisType&)
419 413
420 #endif /* WTF_Assertions_h */ 414 #endif /* WTF_Assertions_h */
OLDNEW
« no previous file with comments | « no previous file | Source/wtf/Assertions.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698