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

Unified Diff: Source/bindings/v8/ExceptionState.h

Issue 24469004: Amusingly deprecate the generic version of 'ExceptionState::throwDOMException'. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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 | « no previous file | Source/bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/ExceptionState.h
diff --git a/Source/bindings/v8/ExceptionState.h b/Source/bindings/v8/ExceptionState.h
index 0642a0aa6fff8b8a48233811a048a4217cf1fc0a..26bae40f6941d8cc7c6524bd98e339d6f5e77e6a 100644
--- a/Source/bindings/v8/ExceptionState.h
+++ b/Source/bindings/v8/ExceptionState.h
@@ -48,10 +48,13 @@ public:
: m_code(0)
, m_isolate(isolate) { }
- virtual void throwDOMException(const ExceptionCode&, const String& message = String());
+ virtual void throwDOMException(const ExceptionCode&, const String& message);
virtual void throwTypeError(const String& message = String());
virtual void throwSecurityError(const String& sanitizedMessage, const String& unsanitizedMessage = String());
+ // Please don't use this method. Use ::throwDOMException, and pass in a useful exception message.
+ virtual void throwUninformativeAndGenericDOMException(const ExceptionCode& ec) { throwDOMException(ec, String()); };
+
bool hadException() const { return !m_exception.isEmpty() || m_code; }
void clearException();
@@ -62,7 +65,7 @@ public:
if (m_exception.isEmpty()) {
if (!m_code)
return false;
- throwDOMException(m_code);
+ throwUninformativeAndGenericDOMException(m_code);
}
V8ThrowException::throwError(m_exception.newLocal(m_isolate), m_isolate);
@@ -82,7 +85,7 @@ private:
class TrackExceptionState : public ExceptionState {
public:
TrackExceptionState(): ExceptionState(0) { }
- virtual void throwDOMException(const ExceptionCode&, const String& message = String()) OVERRIDE FINAL;
+ virtual void throwDOMException(const ExceptionCode&, const String& message) OVERRIDE FINAL;
virtual void throwTypeError(const String& message = String()) OVERRIDE FINAL;
virtual void throwSecurityError(const String& sanitizedMessage, const String& unsanitizedMessage = String()) OVERRIDE FINAL;
};
« no previous file with comments | « no previous file | Source/bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698