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

Unified Diff: third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp

Issue 2446213002: [Bindings] [Reformat] Reformat template files (Closed)
Patch Set: Rebase (Split out Callbackfunctions) Created 4 years, 2 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
Index: third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp
diff --git a/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp b/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp
index 7193eabcf7ffd00fcf4f893aafcb9ea9db6b3dae..3d23d02301d42e38a20b1adc8b3f2b0e633454d7 100644
--- a/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp
@@ -57,896 +57,799 @@ static_assert(
namespace TestInterface5ImplementationV8Internal {
-static void testInterfaceAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
+static void testInterfaceAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
- TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
+ TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
- v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceAttribute()), impl);
+ v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceAttribute()), impl);
}
-void testInterfaceAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterface5ImplementationV8Internal::testInterfaceAttributeAttributeGetter(info);
+void testInterfaceAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterface5ImplementationV8Internal::testInterfaceAttributeAttributeGetter(info);
}
-static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
- TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
+static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
+ TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface5", "testInterfaceAttribute");
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface5", "testInterfaceAttribute");
- // Prepare the value to be set.
- TestInterface5Implementation* cppValue = V8TestInterface5::toImplWithTypeCheck(info.GetIsolate(), v8Value);
+ // Prepare the value to be set.
+ TestInterface5Implementation* cppValue = V8TestInterface5::toImplWithTypeCheck(info.GetIsolate(), v8Value);
- // Type check per: http://heycam.github.io/webidl/#es-interface
- if (!cppValue) {
- exceptionState.throwTypeError("The provided value is not of type 'TestInterface5'.");
- return;
- }
+ // Type check per: http://heycam.github.io/webidl/#es-interface
+ if (!cppValue) {
+ exceptionState.throwTypeError("The provided value is not of type 'TestInterface5'.");
+ return;
+ }
- impl->setTestInterfaceAttribute(cppValue);
+ impl->setTestInterfaceAttribute(cppValue);
}
-void testInterfaceAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Value> v8Value = info[0];
+void testInterfaceAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Value> v8Value = info[0];
- TestInterface5ImplementationV8Internal::testInterfaceAttributeAttributeSetter(v8Value, info);
+ TestInterface5ImplementationV8Internal::testInterfaceAttributeAttributeSetter(v8Value, info);
}
-static void doubleAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
+static void doubleAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
- TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
+ TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
- v8SetReturnValue(info, impl->doubleAttribute());
+ v8SetReturnValue(info, impl->doubleAttribute());
}
-void doubleAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterface5ImplementationV8Internal::doubleAttributeAttributeGetter(info);
+void doubleAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterface5ImplementationV8Internal::doubleAttributeAttributeGetter(info);
}
-static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
- TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
+static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
+ TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface5", "doubleAttribute");
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface5", "doubleAttribute");
- // Prepare the value to be set.
- double cppValue = toRestrictedDouble(info.GetIsolate(), v8Value, exceptionState);
- if (exceptionState.hadException())
- return;
+ // Prepare the value to be set.
+ double cppValue = toRestrictedDouble(info.GetIsolate(), v8Value, exceptionState);
+ if (exceptionState.hadException())
+ return;
- impl->setDoubleAttribute(cppValue);
+ impl->setDoubleAttribute(cppValue);
}
-void doubleAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Value> v8Value = info[0];
+void doubleAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Value> v8Value = info[0];
- TestInterface5ImplementationV8Internal::doubleAttributeAttributeSetter(v8Value, info);
+ TestInterface5ImplementationV8Internal::doubleAttributeAttributeSetter(v8Value, info);
}
-static void floatAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
+static void floatAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
- TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
+ TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
- v8SetReturnValue(info, impl->floatAttribute());
+ v8SetReturnValue(info, impl->floatAttribute());
}
-void floatAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterface5ImplementationV8Internal::floatAttributeAttributeGetter(info);
+void floatAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterface5ImplementationV8Internal::floatAttributeAttributeGetter(info);
}
-static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
- TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
+static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
+ TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface5", "floatAttribute");
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface5", "floatAttribute");
- // Prepare the value to be set.
- float cppValue = toRestrictedFloat(info.GetIsolate(), v8Value, exceptionState);
- if (exceptionState.hadException())
- return;
+ // Prepare the value to be set.
+ float cppValue = toRestrictedFloat(info.GetIsolate(), v8Value, exceptionState);
+ if (exceptionState.hadException())
+ return;
- impl->setFloatAttribute(cppValue);
+ impl->setFloatAttribute(cppValue);
}
-void floatAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Value> v8Value = info[0];
+void floatAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Value> v8Value = info[0];
- TestInterface5ImplementationV8Internal::floatAttributeAttributeSetter(v8Value, info);
+ TestInterface5ImplementationV8Internal::floatAttributeAttributeSetter(v8Value, info);
}
-static void unrestrictedDoubleAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
+static void unrestrictedDoubleAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
- TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
+ TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
- v8SetReturnValue(info, impl->unrestrictedDoubleAttribute());
+ v8SetReturnValue(info, impl->unrestrictedDoubleAttribute());
}
-void unrestrictedDoubleAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterface5ImplementationV8Internal::unrestrictedDoubleAttributeAttributeGetter(info);
+void unrestrictedDoubleAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterface5ImplementationV8Internal::unrestrictedDoubleAttributeAttributeGetter(info);
}
-static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
- TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
+static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
+ TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface5", "unrestrictedDoubleAttribute");
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface5", "unrestrictedDoubleAttribute");
- // Prepare the value to be set.
- double cppValue = toDouble(info.GetIsolate(), v8Value, exceptionState);
- if (exceptionState.hadException())
- return;
+ // Prepare the value to be set.
+ double cppValue = toDouble(info.GetIsolate(), v8Value, exceptionState);
+ if (exceptionState.hadException())
+ return;
- impl->setUnrestrictedDoubleAttribute(cppValue);
+ impl->setUnrestrictedDoubleAttribute(cppValue);
}
-void unrestrictedDoubleAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Value> v8Value = info[0];
+void unrestrictedDoubleAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Value> v8Value = info[0];
- TestInterface5ImplementationV8Internal::unrestrictedDoubleAttributeAttributeSetter(v8Value, info);
+ TestInterface5ImplementationV8Internal::unrestrictedDoubleAttributeAttributeSetter(v8Value, info);
}
-static void unrestrictedFloatAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
+static void unrestrictedFloatAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
- TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
+ TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
- v8SetReturnValue(info, impl->unrestrictedFloatAttribute());
+ v8SetReturnValue(info, impl->unrestrictedFloatAttribute());
}
-void unrestrictedFloatAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterface5ImplementationV8Internal::unrestrictedFloatAttributeAttributeGetter(info);
+void unrestrictedFloatAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterface5ImplementationV8Internal::unrestrictedFloatAttributeAttributeGetter(info);
}
-static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
- TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
+static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
+ TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface5", "unrestrictedFloatAttribute");
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface5", "unrestrictedFloatAttribute");
- // Prepare the value to be set.
- float cppValue = toFloat(info.GetIsolate(), v8Value, exceptionState);
- if (exceptionState.hadException())
- return;
+ // Prepare the value to be set.
+ float cppValue = toFloat(info.GetIsolate(), v8Value, exceptionState);
+ if (exceptionState.hadException())
+ return;
- impl->setUnrestrictedFloatAttribute(cppValue);
+ impl->setUnrestrictedFloatAttribute(cppValue);
}
-void unrestrictedFloatAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Value> v8Value = info[0];
+void unrestrictedFloatAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Value> v8Value = info[0];
- TestInterface5ImplementationV8Internal::unrestrictedFloatAttributeAttributeSetter(v8Value, info);
+ TestInterface5ImplementationV8Internal::unrestrictedFloatAttributeAttributeSetter(v8Value, info);
}
-static void staticStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8SetReturnValueString(info, TestInterface5Implementation::staticStringAttribute(), info.GetIsolate());
+static void staticStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8SetReturnValueString(info, TestInterface5Implementation::staticStringAttribute(), info.GetIsolate());
}
-void staticStringAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterface5ImplementationV8Internal::staticStringAttributeAttributeGetter(info);
+void staticStringAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterface5ImplementationV8Internal::staticStringAttributeAttributeGetter(info);
}
-static void staticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- // Prepare the value to be set.
- V8StringResource<> cppValue = v8Value;
- if (!cppValue.prepare())
- return;
+static void staticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ // Prepare the value to be set.
+ V8StringResource<> cppValue = v8Value;
+ if (!cppValue.prepare())
+ return;
- TestInterface5Implementation::setStaticStringAttribute(cppValue);
+ TestInterface5Implementation::setStaticStringAttribute(cppValue);
}
-void staticStringAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Value> v8Value = info[0];
+void staticStringAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Value> v8Value = info[0];
- TestInterface5ImplementationV8Internal::staticStringAttributeAttributeSetter(v8Value, info);
+ TestInterface5ImplementationV8Internal::staticStringAttributeAttributeSetter(v8Value, info);
}
-static void alwaysExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
+static void alwaysExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
- TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
+ TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
- v8SetReturnValueInt(info, impl->alwaysExposedAttribute());
+ v8SetReturnValueInt(info, impl->alwaysExposedAttribute());
}
-void alwaysExposedAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterface5ImplementationV8Internal::alwaysExposedAttributeAttributeGetter(info);
+void alwaysExposedAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterface5ImplementationV8Internal::alwaysExposedAttributeAttributeGetter(info);
}
-static void alwaysExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
- TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
+static void alwaysExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
+ TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface5", "alwaysExposedAttribute");
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface5", "alwaysExposedAttribute");
- // Prepare the value to be set.
- int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState);
- if (exceptionState.hadException())
- return;
+ // Prepare the value to be set.
+ int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState);
+ if (exceptionState.hadException())
+ return;
- impl->setAlwaysExposedAttribute(cppValue);
+ impl->setAlwaysExposedAttribute(cppValue);
}
-void alwaysExposedAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Value> v8Value = info[0];
+void alwaysExposedAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Value> v8Value = info[0];
- TestInterface5ImplementationV8Internal::alwaysExposedAttributeAttributeSetter(v8Value, info);
+ TestInterface5ImplementationV8Internal::alwaysExposedAttributeAttributeSetter(v8Value, info);
}
-static void workerExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
+static void workerExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
- TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
+ TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
- v8SetReturnValueInt(info, impl->workerExposedAttribute());
+ v8SetReturnValueInt(info, impl->workerExposedAttribute());
}
-void workerExposedAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterface5ImplementationV8Internal::workerExposedAttributeAttributeGetter(info);
+void workerExposedAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterface5ImplementationV8Internal::workerExposedAttributeAttributeGetter(info);
}
-static void workerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
- TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
+static void workerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
+ TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface5", "workerExposedAttribute");
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface5", "workerExposedAttribute");
- // Prepare the value to be set.
- int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState);
- if (exceptionState.hadException())
- return;
+ // Prepare the value to be set.
+ int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState);
+ if (exceptionState.hadException())
+ return;
- impl->setWorkerExposedAttribute(cppValue);
+ impl->setWorkerExposedAttribute(cppValue);
}
-void workerExposedAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Value> v8Value = info[0];
+void workerExposedAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Value> v8Value = info[0];
- TestInterface5ImplementationV8Internal::workerExposedAttributeAttributeSetter(v8Value, info);
+ TestInterface5ImplementationV8Internal::workerExposedAttributeAttributeSetter(v8Value, info);
}
-static void windowExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
+static void windowExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
- TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
+ TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
- v8SetReturnValueInt(info, impl->windowExposedAttribute());
+ v8SetReturnValueInt(info, impl->windowExposedAttribute());
}
-void windowExposedAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeGetter(info);
+void windowExposedAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeGetter(info);
}
-static void windowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
- TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
+static void windowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
+ TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface5", "windowExposedAttribute");
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface5", "windowExposedAttribute");
- // Prepare the value to be set.
- int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState);
- if (exceptionState.hadException())
- return;
+ // Prepare the value to be set.
+ int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState);
+ if (exceptionState.hadException())
+ return;
- impl->setWindowExposedAttribute(cppValue);
+ impl->setWindowExposedAttribute(cppValue);
}
-void windowExposedAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Value> v8Value = info[0];
+void windowExposedAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Value> v8Value = info[0];
- TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeSetter(v8Value, info);
+ TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeSetter(v8Value, info);
}
-static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
+static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
- if (UNLIKELY(info.Length() < 1)) {
- V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodTestInterfaceEmptyArg", "TestInterface5", ExceptionMessages::notEnoughArguments(1, info.Length())));
- return;
- }
+ if (UNLIKELY(info.Length() < 1)) {
+ V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodTestInterfaceEmptyArg", "TestInterface5", ExceptionMessages::notEnoughArguments(1, info.Length())));
+ return;
+ }
- TestInterfaceEmpty* testInterfaceEmptyArg;
- testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIsolate(), info[0]);
- if (!testInterfaceEmptyArg) {
- V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodTestInterfaceEmptyArg", "TestInterface5", "parameter 1 is not of type 'TestInterfaceEmpty'."));
+ TestInterfaceEmpty* testInterfaceEmptyArg;
+ testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIsolate(), info[0]);
+ if (!testInterfaceEmptyArg) {
+ V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodTestInterfaceEmptyArg", "TestInterface5", "parameter 1 is not of type 'TestInterfaceEmpty'."));
- return;
- }
+ return;
+ }
- impl->voidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg);
+ impl->voidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg);
}
-void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterface5ImplementationV8Internal::voidMethodTestInterfaceEmptyArgMethod(info);
+void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterface5ImplementationV8Internal::voidMethodTestInterfaceEmptyArgMethod(info);
}
-static void voidMethodDoubleArgFloatArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestInterface5", "voidMethodDoubleArgFloatArg");
+static void voidMethodDoubleArgFloatArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestInterface5", "voidMethodDoubleArgFloatArg");
- TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
+ TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
- if (UNLIKELY(info.Length() < 2)) {
- exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, info.Length()));
- return;
- }
+ if (UNLIKELY(info.Length() < 2)) {
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, info.Length()));
+ return;
+ }
- double doubleArg;
- float floatArg;
- doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionState);
- if (exceptionState.hadException())
- return;
+ double doubleArg;
+ float floatArg;
+ doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionState);
+ if (exceptionState.hadException())
+ return;
- floatArg = toRestrictedFloat(info.GetIsolate(), info[1], exceptionState);
- if (exceptionState.hadException())
- return;
+ floatArg = toRestrictedFloat(info.GetIsolate(), info[1], exceptionState);
+ if (exceptionState.hadException())
+ return;
- impl->voidMethodDoubleArgFloatArg(doubleArg, floatArg);
+ impl->voidMethodDoubleArgFloatArg(doubleArg, floatArg);
}
-void voidMethodDoubleArgFloatArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterface5ImplementationV8Internal::voidMethodDoubleArgFloatArgMethod(info);
+void voidMethodDoubleArgFloatArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterface5ImplementationV8Internal::voidMethodDoubleArgFloatArgMethod(info);
}
-static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestInterface5", "voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg");
+static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestInterface5", "voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg");
- TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
+ TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
- if (UNLIKELY(info.Length() < 2)) {
- exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, info.Length()));
- return;
- }
+ if (UNLIKELY(info.Length() < 2)) {
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, info.Length()));
+ return;
+ }
- double unrestrictedDoubleArg;
- float unrestrictedFloatArg;
- unrestrictedDoubleArg = toDouble(info.GetIsolate(), info[0], exceptionState);
- if (exceptionState.hadException())
- return;
+ double unrestrictedDoubleArg;
+ float unrestrictedFloatArg;
+ unrestrictedDoubleArg = toDouble(info.GetIsolate(), info[0], exceptionState);
+ if (exceptionState.hadException())
+ return;
- unrestrictedFloatArg = toFloat(info.GetIsolate(), info[1], exceptionState);
- if (exceptionState.hadException())
- return;
+ unrestrictedFloatArg = toFloat(info.GetIsolate(), info[1], exceptionState);
+ if (exceptionState.hadException())
+ return;
- impl->voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg(unrestrictedDoubleArg, unrestrictedFloatArg);
+ impl->voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg(unrestrictedDoubleArg, unrestrictedFloatArg);
}
-void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterface5ImplementationV8Internal::voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethod(info);
+void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterface5ImplementationV8Internal::voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethod(info);
}
-static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
+static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
- impl->voidMethod();
+ impl->voidMethod();
}
-void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterface5ImplementationV8Internal::voidMethodMethod(info);
+void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterface5ImplementationV8Internal::voidMethodMethod(info);
}
-static void voidMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
+static void voidMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
- impl->voidMethod();
+ impl->voidMethod();
}
-void voidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterface5ImplementationV8Internal::voidMethodMethodForMainWorld(info);
+void voidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterface5ImplementationV8Internal::voidMethodMethodForMainWorld(info);
}
-static void alwaysExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
+static void alwaysExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
- impl->alwaysExposedMethod();
+ impl->alwaysExposedMethod();
}
-void alwaysExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterface5ImplementationV8Internal::alwaysExposedMethodMethod(info);
+void alwaysExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterface5ImplementationV8Internal::alwaysExposedMethodMethod(info);
}
-static void workerExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
+static void workerExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
- impl->workerExposedMethod();
+ impl->workerExposedMethod();
}
-void workerExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterface5ImplementationV8Internal::workerExposedMethodMethod(info);
+void workerExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterface5ImplementationV8Internal::workerExposedMethodMethod(info);
}
-static void windowExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
+static void windowExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
- impl->windowExposedMethod();
+ impl->windowExposedMethod();
}
-void windowExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterface5ImplementationV8Internal::windowExposedMethodMethod(info);
+void windowExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterface5ImplementationV8Internal::windowExposedMethodMethod(info);
}
-static void alwaysExposedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterface5Implementation::alwaysExposedStaticMethod();
+static void alwaysExposedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterface5Implementation::alwaysExposedStaticMethod();
}
-void alwaysExposedStaticMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterface5ImplementationV8Internal::alwaysExposedStaticMethodMethod(info);
+void alwaysExposedStaticMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterface5ImplementationV8Internal::alwaysExposedStaticMethodMethod(info);
}
-static void workerExposedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterface5Implementation::workerExposedStaticMethod();
+static void workerExposedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterface5Implementation::workerExposedStaticMethod();
}
-void workerExposedStaticMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterface5ImplementationV8Internal::workerExposedStaticMethodMethod(info);
+void workerExposedStaticMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterface5ImplementationV8Internal::workerExposedStaticMethodMethod(info);
}
-static void windowExposedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterface5Implementation::windowExposedStaticMethod();
+static void windowExposedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterface5Implementation::windowExposedStaticMethod();
}
-void windowExposedStaticMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterface5ImplementationV8Internal::windowExposedStaticMethodMethod(info);
+void windowExposedStaticMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterface5ImplementationV8Internal::windowExposedStaticMethodMethod(info);
}
-static void windowAndServiceWorkerExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
+static void windowAndServiceWorkerExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
- impl->windowAndServiceWorkerExposedMethod();
+ impl->windowAndServiceWorkerExposedMethod();
}
-void windowAndServiceWorkerExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterface5ImplementationV8Internal::windowAndServiceWorkerExposedMethodMethod(info);
+void windowAndServiceWorkerExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterface5ImplementationV8Internal::windowAndServiceWorkerExposedMethodMethod(info);
}
-static void voidMethodBooleanOrDOMStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestInterface5", "voidMethodBooleanOrDOMStringArg");
+static void voidMethodBooleanOrDOMStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestInterface5", "voidMethodBooleanOrDOMStringArg");
- TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
+ TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
- if (UNLIKELY(info.Length() < 1)) {
- exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
- return;
- }
+ if (UNLIKELY(info.Length() < 1)) {
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
+ return;
+ }
- BooleanOrString arg;
- V8BooleanOrString::toImpl(info.GetIsolate(), info[0], arg, UnionTypeConversionMode::NotNullable, exceptionState);
- if (exceptionState.hadException())
- return;
+ BooleanOrString arg;
+ V8BooleanOrString::toImpl(info.GetIsolate(), info[0], arg, UnionTypeConversionMode::NotNullable, exceptionState);
+ if (exceptionState.hadException())
+ return;
- impl->voidMethodBooleanOrDOMStringArg(arg);
+ impl->voidMethodBooleanOrDOMStringArg(arg);
}
-void voidMethodBooleanOrDOMStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterface5ImplementationV8Internal::voidMethodBooleanOrDOMStringArgMethod(info);
+void voidMethodBooleanOrDOMStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterface5ImplementationV8Internal::voidMethodBooleanOrDOMStringArgMethod(info);
}
-static void voidMethodDoubleOrDOMStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestInterface5", "voidMethodDoubleOrDOMStringArg");
+static void voidMethodDoubleOrDOMStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestInterface5", "voidMethodDoubleOrDOMStringArg");
- TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
+ TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
- if (UNLIKELY(info.Length() < 1)) {
- exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
- return;
- }
+ if (UNLIKELY(info.Length() < 1)) {
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
+ return;
+ }
- DoubleOrString arg;
- V8DoubleOrString::toImpl(info.GetIsolate(), info[0], arg, UnionTypeConversionMode::NotNullable, exceptionState);
- if (exceptionState.hadException())
- return;
+ DoubleOrString arg;
+ V8DoubleOrString::toImpl(info.GetIsolate(), info[0], arg, UnionTypeConversionMode::NotNullable, exceptionState);
+ if (exceptionState.hadException())
+ return;
- impl->voidMethodDoubleOrDOMStringArg(arg);
+ impl->voidMethodDoubleOrDOMStringArg(arg);
}
-void voidMethodDoubleOrDOMStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterface5ImplementationV8Internal::voidMethodDoubleOrDOMStringArgMethod(info);
+void voidMethodDoubleOrDOMStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterface5ImplementationV8Internal::voidMethodDoubleOrDOMStringArgMethod(info);
}
-static void voidMethodVoidExperimentalCallbackFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
+static void voidMethodVoidExperimentalCallbackFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
- if (UNLIKELY(info.Length() < 1)) {
- V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodVoidExperimentalCallbackFunction", "TestInterface5", ExceptionMessages::notEnoughArguments(1, info.Length())));
- return;
- }
+ if (UNLIKELY(info.Length() < 1)) {
+ V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodVoidExperimentalCallbackFunction", "TestInterface5", ExceptionMessages::notEnoughArguments(1, info.Length())));
+ return;
+ }
- VoidExperimentalCallbackFunction* arg;
- arg = V8VoidExperimentalCallbackFunction::toImplWithTypeCheck(info.GetIsolate(), info[0]);
- if (!arg) {
- V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodVoidExperimentalCallbackFunction", "TestInterface5", "parameter 1 is not of type 'VoidExperimentalCallbackFunction'."));
+ VoidExperimentalCallbackFunction* arg;
+ arg = V8VoidExperimentalCallbackFunction::toImplWithTypeCheck(info.GetIsolate(), info[0]);
+ if (!arg) {
+ V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodVoidExperimentalCallbackFunction", "TestInterface5", "parameter 1 is not of type 'VoidExperimentalCallbackFunction'."));
- return;
- }
+ return;
+ }
- impl->voidMethodVoidExperimentalCallbackFunction(arg);
+ impl->voidMethodVoidExperimentalCallbackFunction(arg);
}
-void voidMethodVoidExperimentalCallbackFunctionMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterface5ImplementationV8Internal::voidMethodVoidExperimentalCallbackFunctionMethod(info);
+void voidMethodVoidExperimentalCallbackFunctionMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterface5ImplementationV8Internal::voidMethodVoidExperimentalCallbackFunctionMethod(info);
}
-static void voidMethodVoidCallbackFunctionModulesArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
+static void voidMethodVoidCallbackFunctionModulesArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
- if (UNLIKELY(info.Length() < 1)) {
- V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodVoidCallbackFunctionModulesArg", "TestInterface5", ExceptionMessages::notEnoughArguments(1, info.Length())));
- return;
- }
+ if (UNLIKELY(info.Length() < 1)) {
+ V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodVoidCallbackFunctionModulesArg", "TestInterface5", ExceptionMessages::notEnoughArguments(1, info.Length())));
+ return;
+ }
- VoidCallbackFunctionModules* arg;
- if (!info[0]->IsFunction()) {
- V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodVoidCallbackFunctionModulesArg", "TestInterface5", "The callback provided as parameter 1 is not a function."));
+ VoidCallbackFunctionModules* arg;
+ if (!info[0]->IsFunction()) {
+ V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodVoidCallbackFunctionModulesArg", "TestInterface5", "The callback provided as parameter 1 is not a function."));
- return;
- }
- arg = VoidCallbackFunctionModules::create(ScriptState::current(info.GetIsolate()), v8::Local<v8::Function>::Cast(info[0]));
+ return;
+ }
+ arg = VoidCallbackFunctionModules::create(ScriptState::current(info.GetIsolate()), v8::Local<v8::Function>::Cast(info[0]));
- impl->voidMethodVoidCallbackFunctionModulesArg(arg);
+ impl->voidMethodVoidCallbackFunctionModulesArg(arg);
}
-void voidMethodVoidCallbackFunctionModulesArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterface5ImplementationV8Internal::voidMethodVoidCallbackFunctionModulesArgMethod(info);
+void voidMethodVoidCallbackFunctionModulesArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterface5ImplementationV8Internal::voidMethodVoidCallbackFunctionModulesArgMethod(info);
}
-static void keysMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestInterface5", "keys");
+static void keysMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestInterface5", "keys");
- TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
+ TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
- ScriptState* scriptState = ScriptState::forReceiverObject(info);
+ ScriptState* scriptState = ScriptState::forReceiverObject(info);
- Iterator* result = impl->keysForBinding(scriptState, exceptionState);
- if (exceptionState.hadException()) {
- return;
- }
- v8SetReturnValue(info, result);
+ Iterator* result = impl->keysForBinding(scriptState, exceptionState);
+ if (exceptionState.hadException()) {
+ return;
+ }
+ v8SetReturnValue(info, result);
}
-void keysMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterface5ImplementationV8Internal::keysMethod(info);
+void keysMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterface5ImplementationV8Internal::keysMethod(info);
}
-static void valuesMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestInterface5", "values");
+static void valuesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestInterface5", "values");
- TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
+ TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
- ScriptState* scriptState = ScriptState::forReceiverObject(info);
+ ScriptState* scriptState = ScriptState::forReceiverObject(info);
- Iterator* result = impl->valuesForBinding(scriptState, exceptionState);
- if (exceptionState.hadException()) {
- return;
- }
- v8SetReturnValue(info, result);
+ Iterator* result = impl->valuesForBinding(scriptState, exceptionState);
+ if (exceptionState.hadException()) {
+ return;
+ }
+ v8SetReturnValue(info, result);
}
-void valuesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterface5ImplementationV8Internal::valuesMethod(info);
+void valuesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterface5ImplementationV8Internal::valuesMethod(info);
}
-static void entriesMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestInterface5", "entries");
+static void entriesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestInterface5", "entries");
- TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
+ TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
- ScriptState* scriptState = ScriptState::forReceiverObject(info);
+ ScriptState* scriptState = ScriptState::forReceiverObject(info);
- Iterator* result = impl->entriesForBinding(scriptState, exceptionState);
- if (exceptionState.hadException()) {
- return;
- }
- v8SetReturnValue(info, result);
+ Iterator* result = impl->entriesForBinding(scriptState, exceptionState);
+ if (exceptionState.hadException()) {
+ return;
+ }
+ v8SetReturnValue(info, result);
}
-void entriesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterface5ImplementationV8Internal::entriesMethod(info);
+void entriesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterface5ImplementationV8Internal::entriesMethod(info);
}
-static void forEachMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestInterface5", "forEach");
+static void forEachMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestInterface5", "forEach");
- TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
+ TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
- ScriptState* scriptState = ScriptState::forReceiverObject(info);
+ ScriptState* scriptState = ScriptState::forReceiverObject(info);
- if (UNLIKELY(info.Length() < 1)) {
- exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
- return;
- }
+ if (UNLIKELY(info.Length() < 1)) {
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
+ return;
+ }
- ScriptValue callback;
- ScriptValue thisArg;
- if (!info[0]->IsFunction()) {
- exceptionState.throwTypeError("The callback provided as parameter 1 is not a function.");
+ ScriptValue callback;
+ ScriptValue thisArg;
+ if (!info[0]->IsFunction()) {
+ exceptionState.throwTypeError("The callback provided as parameter 1 is not a function.");
- return;
- }
- callback = ScriptValue(ScriptState::current(info.GetIsolate()), info[0]);
+ return;
+ }
+ callback = ScriptValue(ScriptState::current(info.GetIsolate()), info[0]);
- thisArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[1]);
+ thisArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[1]);
- impl->forEachForBinding(scriptState, ScriptValue(scriptState, info.Holder()), callback, thisArg, exceptionState);
- if (exceptionState.hadException()) {
- return;
- }
+ impl->forEachForBinding(scriptState, ScriptValue(scriptState, info.Holder()), callback, thisArg, exceptionState);
+ if (exceptionState.hadException()) {
+ return;
+ }
}
-void forEachMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterface5ImplementationV8Internal::forEachMethod(info);
+void forEachMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterface5ImplementationV8Internal::forEachMethod(info);
}
-static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
+static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
- v8SetReturnValueString(info, impl->toString(), info.GetIsolate());
+ v8SetReturnValueString(info, impl->toString(), info.GetIsolate());
}
-void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterface5ImplementationV8Internal::toStringMethod(info);
+void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterface5ImplementationV8Internal::toStringMethod(info);
}
-static void iteratorMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestInterface5", "iterator");
+static void iteratorMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestInterface5", "iterator");
- TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
+ TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
- ScriptState* scriptState = ScriptState::forReceiverObject(info);
+ ScriptState* scriptState = ScriptState::forReceiverObject(info);
- Iterator* result = impl->iterator(scriptState, exceptionState);
- if (exceptionState.hadException()) {
- return;
- }
- v8SetReturnValue(info, result);
+ Iterator* result = impl->iterator(scriptState, exceptionState);
+ if (exceptionState.hadException()) {
+ return;
+ }
+ v8SetReturnValue(info, result);
}
-void iteratorMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterface5ImplementationV8Internal::iteratorMethod(info);
+void iteratorMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterface5ImplementationV8Internal::iteratorMethod(info);
}
-static void namedPropertyGetter(const AtomicString& name, const v8::PropertyCallbackInfo<v8::Value>& info)
-{
- TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
- String result = impl->anonymousNamedGetter(name);
- if (result.isNull())
- return;
- v8SetReturnValueString(info, result, info.GetIsolate());
+static void namedPropertyGetter(const AtomicString& name, const v8::PropertyCallbackInfo<v8::Value>& info) {
+ TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
+ String result = impl->anonymousNamedGetter(name);
+ if (result.isNull())
+ return;
+ v8SetReturnValueString(info, result, info.GetIsolate());
}
-void namedPropertyGetterCallback(v8::Local<v8::Name> name, const v8::PropertyCallbackInfo<v8::Value>& info)
-{
- if (!name->IsString())
- return;
- const AtomicString& propertyName = toCoreAtomicString(name.As<v8::String>());
+void namedPropertyGetterCallback(v8::Local<v8::Name> name, const v8::PropertyCallbackInfo<v8::Value>& info) {
+ if (!name->IsString())
+ return;
+ const AtomicString& propertyName = toCoreAtomicString(name.As<v8::String>());
- TestInterface5ImplementationV8Internal::namedPropertyGetter(propertyName, info);
+ TestInterface5ImplementationV8Internal::namedPropertyGetter(propertyName, info);
}
-static void namedPropertySetter(const AtomicString& name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info)
-{
- TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
- V8StringResource<> propertyValue = v8Value;
- if (!propertyValue.prepare())
- return;
+static void namedPropertySetter(const AtomicString& name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info) {
+ TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
+ V8StringResource<> propertyValue = v8Value;
+ if (!propertyValue.prepare())
+ return;
- bool result = impl->anonymousNamedSetter(name, propertyValue);
- if (!result)
- return;
- v8SetReturnValue(info, v8Value);
+ bool result = impl->anonymousNamedSetter(name, propertyValue);
+ if (!result)
+ return;
+ v8SetReturnValue(info, v8Value);
}
-void namedPropertySetterCallback(v8::Local<v8::Name> name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info)
-{
- if (!name->IsString())
- return;
- const AtomicString& propertyName = toCoreAtomicString(name.As<v8::String>());
+void namedPropertySetterCallback(v8::Local<v8::Name> name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info) {
+ if (!name->IsString())
+ return;
+ const AtomicString& propertyName = toCoreAtomicString(name.As<v8::String>());
- TestInterface5ImplementationV8Internal::namedPropertySetter(propertyName, v8Value, info);
+ TestInterface5ImplementationV8Internal::namedPropertySetter(propertyName, v8Value, info);
}
-static void namedPropertyDeleter(const AtomicString& name, const v8::PropertyCallbackInfo<v8::Boolean>& info)
-{
- TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
+static void namedPropertyDeleter(const AtomicString& name, const v8::PropertyCallbackInfo<v8::Boolean>& info) {
+ TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
- DeleteResult result = impl->anonymousNamedDeleter(name);
- if (result == DeleteUnknownProperty)
- return;
- v8SetReturnValue(info, result == DeleteSuccess);
+ DeleteResult result = impl->anonymousNamedDeleter(name);
+ if (result == DeleteUnknownProperty)
+ return;
+ v8SetReturnValue(info, result == DeleteSuccess);
}
-void namedPropertyDeleterCallback(v8::Local<v8::Name> name, const v8::PropertyCallbackInfo<v8::Boolean>& info)
-{
- if (!name->IsString())
- return;
- const AtomicString& propertyName = toCoreAtomicString(name.As<v8::String>());
+void namedPropertyDeleterCallback(v8::Local<v8::Name> name, const v8::PropertyCallbackInfo<v8::Boolean>& info) {
+ if (!name->IsString())
+ return;
+ const AtomicString& propertyName = toCoreAtomicString(name.As<v8::String>());
- TestInterface5ImplementationV8Internal::namedPropertyDeleter(propertyName, info);
+ TestInterface5ImplementationV8Internal::namedPropertyDeleter(propertyName, info);
}
-static void namedPropertyQuery(const AtomicString& name, const v8::PropertyCallbackInfo<v8::Integer>& info)
-{
- const CString& nameInUtf8 = name.utf8();
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::GetterContext, "TestInterface5", nameInUtf8.data());
+static void namedPropertyQuery(const AtomicString& name, const v8::PropertyCallbackInfo<v8::Integer>& info) {
+ const CString& nameInUtf8 = name.utf8();
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::GetterContext, "TestInterface5", nameInUtf8.data());
- TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
+ TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
- bool result = impl->namedPropertyQuery(name, exceptionState);
- if (!result)
- return;
- v8SetReturnValueInt(info, v8::None);
+ bool result = impl->namedPropertyQuery(name, exceptionState);
+ if (!result)
+ return;
+ v8SetReturnValueInt(info, v8::None);
}
-void namedPropertyQueryCallback(v8::Local<v8::Name> name, const v8::PropertyCallbackInfo<v8::Integer>& info)
-{
- if (!name->IsString())
- return;
- const AtomicString& propertyName = toCoreAtomicString(name.As<v8::String>());
+void namedPropertyQueryCallback(v8::Local<v8::Name> name, const v8::PropertyCallbackInfo<v8::Integer>& info) {
+ if (!name->IsString())
+ return;
+ const AtomicString& propertyName = toCoreAtomicString(name.As<v8::String>());
- TestInterface5ImplementationV8Internal::namedPropertyQuery(propertyName, info);
+ TestInterface5ImplementationV8Internal::namedPropertyQuery(propertyName, info);
}
-static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& info)
-{
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::EnumerationContext, "TestInterface5");
+static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& info) {
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::EnumerationContext, "TestInterface5");
- TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
+ TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
- Vector<String> names;
- impl->namedPropertyEnumerator(names, exceptionState);
- if (exceptionState.hadException())
- return;
- v8SetReturnValue(info, toV8(names, info.Holder(), info.GetIsolate()).As<v8::Array>());
+ Vector<String> names;
+ impl->namedPropertyEnumerator(names, exceptionState);
+ if (exceptionState.hadException())
+ return;
+ v8SetReturnValue(info, toV8(names, info.Holder(), info.GetIsolate()).As<v8::Array>());
}
-void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::Array>& info)
-{
- TestInterface5ImplementationV8Internal::namedPropertyEnumerator(info);
+void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::Array>& info) {
+ TestInterface5ImplementationV8Internal::namedPropertyEnumerator(info);
}
-static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo<v8::Value>& info)
-{
- TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
+static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo<v8::Value>& info) {
+ TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
- // We assume that all the implementations support length() method, although
- // the spec doesn't require that length() must exist. It's okay that
- // the interface does not have length attribute as long as the
- // implementation supports length() member function.
- if (index >= impl->length())
- return; // Returns undefined due to out-of-range.
+ // We assume that all the implementations support length() method, although
+ // the spec doesn't require that length() must exist. It's okay that
+ // the interface does not have length attribute as long as the
+ // implementation supports length() member function.
+ if (index >= impl->length())
+ return; // Returns undefined due to out-of-range.
- String result = impl->anonymousIndexedGetter(index);
- v8SetReturnValueString(info, result, info.GetIsolate());
+ String result = impl->anonymousIndexedGetter(index);
+ v8SetReturnValueString(info, result, info.GetIsolate());
}
-void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCallbackInfo<v8::Value>& info)
-{
- TestInterface5ImplementationV8Internal::indexedPropertyGetter(index, info);
+void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCallbackInfo<v8::Value>& info) {
+ TestInterface5ImplementationV8Internal::indexedPropertyGetter(index, info);
}
-static void indexedPropertySetter(uint32_t index, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info)
-{
- TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
- V8StringResource<> propertyValue = v8Value;
- if (!propertyValue.prepare())
- return;
+static void indexedPropertySetter(uint32_t index, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info) {
+ TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
+ V8StringResource<> propertyValue = v8Value;
+ if (!propertyValue.prepare())
+ return;
- bool result = impl->anonymousIndexedSetter(index, propertyValue);
- if (!result)
- return;
- v8SetReturnValue(info, v8Value);
+ bool result = impl->anonymousIndexedSetter(index, propertyValue);
+ if (!result)
+ return;
+ v8SetReturnValue(info, v8Value);
}
-void indexedPropertySetterCallback(uint32_t index, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info)
-{
- TestInterface5ImplementationV8Internal::indexedPropertySetter(index, v8Value, info);
+void indexedPropertySetterCallback(uint32_t index, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info) {
+ TestInterface5ImplementationV8Internal::indexedPropertySetter(index, v8Value, info);
}
-static void indexedPropertyDeleter(uint32_t index, const v8::PropertyCallbackInfo<v8::Boolean>& info)
-{
- TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
+static void indexedPropertyDeleter(uint32_t index, const v8::PropertyCallbackInfo<v8::Boolean>& info) {
+ TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder());
- DeleteResult result = impl->anonymousIndexedDeleter(index);
- if (result == DeleteUnknownProperty)
- return;
- v8SetReturnValue(info, result == DeleteSuccess);
+ DeleteResult result = impl->anonymousIndexedDeleter(index);
+ if (result == DeleteUnknownProperty)
+ return;
+ v8SetReturnValue(info, result == DeleteSuccess);
}
-void indexedPropertyDeleterCallback(uint32_t index, const v8::PropertyCallbackInfo<v8::Boolean>& info)
-{
- TestInterface5ImplementationV8Internal::indexedPropertyDeleter(index, info);
+void indexedPropertyDeleterCallback(uint32_t index, const v8::PropertyCallbackInfo<v8::Boolean>& info) {
+ TestInterface5ImplementationV8Internal::indexedPropertyDeleter(index, info);
}
} // namespace TestInterface5ImplementationV8Internal
-void V8TestInterface5::visitDOMWrapper(v8::Isolate* isolate, ScriptWrappable* scriptWrappable, const v8::Persistent<v8::Object>& wrapper)
-{
- TestInterface5Implementation* impl = scriptWrappable->toImpl<TestInterface5Implementation>();
- TestInterface5Implementation* referencedName = impl->referencedName();
- if (referencedName) {
- DOMWrapperWorld::setWrapperReferencesInAllWorlds(wrapper, referencedName, isolate);
- }
+void V8TestInterface5::visitDOMWrapper(v8::Isolate* isolate, ScriptWrappable* scriptWrappable, const v8::Persistent<v8::Object>& wrapper) {
+ TestInterface5Implementation* impl = scriptWrappable->toImpl<TestInterface5Implementation>();
+ TestInterface5Implementation* referencedName = impl->referencedName();
+ if (referencedName) {
+ DOMWrapperWorld::setWrapperReferencesInAllWorlds(wrapper, referencedName, isolate);
+ }
}
// Suppress warning: global constructors, because AttributeConfiguration is trivial
@@ -990,98 +893,92 @@ const V8DOMConfiguration::MethodConfiguration V8TestInterface5Methods[] = {
{"toString", TestInterface5ImplementationV8Internal::toStringMethodCallback, 0, 0, static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype},
};
-static void installV8TestInterface5Template(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate)
-{
- // Initialize the interface object's template.
- V8DOMConfiguration::initializeDOMInterfaceTemplate(isolate, interfaceTemplate, V8TestInterface5::wrapperTypeInfo.interfaceName, V8TestInterfaceEmpty::domTemplate(isolate, world), V8TestInterface5::internalFieldCount);
- v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemplate);
- ALLOW_UNUSED_LOCAL(signature);
- v8::Local<v8::ObjectTemplate> instanceTemplate = interfaceTemplate->InstanceTemplate();
- ALLOW_UNUSED_LOCAL(instanceTemplate);
- v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->PrototypeTemplate();
- ALLOW_UNUSED_LOCAL(prototypeTemplate);
- // Register DOM constants, attributes and operations.
- if (RuntimeEnabledFeatures::featureNameEnabled()) {
- const V8DOMConfiguration::ConstantConfiguration V8TestInterface5Constants[] = {
- {"UNSIGNED_LONG", 0, 0, V8DOMConfiguration::ConstantTypeUnsignedLong},
- {"CONST_JAVASCRIPT", 1, 0, V8DOMConfiguration::ConstantTypeShort},
- };
- V8DOMConfiguration::installConstants(isolate, interfaceTemplate, prototypeTemplate, V8TestInterface5Constants, WTF_ARRAY_LENGTH(V8TestInterface5Constants));
- V8DOMConfiguration::installAttributes(isolate, world, instanceTemplate, prototypeTemplate, V8TestInterface5Attributes, WTF_ARRAY_LENGTH(V8TestInterface5Attributes));
- V8DOMConfiguration::installAccessors(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestInterface5Accessors, WTF_ARRAY_LENGTH(V8TestInterface5Accessors));
- V8DOMConfiguration::installMethods(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestInterface5Methods, WTF_ARRAY_LENGTH(V8TestInterface5Methods));
- }
-
- // Indexed properties
- v8::IndexedPropertyHandlerConfiguration indexedPropertyHandlerConfig(TestInterface5ImplementationV8Internal::indexedPropertyGetterCallback, TestInterface5ImplementationV8Internal::indexedPropertySetterCallback, 0, TestInterface5ImplementationV8Internal::indexedPropertyDeleterCallback, indexedPropertyEnumerator<TestInterface5Implementation>, v8::Local<v8::Value>(), v8::PropertyHandlerFlags::kNone);
- instanceTemplate->SetHandler(indexedPropertyHandlerConfig);
- // Named properties
- v8::NamedPropertyHandlerConfiguration namedPropertyHandlerConfig(TestInterface5ImplementationV8Internal::namedPropertyGetterCallback, TestInterface5ImplementationV8Internal::namedPropertySetterCallback, TestInterface5ImplementationV8Internal::namedPropertyQueryCallback, TestInterface5ImplementationV8Internal::namedPropertyDeleterCallback, TestInterface5ImplementationV8Internal::namedPropertyEnumeratorCallback, v8::Local<v8::Value>(), static_cast<v8::PropertyHandlerFlags>(int(v8::PropertyHandlerFlags::kOnlyInterceptStrings) | int(v8::PropertyHandlerFlags::kNonMasking)));
- instanceTemplate->SetHandler(namedPropertyHandlerConfig);
-
- // Iterator (@@iterator)
- const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIteratorConfiguration = { v8::Symbol::GetIterator, TestInterface5ImplementationV8Internal::iteratorMethodCallback, 0, v8::DontEnum, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype };
- V8DOMConfiguration::installMethod(isolate, world, prototypeTemplate, signature, symbolKeyedIteratorConfiguration);
-
- instanceTemplate->SetCallAsFunctionHandler(V8TestInterface5::legacyCallCustom);
-}
-
-v8::Local<v8::FunctionTemplate> V8TestInterface5::domTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world)
-{
- return V8DOMConfiguration::domClassTemplate(isolate, world, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), installV8TestInterface5Template);
-}
-
-bool V8TestInterface5::hasInstance(v8::Local<v8::Value> v8Value, v8::Isolate* isolate)
-{
- return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Value);
-}
-
-v8::Local<v8::Object> V8TestInterface5::findInstanceInPrototypeChain(v8::Local<v8::Value> v8Value, v8::Isolate* isolate)
-{
- return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrapperTypeInfo, v8Value);
-}
-
-TestInterface5Implementation* V8TestInterface5::toImplWithTypeCheck(v8::Isolate* isolate, v8::Local<v8::Value> value)
-{
- return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(value)) : nullptr;
-}
-
-void V8TestInterface5::preparePrototypeAndInterfaceObject(v8::Local<v8::Context> context, const DOMWrapperWorld& world, v8::Local<v8::Object> prototypeObject, v8::Local<v8::Function> interfaceObject, v8::Local<v8::FunctionTemplate> interfaceTemplate)
-{
- v8::Isolate* isolate = context->GetIsolate();
- ExecutionContext* executionContext = toExecutionContext(context);
- v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemplate);
- if (executionContext && (executionContext->isWorkerGlobalScope())) {
- const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"workerExposedAttribute", TestInterface5ImplementationV8Internal::workerExposedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::workerExposedAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder};
- V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration);
- }
- if (executionContext && (executionContext->isDocument())) {
- const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"windowExposedAttribute", TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder};
- V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration);
- }
- v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemplate);
- ExecutionContext* executionContext = toExecutionContext(prototypeObject->CreationContext());
- ASSERT(executionContext);
- if (executionContext && (executionContext->isWorkerGlobalScope())) {
- const V8DOMConfiguration::MethodConfiguration workerExposedMethodMethodConfiguration = {"workerExposedMethod", TestInterface5ImplementationV8Internal::workerExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
- V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, workerExposedMethodMethodConfiguration);
- }
- if (executionContext && (executionContext->isDocument())) {
- const V8DOMConfiguration::MethodConfiguration windowExposedMethodMethodConfiguration = {"windowExposedMethod", TestInterface5ImplementationV8Internal::windowExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
- V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, windowExposedMethodMethodConfiguration);
- }
- if (executionContext && (executionContext->isWorkerGlobalScope())) {
- const V8DOMConfiguration::MethodConfiguration workerExposedStaticMethodMethodConfiguration = {"workerExposedStaticMethod", TestInterface5ImplementationV8Internal::workerExposedStaticMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface};
- V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, workerExposedStaticMethodMethodConfiguration);
- }
- if (executionContext && (executionContext->isDocument())) {
- const V8DOMConfiguration::MethodConfiguration windowExposedStaticMethodMethodConfiguration = {"windowExposedStaticMethod", TestInterface5ImplementationV8Internal::windowExposedStaticMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface};
- V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, windowExposedStaticMethodMethodConfiguration);
- }
- if (executionContext && (executionContext->isDocument() || executionContext->isServiceWorkerGlobalScope())) {
- const V8DOMConfiguration::MethodConfiguration windowAndServiceWorkerExposedMethodMethodConfiguration = {"windowAndServiceWorkerExposedMethod", TestInterface5ImplementationV8Internal::windowAndServiceWorkerExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
- V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, windowAndServiceWorkerExposedMethodMethodConfiguration);
- }
-}
-
-} // namespace blink
+static void installV8TestInterface5Template(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
+ // Initialize the interface object's template.
+ V8DOMConfiguration::initializeDOMInterfaceTemplate(isolate, interfaceTemplate, V8TestInterface5::wrapperTypeInfo.interfaceName, V8TestInterfaceEmpty::domTemplate(isolate, world), V8TestInterface5::internalFieldCount);
+ v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemplate);
+ ALLOW_UNUSED_LOCAL(signature);
+ v8::Local<v8::ObjectTemplate> instanceTemplate = interfaceTemplate->InstanceTemplate();
+ ALLOW_UNUSED_LOCAL(instanceTemplate);
+ v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->PrototypeTemplate();
+ ALLOW_UNUSED_LOCAL(prototypeTemplate);
+ // Register DOM constants, attributes and operations.
+ if (RuntimeEnabledFeatures::featureNameEnabled()) {
+ const V8DOMConfiguration::ConstantConfiguration V8TestInterface5Constants[] = {
+ {"UNSIGNED_LONG", 0, 0, V8DOMConfiguration::ConstantTypeUnsignedLong},
+ {"CONST_JAVASCRIPT", 1, 0, V8DOMConfiguration::ConstantTypeShort},
+ };
+ V8DOMConfiguration::installConstants(isolate, interfaceTemplate, prototypeTemplate, V8TestInterface5Constants, WTF_ARRAY_LENGTH(V8TestInterface5Constants));
+ V8DOMConfiguration::installAttributes(isolate, world, instanceTemplate, prototypeTemplate, V8TestInterface5Attributes, WTF_ARRAY_LENGTH(V8TestInterface5Attributes));
+ V8DOMConfiguration::installAccessors(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestInterface5Accessors, WTF_ARRAY_LENGTH(V8TestInterface5Accessors));
+ V8DOMConfiguration::installMethods(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestInterface5Methods, WTF_ARRAY_LENGTH(V8TestInterface5Methods));
+ }
+
+ // Indexed properties
+ v8::IndexedPropertyHandlerConfiguration indexedPropertyHandlerConfig(TestInterface5ImplementationV8Internal::indexedPropertyGetterCallback, TestInterface5ImplementationV8Internal::indexedPropertySetterCallback, 0, TestInterface5ImplementationV8Internal::indexedPropertyDeleterCallback, indexedPropertyEnumerator<TestInterface5Implementation>, v8::Local<v8::Value>(), v8::PropertyHandlerFlags::kNone);
+ instanceTemplate->SetHandler(indexedPropertyHandlerConfig);
+ // Named properties
+ v8::NamedPropertyHandlerConfiguration namedPropertyHandlerConfig(TestInterface5ImplementationV8Internal::namedPropertyGetterCallback, TestInterface5ImplementationV8Internal::namedPropertySetterCallback, TestInterface5ImplementationV8Internal::namedPropertyQueryCallback, TestInterface5ImplementationV8Internal::namedPropertyDeleterCallback, TestInterface5ImplementationV8Internal::namedPropertyEnumeratorCallback, v8::Local<v8::Value>(), static_cast<v8::PropertyHandlerFlags>(int(v8::PropertyHandlerFlags::kOnlyInterceptStrings) | int(v8::PropertyHandlerFlags::kNonMasking)));
+ instanceTemplate->SetHandler(namedPropertyHandlerConfig);
+
+ // Iterator (@@iterator)
+ const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIteratorConfiguration = { v8::Symbol::GetIterator, TestInterface5ImplementationV8Internal::iteratorMethodCallback, 0, v8::DontEnum, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype };
+ V8DOMConfiguration::installMethod(isolate, world, prototypeTemplate, signature, symbolKeyedIteratorConfiguration);
+
+ instanceTemplate->SetCallAsFunctionHandler(V8TestInterface5::legacyCallCustom);
+}
+
+v8::Local<v8::FunctionTemplate> V8TestInterface5::domTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world) {
+ return V8DOMConfiguration::domClassTemplate(isolate, world, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), installV8TestInterface5Template);
+}
+
+bool V8TestInterface5::hasInstance(v8::Local<v8::Value> v8Value, v8::Isolate* isolate) {
+ return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Value);
+}
+
+v8::Local<v8::Object> V8TestInterface5::findInstanceInPrototypeChain(v8::Local<v8::Value> v8Value, v8::Isolate* isolate) {
+ return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrapperTypeInfo, v8Value);
+}
+
+TestInterface5Implementation* V8TestInterface5::toImplWithTypeCheck(v8::Isolate* isolate, v8::Local<v8::Value> value) {
+ return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(value)) : nullptr;
+}
+
+void V8TestInterface5::preparePrototypeAndInterfaceObject(v8::Local<v8::Context> context, const DOMWrapperWorld& world, v8::Local<v8::Object> prototypeObject, v8::Local<v8::Function> interfaceObject, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
+ v8::Isolate* isolate = context->GetIsolate();
+ ExecutionContext* executionContext = toExecutionContext(context);
+ v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemplate);
+ if (executionContext && (executionContext->isWorkerGlobalScope())) {
+ const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"workerExposedAttribute", TestInterface5ImplementationV8Internal::workerExposedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::workerExposedAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder};
+ V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration);
+ }
+ if (executionContext && (executionContext->isDocument())) {
+ const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"windowExposedAttribute", TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder};
+ V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration);
+ }
+ v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemplate);
+ ExecutionContext* executionContext = toExecutionContext(prototypeObject->CreationContext());
+ DCHECK(executionContext);
+ if (executionContext && (executionContext->isWorkerGlobalScope())) {
+ const V8DOMConfiguration::MethodConfiguration workerExposedMethodMethodConfiguration = {"workerExposedMethod", TestInterface5ImplementationV8Internal::workerExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
+ V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, workerExposedMethodMethodConfiguration);
+ }
+ if (executionContext && (executionContext->isDocument())) {
+ const V8DOMConfiguration::MethodConfiguration windowExposedMethodMethodConfiguration = {"windowExposedMethod", TestInterface5ImplementationV8Internal::windowExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
+ V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, windowExposedMethodMethodConfiguration);
+ }
+ if (executionContext && (executionContext->isWorkerGlobalScope())) {
+ const V8DOMConfiguration::MethodConfiguration workerExposedStaticMethodMethodConfiguration = {"workerExposedStaticMethod", TestInterface5ImplementationV8Internal::workerExposedStaticMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface};
+ V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, workerExposedStaticMethodMethodConfiguration);
+ }
+ if (executionContext && (executionContext->isDocument())) {
+ const V8DOMConfiguration::MethodConfiguration windowExposedStaticMethodMethodConfiguration = {"windowExposedStaticMethod", TestInterface5ImplementationV8Internal::windowExposedStaticMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface};
+ V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, windowExposedStaticMethodMethodConfiguration);
+ }
+ if (executionContext && (executionContext->isDocument() || executionContext->isServiceWorkerGlobalScope())) {
+ const V8DOMConfiguration::MethodConfiguration windowAndServiceWorkerExposedMethodMethodConfiguration = {"windowAndServiceWorkerExposedMethod", TestInterface5ImplementationV8Internal::windowAndServiceWorkerExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
+ V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, windowAndServiceWorkerExposedMethodMethodConfiguration);
+ }
+}
+
+} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698