Index: Source/bindings/v8/ExceptionState.cpp |
diff --git a/Source/bindings/v8/ExceptionState.cpp b/Source/bindings/v8/ExceptionState.cpp |
index 62fa19248d410340be90a4b6ee447c541c36e4ea..ad0e663ade7045716e33ca4d07d6ba9e52a6004c 100644 |
--- a/Source/bindings/v8/ExceptionState.cpp |
+++ b/Source/bindings/v8/ExceptionState.cpp |
@@ -50,6 +50,13 @@ void ExceptionState::throwDOMException(const ExceptionCode& ec, const String& me |
setException(V8ThrowException::createDOMException(ec, message, m_isolate)); |
} |
+void ExceptionState::throwSecurityError(const String& sanitizedMessage, const String& unsanitizedMessage) |
+{ |
+ ASSERT(m_isolate); |
+ m_code = SecurityError; |
+ setException(V8ThrowException::createDOMException(SecurityError, sanitizedMessage, unsanitizedMessage, m_isolate)); |
+} |
+ |
void ExceptionState::setException(v8::Handle<v8::Value> exception) |
{ |
// FIXME: Assert that exception is not empty? |
@@ -78,4 +85,9 @@ void TrackExceptionState::throwTypeError(const String&) |
m_code = TypeError; |
} |
+void TrackExceptionState::throwSecurityError(const String&, const String&) |
+{ |
+ m_code = SecurityError; |
+} |
+ |
} // namespace WebCore |