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

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

Issue 19047003: Rebaseline bindings test results after r153938 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 months 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/V8TestOverloadedConstructors.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/tests/results/V8TestTypedefs.cpp
diff --git a/Source/bindings/tests/results/V8TestTypedefs.cpp b/Source/bindings/tests/results/V8TestTypedefs.cpp
index e846c18f5dde5527c52645dd452346c7cad9e331..8cca8097a2d428601b7b35bb05d10b53f5c8f045 100644
--- a/Source/bindings/tests/results/V8TestTypedefs.cpp
+++ b/Source/bindings/tests/results/V8TestTypedefs.cpp
@@ -27,6 +27,7 @@
#include "V8SerializedScriptValue.h"
#include "V8TestCallback.h"
#include "V8TestSubObj.h"
+#include "bindings/v8/ExceptionState.h"
#include "bindings/v8/ScriptController.h"
#include "bindings/v8/SerializedScriptValue.h"
#include "bindings/v8/V8Binding.h"
@@ -35,7 +36,6 @@
#include "bindings/v8/V8ObjectConstructor.h"
#include "core/dom/ContextFeatures.h"
#include "core/dom/Document.h"
-#include "core/dom/ExceptionCode.h"
#include "core/page/Frame.h"
#include "core/platform/chromium/TraceEvent.h"
#include "core/svg/properties/SVGPropertyTearOff.h"
@@ -130,12 +130,10 @@ static void immutableSerializedScriptValueAttrSetterCallback(v8::Local<v8::Strin
static void attrWithGetterExceptionAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());
- ExceptionCode ec = 0;
- int v = imp->attrWithGetterException(ec);
- if (UNLIKELY(ec)) {
- setDOMException(ec, info.GetIsolate());
+ ExceptionState es(info.GetIsolate());
+ int v = imp->attrWithGetterException(es);
+ if (UNLIKELY(es.throwIfNeeded()))
return;
- };
v8SetReturnValueInt(info, v);
return;
}
@@ -180,10 +178,9 @@ static void attrWithSetterExceptionAttrSetter(v8::Local<v8::String> name, v8::Lo
{
TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());
V8TRYCATCH_VOID(int, v, toInt32(value));
- ExceptionCode ec = 0;
- imp->setAttrWithSetterException(v, ec);
- if (UNLIKELY(ec))
- setDOMException(ec, info.GetIsolate());
+ ExceptionState es(info.GetIsolate());
+ imp->setAttrWithSetterException(v, es);
+ es.throwIfNeeded();
return;
}
@@ -197,12 +194,10 @@ static void attrWithSetterExceptionAttrSetterCallback(v8::Local<v8::String> name
static void stringAttrWithGetterExceptionAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());
- ExceptionCode ec = 0;
- String v = imp->stringAttrWithGetterException(ec);
- if (UNLIKELY(ec)) {
- setDOMException(ec, info.GetIsolate());
+ ExceptionState es(info.GetIsolate());
+ String v = imp->stringAttrWithGetterException(es);
+ if (UNLIKELY(es.throwIfNeeded()))
return;
- };
v8SetReturnValueString(info, v, info.GetIsolate(), NullStringAsEmpty);
return;
}
@@ -247,10 +242,9 @@ static void stringAttrWithSetterExceptionAttrSetter(v8::Local<v8::String> name,
{
TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value);
- ExceptionCode ec = 0;
- imp->setStringAttrWithSetterException(v, ec);
- if (UNLIKELY(ec))
- setDOMException(ec, info.GetIsolate());
+ ExceptionState es(info.GetIsolate());
+ imp->setStringAttrWithSetterException(v, es);
+ es.throwIfNeeded();
return;
}
@@ -427,13 +421,11 @@ static void stringArrayFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>&
return;
}
TestTypedefs* imp = V8TestTypedefs::toNative(args.Holder());
- ExceptionCode ec = 0;
+ ExceptionState es(args.GetIsolate());
V8TRYCATCH_VOID(Vector<String>, values, toNativeArray<String>(args[0]));
- Vector<String> result = imp->stringArrayFunction(values, ec);
- if (UNLIKELY(ec)) {
- setDOMException(ec, args.GetIsolate());
+ Vector<String> result = imp->stringArrayFunction(values, es);
+ if (es.throwIfNeeded())
return;
- }
v8SetReturnValue(args, v8Array(result, args.GetIsolate()));
return;
}
@@ -452,13 +444,11 @@ static void stringArrayFunction2Method(const v8::FunctionCallbackInfo<v8::Value>
return;
}
TestTypedefs* imp = V8TestTypedefs::toNative(args.Holder());
- ExceptionCode ec = 0;
+ ExceptionState es(args.GetIsolate());
V8TRYCATCH_VOID(Vector<String>, values, toNativeArray<String>(args[0]));
- Vector<String> result = imp->stringArrayFunction2(values, ec);
- if (UNLIKELY(ec)) {
- setDOMException(ec, args.GetIsolate());
+ Vector<String> result = imp->stringArrayFunction2(values, es);
+ if (es.throwIfNeeded())
return;
- }
v8SetReturnValue(args, v8Array(result, args.GetIsolate()));
return;
}
@@ -473,12 +463,10 @@ static void stringArrayFunction2MethodCallback(const v8::FunctionCallbackInfo<v8
static void methodWithExceptionMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TestTypedefs* imp = V8TestTypedefs::toNative(args.Holder());
- ExceptionCode ec = 0;
- imp->methodWithException(ec);
- if (UNLIKELY(ec)) {
- setDOMException(ec, args.GetIsolate());
+ ExceptionState es(args.GetIsolate());
+ imp->methodWithException(es);
+ if (es.throwIfNeeded())
return;
- }
return;
}
« no previous file with comments | « Source/bindings/tests/results/V8TestOverloadedConstructors.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698