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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/ExceptionState.cpp

Issue 2616023004: Remove NoExceptionStateAssertionChecker (Closed)
Patch Set: temp Created 3 years, 11 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
Index: third_party/WebKit/Source/bindings/core/v8/ExceptionState.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/ExceptionState.cpp b/third_party/WebKit/Source/bindings/core/v8/ExceptionState.cpp
index 5c7e67a52d007f76ae1003207542ca2739c82e2e..dc447ca2fe0cbe87fa4a66ec1de3ca7e4c104fb9 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ExceptionState.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ExceptionState.cpp
@@ -144,27 +144,38 @@ String ExceptionState::addExceptionContext(const String& message) const {
return processedMessage;
}
+NonThrowableExceptionState::NonThrowableExceptionState()
+ : ExceptionState(nullptr, ExceptionState::UnknownContext, nullptr, nullptr),
+ m_file(""),
+ m_line(0) {}
+
+NonThrowableExceptionState::NonThrowableExceptionState(const char* file,
+ int line)
+ : ExceptionState(nullptr, ExceptionState::UnknownContext, nullptr, nullptr),
+ m_file(file),
+ m_line(line) {}
+
void NonThrowableExceptionState::throwDOMException(ExceptionCode ec,
const String& message) {
- NOTREACHED();
+ DCHECK_AT(false, m_file, m_line) << "DOMExeption should not be thrown.";
}
void NonThrowableExceptionState::throwRangeError(const String& message) {
- NOTREACHED();
+ DCHECK_AT(false, m_file, m_line) << "RangeError should not be thrown.";
}
void NonThrowableExceptionState::throwSecurityError(
const String& sanitizedMessage,
const String&) {
- NOTREACHED();
+ DCHECK_AT(false, m_file, m_line) << "SecurityError should not be thrown.";
}
void NonThrowableExceptionState::throwTypeError(const String& message) {
- NOTREACHED();
+ DCHECK_AT(false, m_file, m_line) << "TypeError should not be thrown.";
}
void NonThrowableExceptionState::rethrowV8Exception(v8::Local<v8::Value>) {
- NOTREACHED();
+ DCHECK_AT(false, m_file, m_line) << "An exception should not be rethrown.";
}
void DummyExceptionStateForTesting::throwDOMException(ExceptionCode ec,

Powered by Google App Engine
This is Rietveld 408576698