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

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

Issue 99083002: WIP: Migrate generated bindings to new ExceptionState constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Feedback. 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/tests/results/V8TestTypedefs.cpp
diff --git a/Source/bindings/tests/results/V8TestTypedefs.cpp b/Source/bindings/tests/results/V8TestTypedefs.cpp
index 8d454c597c98dfec5f692513eb91e088148f11a7..68776d06fce4d88587e8bf71254fb026ea231dbc 100644
--- a/Source/bindings/tests/results/V8TestTypedefs.cpp
+++ b/Source/bindings/tests/results/V8TestTypedefs.cpp
@@ -137,7 +137,7 @@ static void immutableSerializedScriptValueAttributeSetterCallback(v8::Local<v8::
static void attrWithGetterExceptionAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());
- ExceptionState exceptionState(info.Holder(), info.GetIsolate());
+ ExceptionState exceptionState(ExceptionState::GetterContext, "attrWithGetterException", "TestTypedefs" ,info.Holder(), info.GetIsolate());
int jsValue = imp->attrWithGetterException(exceptionState);
if (UNLIKELY(exceptionState.throwIfNeeded()))
return;
@@ -180,9 +180,9 @@ static void attrWithSetterExceptionAttributeGetterCallback(v8::Local<v8::String>
static void attrWithSetterExceptionAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
+ ExceptionState exceptionState(ExceptionState::SetterContext, "attrWithSetterException", "TestTypedefs", info.Holder(), info.GetIsolate());
TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());
V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue));
- ExceptionState exceptionState(info.Holder(), info.GetIsolate());
imp->setAttrWithSetterException(cppValue, exceptionState);
exceptionState.throwIfNeeded();
}
@@ -197,7 +197,7 @@ static void attrWithSetterExceptionAttributeSetterCallback(v8::Local<v8::String>
static void stringAttrWithGetterExceptionAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());
- ExceptionState exceptionState(info.Holder(), info.GetIsolate());
+ ExceptionState exceptionState(ExceptionState::GetterContext, "stringAttrWithGetterException", "TestTypedefs" ,info.Holder(), info.GetIsolate());
String jsValue = imp->stringAttrWithGetterException(exceptionState);
if (UNLIKELY(exceptionState.throwIfNeeded()))
return;
@@ -240,9 +240,9 @@ static void stringAttrWithSetterExceptionAttributeGetterCallback(v8::Local<v8::S
static void stringAttrWithSetterExceptionAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
+ ExceptionState exceptionState(ExceptionState::SetterContext, "stringAttrWithSetterException", "TestTypedefs", info.Holder(), info.GetIsolate());
TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
- ExceptionState exceptionState(info.Holder(), info.GetIsolate());
imp->setStringAttrWithSetterException(cppValue, exceptionState);
exceptionState.throwIfNeeded();
}
@@ -276,6 +276,7 @@ static void TestTypedefsReplaceableAttributeSetterCallback(v8::Local<v8::String>
static void funcMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "func", "TestTypedefs", info.Holder(), info.GetIsolate());
TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());
if (UNLIKELY(info.Length() <= 0)) {
imp->func();
@@ -294,6 +295,7 @@ static void funcMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
static void setShadowMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "setShadow", "TestTypedefs", info.Holder(), info.GetIsolate());
if (UNLIKELY(info.Length() < 3)) {
throwTypeError(ExceptionMessages::failedToExecute("setShadow", "TestTypedefs", ExceptionMessages::notEnoughArguments(3, info.Length())), info.GetIsolate());
return;
@@ -324,6 +326,7 @@ static void setShadowMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& i
static void methodWithSequenceArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithSequenceArg", "TestTypedefs", info.Holder(), info.GetIsolate());
if (UNLIKELY(info.Length() < 1)) {
throwTypeError(ExceptionMessages::failedToExecute("methodWithSequenceArg", "TestTypedefs", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
return;
@@ -342,6 +345,7 @@ static void methodWithSequenceArgMethodCallback(const v8::FunctionCallbackInfo<v
static void nullableArrayArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "nullableArrayArg", "TestTypedefs", info.Holder(), info.GetIsolate());
if (UNLIKELY(info.Length() < 1)) {
throwTypeError(ExceptionMessages::failedToExecute("nullableArrayArg", "TestTypedefs", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
return;
@@ -361,6 +365,7 @@ static void nullableArrayArgMethodCallback(const v8::FunctionCallbackInfo<v8::Va
static void immutablePointFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "immutablePointFunction", "TestTypedefs", info.Holder(), info.GetIsolate());
TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());
v8SetReturnValue(info, WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(imp->immutablePointFunction())));
}
@@ -374,12 +379,12 @@ static void immutablePointFunctionMethodCallback(const v8::FunctionCallbackInfo<
static void stringArrayFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "stringArrayFunction", "TestTypedefs", info.Holder(), info.GetIsolate());
if (UNLIKELY(info.Length() < 1)) {
throwTypeError(ExceptionMessages::failedToExecute("stringArrayFunction", "TestTypedefs", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
return;
}
TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());
- ExceptionState exceptionState(info.Holder(), info.GetIsolate());
V8TRYCATCH_VOID(Vector<String>, values, toNativeArray<String>(info[0], 1, info.GetIsolate()));
Vector<String> result = imp->stringArrayFunction(values, exceptionState);
if (exceptionState.throwIfNeeded())
@@ -396,12 +401,12 @@ static void stringArrayFunctionMethodCallback(const v8::FunctionCallbackInfo<v8:
static void stringArrayFunction2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
{
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "stringArrayFunction2", "TestTypedefs", info.Holder(), info.GetIsolate());
if (UNLIKELY(info.Length() < 1)) {
throwTypeError(ExceptionMessages::failedToExecute("stringArrayFunction2", "TestTypedefs", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
return;
}
TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());
- ExceptionState exceptionState(info.Holder(), info.GetIsolate());
V8TRYCATCH_VOID(Vector<String>, values, toNativeArray<String>(info[0], 1, info.GetIsolate()));
Vector<String> result = imp->stringArrayFunction2(values, exceptionState);
if (exceptionState.throwIfNeeded())
@@ -418,8 +423,8 @@ static void stringArrayFunction2MethodCallback(const v8::FunctionCallbackInfo<v8
static void methodWithExceptionMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithException", "TestTypedefs", info.Holder(), info.GetIsolate());
TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());
- ExceptionState exceptionState(info.Holder(), info.GetIsolate());
imp->methodWithException(exceptionState);
if (exceptionState.throwIfNeeded())
return;

Powered by Google App Engine
This is Rietveld 408576698