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

Unified Diff: Source/bindings/v8/custom/V8TextTrackCueCustom.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: Rebase 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/custom/V8TextTrackCueCustom.cpp
diff --git a/Source/bindings/v8/custom/V8TextTrackCueCustom.cpp b/Source/bindings/v8/custom/V8TextTrackCueCustom.cpp
index 382c15e705b5aeacc27e2c787ad6927dd2049122..3101609204280910e580dab664fbe9ad0c6d4a8f 100644
--- a/Source/bindings/v8/custom/V8TextTrackCueCustom.cpp
+++ b/Source/bindings/v8/custom/V8TextTrackCueCustom.cpp
@@ -31,6 +31,9 @@
#include "V8TextTrackCue.h"
#include "V8VTTCue.h"
+
+#include "bindings/v8/ExceptionMessages.h"
+#include "bindings/v8/ExceptionState.h"
#include "core/frame/UseCounter.h"
namespace WebCore {
@@ -44,8 +47,10 @@ v8::Handle<v8::Value> toV8(TextTrackCue* impl, v8::Handle<v8::Object> creationCo
// compat, not per spec, and should be removed at the earliest opportunity.
void V8TextTrackCue::constructorCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
{
+ ExceptionState exceptionState(ExceptionState::ConstructionContext, "TextTrackCue", info.Holder(), info.GetIsolate());
if (UNLIKELY(info.Length() < 3)) {
- throwTypeError(ExceptionMessages::failedToConstruct("TextTrackCue", ExceptionMessages::notEnoughArguments(3, info.Length())), info.GetIsolate());
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(3, info.Length()));
+ exceptionState.throwIfNeeded();
return;
}
V8TRYCATCH_VOID(double, startTime, static_cast<double>(info[0]->NumberValue()));
« no previous file with comments | « Source/bindings/v8/custom/V8SVGLengthCustom.cpp ('k') | Source/bindings/v8/custom/V8XMLHttpRequestCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698