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

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

Issue 2715073002: Devirtualize ExceptionState's helper throwing methods.
Patch Set: Created 3 years, 10 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 | « third_party/WebKit/Source/bindings/core/v8/ExceptionState.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a446114b11798ba8f25ee03c6dd238db98817c89..dc54c00ac2d0fa93ae4743470b55446b19dc93e6 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ExceptionState.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ExceptionState.cpp
@@ -172,50 +172,17 @@ NonThrowableExceptionState::NonThrowableExceptionState(const char* file,
m_file(file),
m_line(line) {}
-void NonThrowableExceptionState::throwDOMException(ExceptionCode ec,
- const String& message) {
- DCHECK_AT(false, m_file, m_line) << "DOMExeption should not be thrown.";
-}
-
-void NonThrowableExceptionState::throwRangeError(const String& message) {
- DCHECK_AT(false, m_file, m_line) << "RangeError should not be thrown.";
-}
-
-void NonThrowableExceptionState::throwSecurityError(
- const String& sanitizedMessage,
- const String&) {
- DCHECK_AT(false, m_file, m_line) << "SecurityError should not be thrown.";
-}
-
-void NonThrowableExceptionState::throwTypeError(const String& message) {
- DCHECK_AT(false, m_file, m_line) << "TypeError should not be thrown.";
-}
-
-void NonThrowableExceptionState::rethrowV8Exception(v8::Local<v8::Value>) {
+void NonThrowableExceptionState::setException(ExceptionCode ec,
+ const String& message,
+ v8::Local<v8::Value> exception) {
DCHECK_AT(false, m_file, m_line) << "An exception should not be rethrown.";
}
-void DummyExceptionStateForTesting::throwDOMException(ExceptionCode ec,
- const String& message) {
- setException(ec, message, v8::Local<v8::Value>());
-}
-
-void DummyExceptionStateForTesting::throwRangeError(const String& message) {
- setException(V8RangeError, message, v8::Local<v8::Value>());
-}
-
-void DummyExceptionStateForTesting::throwSecurityError(
- const String& sanitizedMessage,
- const String&) {
- setException(SecurityError, sanitizedMessage, v8::Local<v8::Value>());
-}
-
-void DummyExceptionStateForTesting::throwTypeError(const String& message) {
- setException(V8TypeError, message, v8::Local<v8::Value>());
-}
-
-void DummyExceptionStateForTesting::rethrowV8Exception(v8::Local<v8::Value>) {
- setException(kRethrownException, String(), v8::Local<v8::Value>());
+void DummyExceptionStateForTesting::setException(
+ ExceptionCode ec,
+ const String& message,
+ v8::Local<v8::Value> exception) {
+ // Ignored.
}
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/ExceptionState.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698