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

Unified Diff: Source/bindings/tests/results/V8TestExtendedEvent.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/scripts/code_generator_v8.pm ('k') | Source/bindings/tests/results/V8TestInterface.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/tests/results/V8TestExtendedEvent.cpp
diff --git a/Source/bindings/tests/results/V8TestExtendedEvent.cpp b/Source/bindings/tests/results/V8TestExtendedEvent.cpp
index 1395809cc7951631a24112596ad456b1105822ff..d68c34d185c6c5f987bede6b353332150316a96c 100644
--- a/Source/bindings/tests/results/V8TestExtendedEvent.cpp
+++ b/Source/bindings/tests/results/V8TestExtendedEvent.cpp
@@ -101,8 +101,10 @@ static void keyLocationAttributeGetterCallback(v8::Local<v8::String>, const v8::
static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
{
+ ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestExtendedEvent", info.Holder(), info.GetIsolate());
if (info.Length() < 1) {
- throwTypeError(ExceptionMessages::failedToConstruct("TestExtendedEvent", "An event name must be provided."), info.GetIsolate());
+ exceptionState.throwTypeError("An event name must be provided.");
+ exceptionState.throwIfNeeded();
return;
}
@@ -110,7 +112,6 @@ static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
EventInit eventInit;
if (info.Length() >= 2) {
V8TRYCATCH_VOID(Dictionary, options, Dictionary(info[1], info.GetIsolate()));
- ExceptionState exceptionState(info.Holder(), info.GetIsolate());
if (!initializeEvent(eventInit, options, exceptionState)) {
exceptionState.throwIfNeeded();
return;
« no previous file with comments | « Source/bindings/scripts/code_generator_v8.pm ('k') | Source/bindings/tests/results/V8TestInterface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698