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

Unified Diff: Source/bindings/tests/results/V8TestInterfaceEventConstructor.cpp

Issue 111373003: Migrate bindings constructors to the new ExceptionState model. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Ugh. 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
« no previous file with comments | « Source/bindings/tests/results/V8TestInterfaceConstructor.cpp ('k') | Source/bindings/v8/Dictionary.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/tests/results/V8TestInterfaceEventConstructor.cpp
diff --git a/Source/bindings/tests/results/V8TestInterfaceEventConstructor.cpp b/Source/bindings/tests/results/V8TestInterfaceEventConstructor.cpp
index bdd14361a18c7042da59e2628886023b3dcd0bab..f088fa8e1fe4a3a1a3e47909ee121905e77cf124 100644
--- a/Source/bindings/tests/results/V8TestInterfaceEventConstructor.cpp
+++ b/Source/bindings/tests/results/V8TestInterfaceEventConstructor.cpp
@@ -36,7 +36,6 @@
#include "RuntimeEnabledFeatures.h"
#include "bindings/v8/Dictionary.h"
#include "bindings/v8/ExceptionMessages.h"
-#include "bindings/v8/ExceptionState.h"
#include "bindings/v8/ScriptValue.h"
#include "bindings/v8/SerializedScriptValue.h"
#include "bindings/v8/V8DOMConfiguration.h"
@@ -156,8 +155,10 @@ static void deprecatedImplementedAsInitializedByEventConstructorReadonlyStringAt
static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
{
+ ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInterfaceEventConstructor", info.Holder(), info.GetIsolate());
if (info.Length() < 1) {
- throwTypeError(ExceptionMessages::failedToConstruct("TestInterfaceEventConstructor", "An event name must be provided."), info.GetIsolate());
+ exceptionState.throwTypeError("An event name must be provided.");
+ exceptionState.throwIfNeeded();
return;
}
@@ -166,7 +167,6 @@ static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
TestInterfaceEventConstructorInit eventInit;
if (info.Length() >= 2) {
V8TRYCATCH_VOID(Dictionary, options, Dictionary(info[1], info.GetIsolate()));
- ExceptionState exceptionState(info.Holder(), info.GetIsolate());
if (!initializeTestInterfaceEventConstructor(eventInit, options, exceptionState)) {
exceptionState.throwIfNeeded();
return;
@@ -175,7 +175,6 @@ static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
if (!initializedByEventConstructorReadonlyAnyAttribute.IsEmpty())
info.Holder()->SetHiddenValue(V8HiddenPropertyName::initializedByEventConstructorReadonlyAnyAttribute(info.GetIsolate()), initializedByEventConstructorReadonlyAnyAttribute);
}
- ExceptionState exceptionState(info.Holder(), info.GetIsolate());
RefPtr<TestInterfaceEventConstructor> event = TestInterfaceEventConstructor::create(type, eventInit, exceptionState);
if (exceptionState.throwIfNeeded())
return;
« no previous file with comments | « Source/bindings/tests/results/V8TestInterfaceConstructor.cpp ('k') | Source/bindings/v8/Dictionary.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698