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

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

Issue 1952893003: Implement custom element construction and some 'define' checks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 191f03d3b479194f68f80f5fbf6397e7c662c34c..e754850eda79d236f7667b5aa0920b4e21a38c89 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ExceptionState.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ExceptionState.cpp
@@ -108,6 +108,14 @@ void ExceptionState::throwTypeError(const String& message)
setException(V8ThrowException::createTypeError(m_isolate, addExceptionContext(message)));
}
+void ExceptionState::throwSyntaxError(const String& message)
+{
+ ASSERT(m_isolate);
+ m_code = V8SyntaxError;
+ m_message = message;
+ setException(V8ThrowException::createSyntaxError(m_isolate, addExceptionContext(message)));
+}
+
void ExceptionState::throwRangeError(const String& message)
{
ASSERT(m_isolate);
@@ -137,6 +145,13 @@ void NonThrowableExceptionState::throwSecurityError(const String& sanitizedMessa
m_message = sanitizedMessage;
}
+void NonThrowableExceptionState::throwSyntaxError(const String& message)
+{
+ ASSERT_NOT_REACHED();
+ m_code = V8SyntaxError;
+ m_message = message;
+}
+
void NonThrowableExceptionState::throwRangeError(const String& message)
{
ASSERT_NOT_REACHED();
@@ -162,6 +177,12 @@ void TrackExceptionState::throwSecurityError(const String& sanitizedMessage, con
m_message = sanitizedMessage;
}
+void TrackExceptionState::throwSyntaxError(const String& message)
+{
+ m_code = V8SyntaxError;
+ m_message = message;
+}
+
void TrackExceptionState::throwRangeError(const String& message)
{
m_code = V8RangeError;

Powered by Google App Engine
This is Rietveld 408576698