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

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

Issue 105693002: Generate a bit less code to handle failed arity checks. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years 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: Source/bindings/v8/ExceptionState.h
diff --git a/Source/bindings/v8/ExceptionState.h b/Source/bindings/v8/ExceptionState.h
index bfe2790e16a84ac1aa19d47d039b94074bdf9fe8..8e02d18a79a1d763fef2013a92a04026e03da9a7 100644
--- a/Source/bindings/v8/ExceptionState.h
+++ b/Source/bindings/v8/ExceptionState.h
@@ -81,6 +81,9 @@ public:
virtual void throwTypeError(const String& message);
virtual void throwSecurityError(const String& sanitizedMessage, const String& unsanitizedMessage = String());
+ // Throw a TypeError if too few arguments were supplied.
+ void notEnoughArguments(int expected, int actual);
Mike West 2013/12/05 11:48:59 Hrm. 1. This should have "throw" in the name. 2.
sof 2013/12/09 22:53:20 (FTR, there are currently 484 applications of this
+
// Please don't use these methods. Use ::throwDOMException and ::throwTypeError, and pass in a useful exception message.
virtual void throwUninformativeAndGenericDOMException(const ExceptionCode& ec) { throwDOMException(ec, String()); }
virtual void throwUninformativeAndGenericTypeError() { throwTypeError(String()); }

Powered by Google App Engine
This is Rietveld 408576698