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.cpp

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.cpp
diff --git a/Source/bindings/v8/ExceptionState.cpp b/Source/bindings/v8/ExceptionState.cpp
index 77c9103d7be7afe21926f028d6d315689b8af907..a557db9599c3255e8024fef5e00b070cb2392d4b 100644
--- a/Source/bindings/v8/ExceptionState.cpp
+++ b/Source/bindings/v8/ExceptionState.cpp
@@ -83,6 +83,12 @@ void ExceptionState::throwTypeError(const String& message)
setException(V8ThrowException::createTypeError(addExceptionContext(message), m_isolate));
}
+void ExceptionState::notEnoughArguments(int expected, int actual)
+{
+ throwTypeError(ExceptionMessages::notEnoughArguments(expected, actual));
+ throwIfNeeded();
Mike West 2013/12/05 11:48:59 This is a change from the semantics we've set up f
sof 2013/12/05 12:01:32 It seems redundant to generate that much code at e
Mike West 2013/12/05 12:15:15 As long as we can assume that this is always calle
+}
+
void TrackExceptionState::throwDOMException(const ExceptionCode& ec, const String& message)
{
m_code = ec;

Powered by Google App Engine
This is Rietveld 408576698