summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortkent <tkent@chromium.org>2016-03-23 18:45:10 -0700
committerCommit bot <commit-bot@chromium.org>2016-03-24 01:48:26 +0000
commitdb7410a13770f6be066a20a78ae2a6320afdc026 (patch)
tree045eb592ff8e0baad5cc642fcd5fefc5733b34cc
parent3f06742ebe125991b2c893638063cf8df55d8a86 (diff)
downloadchromium_src-db7410a13770f6be066a20a78ae2a6320afdc026.zip
chromium_src-db7410a13770f6be066a20a78ae2a6320afdc026.tar.gz
chromium_src-db7410a13770f6be066a20a78ae2a6320afdc026.tar.bz2
Rename ASSERT_AT to DCHECK_AT, and re-implement it with base/logging.*.
- Remove unused |function| argument - Add messages. BUG=596760 Review URL: https://codereview.chromium.org/1832683002 Cr-Commit-Position: refs/heads/master@{#383009}
-rw-r--r--third_party/WebKit/Source/bindings/core/v8/ExceptionStatePlaceholder.cpp6
-rw-r--r--third_party/WebKit/Source/core/editing/commands/EditingState.cpp2
-rw-r--r--third_party/WebKit/Source/wtf/Assertions.h7
3 files changed, 6 insertions, 9 deletions
diff --git a/third_party/WebKit/Source/bindings/core/v8/ExceptionStatePlaceholder.cpp b/third_party/WebKit/Source/bindings/core/v8/ExceptionStatePlaceholder.cpp
index 9ea0dc5..c510a12 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ExceptionStatePlaceholder.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ExceptionStatePlaceholder.cpp
@@ -41,17 +41,17 @@ NoExceptionStateAssertionChecker::NoExceptionStateAssertionChecker(const char* f
void NoExceptionStateAssertionChecker::throwDOMException(const ExceptionCode&, const String&)
{
- ASSERT_AT(false, m_file, m_line, "");
+ DCHECK_AT(false, m_file, m_line) << "DOMExeption should not be thrown.";
}
void NoExceptionStateAssertionChecker::throwTypeError(const String&)
{
- ASSERT_AT(false, m_file, m_line, "");
+ DCHECK_AT(false, m_file, m_line) << "TypeError should not be thrown.";
}
void NoExceptionStateAssertionChecker::throwSecurityError(const String&, const String&)
{
- ASSERT_AT(false, m_file, m_line, "");
+ DCHECK_AT(false, m_file, m_line) << "SecurityError should not be thrown.";
}
#endif
diff --git a/third_party/WebKit/Source/core/editing/commands/EditingState.cpp b/third_party/WebKit/Source/core/editing/commands/EditingState.cpp
index 03da028..f734bee 100644
--- a/third_party/WebKit/Source/core/editing/commands/EditingState.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/EditingState.cpp
@@ -38,7 +38,7 @@ NoEditingAbortChecker::NoEditingAbortChecker(const char* file, int line)
NoEditingAbortChecker::~NoEditingAbortChecker()
{
- ASSERT_AT(!m_editingState.isAborted(), m_file, m_line, "");
+ DCHECK_AT(!m_editingState.isAborted(), m_file, m_line) << "The operation should not have been aborted.";
}
#endif
diff --git a/third_party/WebKit/Source/wtf/Assertions.h b/third_party/WebKit/Source/wtf/Assertions.h
index 7446b57..fa5dcaf 100644
--- a/third_party/WebKit/Source/wtf/Assertions.h
+++ b/third_party/WebKit/Source/wtf/Assertions.h
@@ -146,10 +146,7 @@ WTF_EXPORT void WTFPrintBacktrace(void** stack, int size);
CRASH()) : \
(void)0)
-#define ASSERT_AT(assertion, file, line, function) \
- (!(assertion) ? \
- (WTFReportAssertionFailure(file, line, function, #assertion), CRASH()) : \
- (void)0)
+#define DCHECK_AT(assertion, file, line) LAZY_STREAM(logging::LogMessage(file, line, #assertion).stream(), !(assertion))
#define ASSERT_NOT_REACHED() do { \
WTFReportAssertionFailure(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, 0); \
@@ -163,7 +160,7 @@ WTF_EXPORT void WTFPrintBacktrace(void** stack, int size);
#else
#define ASSERT(assertion) ((void)0)
-#define ASSERT_AT(assertion, file, line, function) ((void)0)
+#define DCHECK_AT(assertion, file, line) EAT_STREAM_PARAMETERS
#define ASSERT_NOT_REACHED() ((void)0)
#define NO_RETURN_DUE_TO_ASSERT