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

Unified Diff: third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.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/core/V8TestInterface.cpp
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.cpp
index cf7a0de516213a0452439954f893baa500d9959f..98a0866b6cd14d523c6bf09b0c2f45353549a5fa 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.cpp
@@ -77,2867 +77,2546 @@ static void (*staticPromiseMethodPartialOverloadMethodForPartialInterface)(const
static void (*partial2VoidMethodMethodForPartialInterface)(const v8::FunctionCallbackInfo<v8::Value>&) = 0;
static void (*partial2StaticVoidMethodMethodForPartialInterface)(const v8::FunctionCallbackInfo<v8::Value>&) = 0;
-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();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceAttribute()), impl);
+ v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceAttribute()), impl);
}
-void testInterfaceAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::V8TestInterface_TestInterfaceAttribute_AttributeGetter);
+void testInterfaceAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::V8TestInterface_TestInterfaceAttribute_AttributeGetter);
- TestInterfaceImplementationV8Internal::testInterfaceAttributeAttributeGetter(info);
+ TestInterfaceImplementationV8Internal::testInterfaceAttributeAttributeGetter(info);
}
-static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "testInterfaceAttribute");
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "testInterfaceAttribute");
- // Prepare the value to be set.
- TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck(info.GetIsolate(), v8Value);
+ // Prepare the value to be set.
+ TestInterfaceImplementation* cppValue = V8TestInterface::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 'TestInterface'.");
- return;
- }
+ // Type check per: http://heycam.github.io/webidl/#es-interface
+ if (!cppValue) {
+ exceptionState.throwTypeError("The provided value is not of type 'TestInterface'.");
+ 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];
- UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::V8TestInterface_TestInterfaceAttribute_AttributeSetter);
+ UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::V8TestInterface_TestInterfaceAttribute_AttributeSetter);
- TestInterfaceImplementationV8Internal::testInterfaceAttributeAttributeSetter(v8Value, info);
+ TestInterfaceImplementationV8Internal::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();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- v8SetReturnValue(info, impl->doubleAttribute());
+ v8SetReturnValue(info, impl->doubleAttribute());
}
-void doubleAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::doubleAttributeAttributeGetter(info);
+void doubleAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::doubleAttributeAttributeGetter(info);
}
-static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "doubleAttribute");
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "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];
- TestInterfaceImplementationV8Internal::doubleAttributeAttributeSetter(v8Value, info);
+ TestInterfaceImplementationV8Internal::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();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- v8SetReturnValue(info, impl->floatAttribute());
+ v8SetReturnValue(info, impl->floatAttribute());
}
-void floatAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::floatAttributeAttributeGetter(info);
+void floatAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::floatAttributeAttributeGetter(info);
}
-static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "floatAttribute");
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "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];
- TestInterfaceImplementationV8Internal::floatAttributeAttributeSetter(v8Value, info);
+ TestInterfaceImplementationV8Internal::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();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- v8SetReturnValue(info, impl->unrestrictedDoubleAttribute());
+ v8SetReturnValue(info, impl->unrestrictedDoubleAttribute());
}
-void unrestrictedDoubleAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::unrestrictedDoubleAttributeAttributeGetter(info);
+void unrestrictedDoubleAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::unrestrictedDoubleAttributeAttributeGetter(info);
}
-static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "unrestrictedDoubleAttribute");
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "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];
- TestInterfaceImplementationV8Internal::unrestrictedDoubleAttributeAttributeSetter(v8Value, info);
+ TestInterfaceImplementationV8Internal::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();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- v8SetReturnValue(info, impl->unrestrictedFloatAttribute());
+ v8SetReturnValue(info, impl->unrestrictedFloatAttribute());
}
-void unrestrictedFloatAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::unrestrictedFloatAttributeAttributeGetter(info);
+void unrestrictedFloatAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::unrestrictedFloatAttributeAttributeGetter(info);
}
-static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "unrestrictedFloatAttribute");
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "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];
- TestInterfaceImplementationV8Internal::unrestrictedFloatAttributeAttributeSetter(v8Value, info);
+ TestInterfaceImplementationV8Internal::unrestrictedFloatAttributeAttributeSetter(v8Value, info);
}
-static void testEnumAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
+static void testEnumAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- v8SetReturnValueString(info, impl->testEnumAttribute(), info.GetIsolate());
+ v8SetReturnValueString(info, impl->testEnumAttribute(), info.GetIsolate());
}
-void testEnumAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::testEnumAttributeAttributeGetter(info);
+void testEnumAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::testEnumAttributeAttributeGetter(info);
}
-static void testEnumAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+static void testEnumAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "testEnumAttribute");
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "testEnumAttribute");
- // Prepare the value to be set.
- V8StringResource<> cppValue = v8Value;
- if (!cppValue.prepare())
- return;
+ // Prepare the value to be set.
+ V8StringResource<> cppValue = v8Value;
+ if (!cppValue.prepare())
+ return;
- // Type check per: http://heycam.github.io/webidl/#dfn-attribute-setter
- // Returns undefined without setting the value if the value is invalid.
- TrackExceptionState trackExceptionState;
- const char* validValues[] = {
- "",
- "EnumValue1",
- "EnumValue2",
- "EnumValue3",
- };
- if (!isValidEnum(cppValue, validValues, WTF_ARRAY_LENGTH(validValues), "TestEnum", trackExceptionState)) {
- currentExecutionContext(info.GetIsolate())->addConsoleMessage(ConsoleMessage::create(JSMessageSource, WarningMessageLevel, trackExceptionState.message()));
- return;
- }
+ // Type check per: http://heycam.github.io/webidl/#dfn-attribute-setter
+ // Returns undefined without setting the value if the value is invalid.
+ TrackExceptionState trackExceptionState;
+ const char* validValues[] = {
+ "",
+ "EnumValue1",
+ "EnumValue2",
+ "EnumValue3",
+ };
+ if (!isValidEnum(cppValue, validValues, WTF_ARRAY_LENGTH(validValues), "TestEnum", trackExceptionState)) {
+ currentExecutionContext(info.GetIsolate())->addConsoleMessage(ConsoleMessage::create(JSMessageSource, WarningMessageLevel, trackExceptionState.message()));
+ return;
+ }
- impl->setTestEnumAttribute(cppValue);
+ impl->setTestEnumAttribute(cppValue);
}
-void testEnumAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Value> v8Value = info[0];
+void testEnumAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Value> v8Value = info[0];
- TestInterfaceImplementationV8Internal::testEnumAttributeAttributeSetter(v8Value, info);
+ TestInterfaceImplementationV8Internal::testEnumAttributeAttributeSetter(v8Value, info);
}
-static void stringOrDoubleAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
+static void stringOrDoubleAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- StringOrDouble result;
- impl->stringOrDoubleAttribute(result);
+ StringOrDouble result;
+ impl->stringOrDoubleAttribute(result);
- v8SetReturnValue(info, result);
+ v8SetReturnValue(info, result);
}
-void stringOrDoubleAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::stringOrDoubleAttributeAttributeGetter(info);
+void stringOrDoubleAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::stringOrDoubleAttributeAttributeGetter(info);
}
-static void stringOrDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+static void stringOrDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "stringOrDoubleAttribute");
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "stringOrDoubleAttribute");
- // Prepare the value to be set.
- StringOrDouble cppValue;
- V8StringOrDouble::toImpl(info.GetIsolate(), v8Value, cppValue, UnionTypeConversionMode::NotNullable, exceptionState);
- if (exceptionState.hadException())
- return;
+ // Prepare the value to be set.
+ StringOrDouble cppValue;
+ V8StringOrDouble::toImpl(info.GetIsolate(), v8Value, cppValue, UnionTypeConversionMode::NotNullable, exceptionState);
+ if (exceptionState.hadException())
+ return;
- impl->setStringOrDoubleAttribute(cppValue);
+ impl->setStringOrDoubleAttribute(cppValue);
}
-void stringOrDoubleAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Value> v8Value = info[0];
+void stringOrDoubleAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Value> v8Value = info[0];
- TestInterfaceImplementationV8Internal::stringOrDoubleAttributeAttributeSetter(v8Value, info);
+ TestInterfaceImplementationV8Internal::stringOrDoubleAttributeAttributeSetter(v8Value, info);
}
-static void conditionalLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
+static void conditionalLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- v8SetReturnValueInt(info, impl->conditionalLongAttribute());
+ v8SetReturnValueInt(info, impl->conditionalLongAttribute());
}
-void conditionalLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::conditionalLongAttributeAttributeGetter(info);
+void conditionalLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::conditionalLongAttributeAttributeGetter(info);
}
-static void conditionalLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+static void conditionalLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "conditionalLongAttribute");
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "conditionalLongAttribute");
- // 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->setConditionalLongAttribute(cppValue);
+ impl->setConditionalLongAttribute(cppValue);
}
-void conditionalLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Value> v8Value = info[0];
+void conditionalLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Value> v8Value = info[0];
- TestInterfaceImplementationV8Internal::conditionalLongAttributeAttributeSetter(v8Value, info);
+ TestInterfaceImplementationV8Internal::conditionalLongAttributeAttributeSetter(v8Value, info);
}
-static void conditionalReadOnlyLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
+static void conditionalReadOnlyLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- v8SetReturnValueInt(info, impl->conditionalReadOnlyLongAttribute());
+ v8SetReturnValueInt(info, impl->conditionalReadOnlyLongAttribute());
}
-void conditionalReadOnlyLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::conditionalReadOnlyLongAttributeAttributeGetter(info);
+void conditionalReadOnlyLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::conditionalReadOnlyLongAttributeAttributeGetter(info);
}
-static void staticStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8SetReturnValueString(info, TestInterfaceImplementation::staticStringAttribute(), info.GetIsolate());
+static void staticStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8SetReturnValueString(info, TestInterfaceImplementation::staticStringAttribute(), info.GetIsolate());
}
-void staticStringAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::staticStringAttributeAttributeGetter(info);
+void staticStringAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::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;
- TestInterfaceImplementation::setStaticStringAttribute(cppValue);
+ TestInterfaceImplementation::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];
- TestInterfaceImplementationV8Internal::staticStringAttributeAttributeSetter(v8Value, info);
+ TestInterfaceImplementationV8Internal::staticStringAttributeAttributeSetter(v8Value, info);
}
-static void staticReturnDOMWrapperAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8SetReturnValue(info, WTF::getPtr(TestInterfaceImplementation::staticReturnDOMWrapperAttribute()), info.GetIsolate()->GetCurrentContext()->Global());
+static void staticReturnDOMWrapperAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8SetReturnValue(info, WTF::getPtr(TestInterfaceImplementation::staticReturnDOMWrapperAttribute()), info.GetIsolate()->GetCurrentContext()->Global());
}
-void staticReturnDOMWrapperAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::staticReturnDOMWrapperAttributeAttributeGetter(info);
+void staticReturnDOMWrapperAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::staticReturnDOMWrapperAttributeAttributeGetter(info);
}
-static void staticReturnDOMWrapperAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "staticReturnDOMWrapperAttribute");
+static void staticReturnDOMWrapperAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "staticReturnDOMWrapperAttribute");
- // Prepare the value to be set.
- TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck(info.GetIsolate(), v8Value);
+ // Prepare the value to be set.
+ TestInterfaceImplementation* cppValue = V8TestInterface::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 'TestInterface'.");
- return;
- }
+ // Type check per: http://heycam.github.io/webidl/#es-interface
+ if (!cppValue) {
+ exceptionState.throwTypeError("The provided value is not of type 'TestInterface'.");
+ return;
+ }
- TestInterfaceImplementation::setStaticReturnDOMWrapperAttribute(cppValue);
+ TestInterfaceImplementation::setStaticReturnDOMWrapperAttribute(cppValue);
}
-void staticReturnDOMWrapperAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Value> v8Value = info[0];
+void staticReturnDOMWrapperAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Value> v8Value = info[0];
- TestInterfaceImplementationV8Internal::staticReturnDOMWrapperAttributeAttributeSetter(v8Value, info);
+ TestInterfaceImplementationV8Internal::staticReturnDOMWrapperAttributeAttributeSetter(v8Value, info);
}
-static void staticReadOnlyStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8SetReturnValueString(info, TestInterfaceImplementation::staticReadOnlyStringAttribute(), info.GetIsolate());
+static void staticReadOnlyStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8SetReturnValueString(info, TestInterfaceImplementation::staticReadOnlyStringAttribute(), info.GetIsolate());
}
-void staticReadOnlyStringAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::staticReadOnlyStringAttributeAttributeGetter(info);
+void staticReadOnlyStringAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::staticReadOnlyStringAttributeAttributeGetter(info);
}
-static void staticReadOnlyReturnDOMWrapperAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation* cppValue(WTF::getPtr(TestInterfaceImplementation::staticReadOnlyReturnDOMWrapperAttribute()));
+static void staticReadOnlyReturnDOMWrapperAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementation* cppValue(WTF::getPtr(TestInterfaceImplementation::staticReadOnlyReturnDOMWrapperAttribute()));
- // Keep the wrapper object for the return value alive as long as |this|
- // object is alive in order to save creation time of the wrapper object.
- if (cppValue && DOMDataStore::setReturnValue(info.GetReturnValue(), cppValue))
- return;
- v8::Local<v8::Value> v8Value(toV8(cppValue, holder, info.GetIsolate()));
- const char kKeepAliveKey[] = "KeepAlive#TestInterface#staticReadOnlyReturnDOMWrapperAttribute";
- V8HiddenValue::setHiddenValue(ScriptState::current(info.GetIsolate()), holder, v8AtomicString(info.GetIsolate(), StringView(kKeepAliveKey, sizeof kKeepAliveKey)), v8Value);
+ // Keep the wrapper object for the return value alive as long as |this|
+ // object is alive in order to save creation time of the wrapper object.
+ if (cppValue && DOMDataStore::setReturnValue(info.GetReturnValue(), cppValue))
+ return;
+ v8::Local<v8::Value> v8Value(toV8(cppValue, holder, info.GetIsolate()));
+ const char kKeepAliveKey[] = "KeepAlive#TestInterface#staticReadOnlyReturnDOMWrapperAttribute";
+ V8HiddenValue::setHiddenValue(ScriptState::current(info.GetIsolate()), holder, v8AtomicString(info.GetIsolate(), StringView(kKeepAliveKey, sizeof kKeepAliveKey)), v8Value);
- v8SetReturnValue(info, v8Value);
+ v8SetReturnValue(info, v8Value);
}
-void staticReadOnlyReturnDOMWrapperAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::staticReadOnlyReturnDOMWrapperAttributeAttributeGetter(info);
+void staticReadOnlyReturnDOMWrapperAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::staticReadOnlyReturnDOMWrapperAttributeAttributeGetter(info);
}
-static void staticConditionalReadOnlyLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8SetReturnValueInt(info, TestInterfaceImplementation::staticConditionalReadOnlyLongAttribute());
+static void staticConditionalReadOnlyLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8SetReturnValueInt(info, TestInterfaceImplementation::staticConditionalReadOnlyLongAttribute());
}
-void staticConditionalReadOnlyLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::staticConditionalReadOnlyLongAttributeAttributeGetter(info);
+void staticConditionalReadOnlyLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::staticConditionalReadOnlyLongAttributeAttributeGetter(info);
}
-static void legacyInterfaceTypeCheckingAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
+static void legacyInterfaceTypeCheckingAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- v8SetReturnValueFast(info, WTF::getPtr(impl->legacyInterfaceTypeCheckingAttribute()), impl);
+ v8SetReturnValueFast(info, WTF::getPtr(impl->legacyInterfaceTypeCheckingAttribute()), impl);
}
-void legacyInterfaceTypeCheckingAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::legacyInterfaceTypeCheckingAttributeAttributeGetter(info);
+void legacyInterfaceTypeCheckingAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::legacyInterfaceTypeCheckingAttributeAttributeGetter(info);
}
-static void legacyInterfaceTypeCheckingAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+static void legacyInterfaceTypeCheckingAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- // Prepare the value to be set.
- TestInterfaceEmpty* cppValue = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIsolate(), v8Value);
+ // Prepare the value to be set.
+ TestInterfaceEmpty* cppValue = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIsolate(), v8Value);
- impl->setLegacyInterfaceTypeCheckingAttribute(cppValue);
+ impl->setLegacyInterfaceTypeCheckingAttribute(cppValue);
}
-void legacyInterfaceTypeCheckingAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Value> v8Value = info[0];
+void legacyInterfaceTypeCheckingAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Value> v8Value = info[0];
- TestInterfaceImplementationV8Internal::legacyInterfaceTypeCheckingAttributeAttributeSetter(v8Value, info);
+ TestInterfaceImplementationV8Internal::legacyInterfaceTypeCheckingAttributeAttributeSetter(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();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- v8SetReturnValueInt(info, impl->alwaysExposedAttribute());
+ v8SetReturnValueInt(info, impl->alwaysExposedAttribute());
}
-void alwaysExposedAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::alwaysExposedAttributeAttributeGetter(info);
+void alwaysExposedAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::alwaysExposedAttributeAttributeGetter(info);
}
-static void alwaysExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+static void alwaysExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "alwaysExposedAttribute");
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "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];
- TestInterfaceImplementationV8Internal::alwaysExposedAttributeAttributeSetter(v8Value, info);
+ TestInterfaceImplementationV8Internal::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();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- v8SetReturnValueInt(info, impl->workerExposedAttribute());
+ v8SetReturnValueInt(info, impl->workerExposedAttribute());
}
-void workerExposedAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::workerExposedAttributeAttributeGetter(info);
+void workerExposedAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::workerExposedAttributeAttributeGetter(info);
}
-static void workerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+static void workerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "workerExposedAttribute");
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "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];
- TestInterfaceImplementationV8Internal::workerExposedAttributeAttributeSetter(v8Value, info);
+ TestInterfaceImplementationV8Internal::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();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- v8SetReturnValueInt(info, impl->windowExposedAttribute());
+ v8SetReturnValueInt(info, impl->windowExposedAttribute());
}
-void windowExposedAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::windowExposedAttributeAttributeGetter(info);
+void windowExposedAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::windowExposedAttributeAttributeGetter(info);
}
-static void windowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+static void windowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "windowExposedAttribute");
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "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];
- TestInterfaceImplementationV8Internal::windowExposedAttributeAttributeSetter(v8Value, info);
+ TestInterfaceImplementationV8Internal::windowExposedAttributeAttributeSetter(v8Value, info);
}
-static void lenientThisAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- // [LenientThis]
- // Make sure that info.Holder() really points to an instance if [LenientThis].
- if (!V8TestInterface::hasInstance(info.Holder(), info.GetIsolate()))
- return; // Return silently because of [LenientThis].
+static void lenientThisAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ // [LenientThis]
+ // Make sure that info.Holder() really points to an instance if [LenientThis].
+ if (!V8TestInterface::hasInstance(info.Holder(), info.GetIsolate()))
+ return; // Return silently because of [LenientThis].
- v8::Local<v8::Object> holder = info.Holder();
+ v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- v8SetReturnValue(info, impl->lenientThisAttribute().v8Value());
+ v8SetReturnValue(info, impl->lenientThisAttribute().v8Value());
}
-void lenientThisAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::lenientThisAttributeAttributeGetter(info);
+void lenientThisAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::lenientThisAttributeAttributeGetter(info);
}
-static void lenientThisAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- // [LenientThis]
- // Make sure that info.Holder() really points to an instance if [LenientThis].
- if (!V8TestInterface::hasInstance(info.Holder(), info.GetIsolate()))
- return; // Return silently because of [LenientThis].
+static void lenientThisAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ // [LenientThis]
+ // Make sure that info.Holder() really points to an instance if [LenientThis].
+ if (!V8TestInterface::hasInstance(info.Holder(), info.GetIsolate()))
+ return; // Return silently because of [LenientThis].
- v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+ v8::Local<v8::Object> holder = info.Holder();
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- // Prepare the value to be set.
- ScriptValue cppValue = ScriptValue(ScriptState::current(info.GetIsolate()), v8Value);
+ // Prepare the value to be set.
+ ScriptValue cppValue = ScriptValue(ScriptState::current(info.GetIsolate()), v8Value);
- impl->setLenientThisAttribute(cppValue);
+ impl->setLenientThisAttribute(cppValue);
}
-void lenientThisAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Value> v8Value = info[0];
+void lenientThisAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Value> v8Value = info[0];
- TestInterfaceImplementationV8Internal::lenientThisAttributeAttributeSetter(v8Value, info);
+ TestInterfaceImplementationV8Internal::lenientThisAttributeAttributeSetter(v8Value, info);
}
-static void secureContextAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
+static void secureContextAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- v8SetReturnValueFast(info, WTF::getPtr(impl->secureContextAttribute()), impl);
+ v8SetReturnValueFast(info, WTF::getPtr(impl->secureContextAttribute()), impl);
}
-void secureContextAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::secureContextAttributeAttributeGetter(info);
+void secureContextAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::secureContextAttributeAttributeGetter(info);
}
-static void secureContextAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+static void secureContextAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "secureContextAttribute");
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "secureContextAttribute");
- // Prepare the value to be set.
- bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
+ // Prepare the value to be set.
+ bool* cppValue = V8bool::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 'bool'.");
- return;
- }
+ // Type check per: http://heycam.github.io/webidl/#es-interface
+ if (!cppValue) {
+ exceptionState.throwTypeError("The provided value is not of type 'bool'.");
+ return;
+ }
- impl->setSecureContextAttribute(cppValue);
+ impl->setSecureContextAttribute(cppValue);
}
-void secureContextAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Value> v8Value = info[0];
+void secureContextAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Value> v8Value = info[0];
- TestInterfaceImplementationV8Internal::secureContextAttributeAttributeSetter(v8Value, info);
+ TestInterfaceImplementationV8Internal::secureContextAttributeAttributeSetter(v8Value, info);
}
-static void secureContextRuntimeEnabledAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
+static void secureContextRuntimeEnabledAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- v8SetReturnValueFast(info, WTF::getPtr(impl->secureContextRuntimeEnabledAttribute()), impl);
+ v8SetReturnValueFast(info, WTF::getPtr(impl->secureContextRuntimeEnabledAttribute()), impl);
}
-void secureContextRuntimeEnabledAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::secureContextRuntimeEnabledAttributeAttributeGetter(info);
+void secureContextRuntimeEnabledAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::secureContextRuntimeEnabledAttributeAttributeGetter(info);
}
-static void secureContextRuntimeEnabledAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+static void secureContextRuntimeEnabledAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "secureContextRuntimeEnabledAttribute");
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "secureContextRuntimeEnabledAttribute");
- // Prepare the value to be set.
- bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
+ // Prepare the value to be set.
+ bool* cppValue = V8bool::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 'bool'.");
- return;
- }
+ // Type check per: http://heycam.github.io/webidl/#es-interface
+ if (!cppValue) {
+ exceptionState.throwTypeError("The provided value is not of type 'bool'.");
+ return;
+ }
- impl->setSecureContextRuntimeEnabledAttribute(cppValue);
+ impl->setSecureContextRuntimeEnabledAttribute(cppValue);
}
-void secureContextRuntimeEnabledAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Value> v8Value = info[0];
+void secureContextRuntimeEnabledAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Value> v8Value = info[0];
- TestInterfaceImplementationV8Internal::secureContextRuntimeEnabledAttributeAttributeSetter(v8Value, info);
+ TestInterfaceImplementationV8Internal::secureContextRuntimeEnabledAttributeAttributeSetter(v8Value, info);
}
-static void secureContextWindowExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
+static void secureContextWindowExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- v8SetReturnValueFast(info, WTF::getPtr(impl->secureContextWindowExposedAttribute()), impl);
+ v8SetReturnValueFast(info, WTF::getPtr(impl->secureContextWindowExposedAttribute()), impl);
}
-void secureContextWindowExposedAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::secureContextWindowExposedAttributeAttributeGetter(info);
+void secureContextWindowExposedAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::secureContextWindowExposedAttributeAttributeGetter(info);
}
-static void secureContextWindowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+static void secureContextWindowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "secureContextWindowExposedAttribute");
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "secureContextWindowExposedAttribute");
- // Prepare the value to be set.
- bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
+ // Prepare the value to be set.
+ bool* cppValue = V8bool::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 'bool'.");
- return;
- }
+ // Type check per: http://heycam.github.io/webidl/#es-interface
+ if (!cppValue) {
+ exceptionState.throwTypeError("The provided value is not of type 'bool'.");
+ return;
+ }
- impl->setSecureContextWindowExposedAttribute(cppValue);
+ impl->setSecureContextWindowExposedAttribute(cppValue);
}
-void secureContextWindowExposedAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Value> v8Value = info[0];
+void secureContextWindowExposedAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Value> v8Value = info[0];
- TestInterfaceImplementationV8Internal::secureContextWindowExposedAttributeAttributeSetter(v8Value, info);
+ TestInterfaceImplementationV8Internal::secureContextWindowExposedAttributeAttributeSetter(v8Value, info);
}
-static void secureContextWorkerExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
+static void secureContextWorkerExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- v8SetReturnValueFast(info, WTF::getPtr(impl->secureContextWorkerExposedAttribute()), impl);
+ v8SetReturnValueFast(info, WTF::getPtr(impl->secureContextWorkerExposedAttribute()), impl);
}
-void secureContextWorkerExposedAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::secureContextWorkerExposedAttributeAttributeGetter(info);
+void secureContextWorkerExposedAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::secureContextWorkerExposedAttributeAttributeGetter(info);
}
-static void secureContextWorkerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+static void secureContextWorkerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "secureContextWorkerExposedAttribute");
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "secureContextWorkerExposedAttribute");
- // Prepare the value to be set.
- bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
+ // Prepare the value to be set.
+ bool* cppValue = V8bool::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 'bool'.");
- return;
- }
+ // Type check per: http://heycam.github.io/webidl/#es-interface
+ if (!cppValue) {
+ exceptionState.throwTypeError("The provided value is not of type 'bool'.");
+ return;
+ }
- impl->setSecureContextWorkerExposedAttribute(cppValue);
+ impl->setSecureContextWorkerExposedAttribute(cppValue);
}
-void secureContextWorkerExposedAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Value> v8Value = info[0];
+void secureContextWorkerExposedAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Value> v8Value = info[0];
- TestInterfaceImplementationV8Internal::secureContextWorkerExposedAttributeAttributeSetter(v8Value, info);
+ TestInterfaceImplementationV8Internal::secureContextWorkerExposedAttributeAttributeSetter(v8Value, info);
}
-static void secureContextWindowExposedRuntimeEnabledAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
+static void secureContextWindowExposedRuntimeEnabledAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- v8SetReturnValueFast(info, WTF::getPtr(impl->secureContextWindowExposedRuntimeEnabledAttribute()), impl);
+ v8SetReturnValueFast(info, WTF::getPtr(impl->secureContextWindowExposedRuntimeEnabledAttribute()), impl);
}
-void secureContextWindowExposedRuntimeEnabledAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::secureContextWindowExposedRuntimeEnabledAttributeAttributeGetter(info);
+void secureContextWindowExposedRuntimeEnabledAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::secureContextWindowExposedRuntimeEnabledAttributeAttributeGetter(info);
}
-static void secureContextWindowExposedRuntimeEnabledAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+static void secureContextWindowExposedRuntimeEnabledAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "secureContextWindowExposedRuntimeEnabledAttribute");
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "secureContextWindowExposedRuntimeEnabledAttribute");
- // Prepare the value to be set.
- bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
+ // Prepare the value to be set.
+ bool* cppValue = V8bool::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 'bool'.");
- return;
- }
+ // Type check per: http://heycam.github.io/webidl/#es-interface
+ if (!cppValue) {
+ exceptionState.throwTypeError("The provided value is not of type 'bool'.");
+ return;
+ }
- impl->setSecureContextWindowExposedRuntimeEnabledAttribute(cppValue);
+ impl->setSecureContextWindowExposedRuntimeEnabledAttribute(cppValue);
}
-void secureContextWindowExposedRuntimeEnabledAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Value> v8Value = info[0];
+void secureContextWindowExposedRuntimeEnabledAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Value> v8Value = info[0];
- TestInterfaceImplementationV8Internal::secureContextWindowExposedRuntimeEnabledAttributeAttributeSetter(v8Value, info);
+ TestInterfaceImplementationV8Internal::secureContextWindowExposedRuntimeEnabledAttributeAttributeSetter(v8Value, info);
}
-static void secureContextWorkerExposedRuntimeEnabledAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
+static void secureContextWorkerExposedRuntimeEnabledAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- v8SetReturnValueFast(info, WTF::getPtr(impl->secureContextWorkerExposedRuntimeEnabledAttribute()), impl);
+ v8SetReturnValueFast(info, WTF::getPtr(impl->secureContextWorkerExposedRuntimeEnabledAttribute()), impl);
}
-void secureContextWorkerExposedRuntimeEnabledAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::secureContextWorkerExposedRuntimeEnabledAttributeAttributeGetter(info);
+void secureContextWorkerExposedRuntimeEnabledAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::secureContextWorkerExposedRuntimeEnabledAttributeAttributeGetter(info);
}
-static void secureContextWorkerExposedRuntimeEnabledAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+static void secureContextWorkerExposedRuntimeEnabledAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "secureContextWorkerExposedRuntimeEnabledAttribute");
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "secureContextWorkerExposedRuntimeEnabledAttribute");
- // Prepare the value to be set.
- bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
+ // Prepare the value to be set.
+ bool* cppValue = V8bool::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 'bool'.");
- return;
- }
+ // Type check per: http://heycam.github.io/webidl/#es-interface
+ if (!cppValue) {
+ exceptionState.throwTypeError("The provided value is not of type 'bool'.");
+ return;
+ }
- impl->setSecureContextWorkerExposedRuntimeEnabledAttribute(cppValue);
+ impl->setSecureContextWorkerExposedRuntimeEnabledAttribute(cppValue);
}
-void secureContextWorkerExposedRuntimeEnabledAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Value> v8Value = info[0];
+void secureContextWorkerExposedRuntimeEnabledAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Value> v8Value = info[0];
- TestInterfaceImplementationV8Internal::secureContextWorkerExposedRuntimeEnabledAttributeAttributeSetter(v8Value, info);
+ TestInterfaceImplementationV8Internal::secureContextWorkerExposedRuntimeEnabledAttributeAttributeSetter(v8Value, info);
}
-static void implementsStaticReadOnlyLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8SetReturnValueInt(info, TestInterfaceImplementation::implementsStaticReadOnlyLongAttribute());
+static void implementsStaticReadOnlyLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8SetReturnValueInt(info, TestInterfaceImplementation::implementsStaticReadOnlyLongAttribute());
}
-void implementsStaticReadOnlyLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::implementsStaticReadOnlyLongAttributeAttributeGetter(info);
+void implementsStaticReadOnlyLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::implementsStaticReadOnlyLongAttributeAttributeGetter(info);
}
-static void implementsStaticStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8SetReturnValueString(info, TestInterfaceImplementation::implementsStaticStringAttribute(), info.GetIsolate());
+static void implementsStaticStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8SetReturnValueString(info, TestInterfaceImplementation::implementsStaticStringAttribute(), info.GetIsolate());
}
-void implementsStaticStringAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::implementsStaticStringAttributeAttributeGetter(info);
+void implementsStaticStringAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::implementsStaticStringAttributeAttributeGetter(info);
}
-static void implementsStaticStringAttributeAttributeSetter(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 implementsStaticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ // Prepare the value to be set.
+ V8StringResource<> cppValue = v8Value;
+ if (!cppValue.prepare())
+ return;
- TestInterfaceImplementation::setImplementsStaticStringAttribute(cppValue);
+ TestInterfaceImplementation::setImplementsStaticStringAttribute(cppValue);
}
-void implementsStaticStringAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Value> v8Value = info[0];
+void implementsStaticStringAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Value> v8Value = info[0];
- TestInterfaceImplementationV8Internal::implementsStaticStringAttributeAttributeSetter(v8Value, info);
+ TestInterfaceImplementationV8Internal::implementsStaticStringAttributeAttributeSetter(v8Value, info);
}
-static void implementsReadonlyStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
+static void implementsReadonlyStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- v8SetReturnValueString(info, impl->implementsReadonlyStringAttribute(), info.GetIsolate());
+ v8SetReturnValueString(info, impl->implementsReadonlyStringAttribute(), info.GetIsolate());
}
-void implementsReadonlyStringAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::implementsReadonlyStringAttributeAttributeGetter(info);
+void implementsReadonlyStringAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::implementsReadonlyStringAttributeAttributeGetter(info);
}
-static void implementsStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
+static void implementsStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- v8SetReturnValueString(info, impl->implementsStringAttribute(), info.GetIsolate());
+ v8SetReturnValueString(info, impl->implementsStringAttribute(), info.GetIsolate());
}
-void implementsStringAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::implementsStringAttributeAttributeGetter(info);
+void implementsStringAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::implementsStringAttributeAttributeGetter(info);
}
-static void implementsStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+static void implementsStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- // Prepare the value to be set.
- V8StringResource<> cppValue = v8Value;
- if (!cppValue.prepare())
- return;
+ // Prepare the value to be set.
+ V8StringResource<> cppValue = v8Value;
+ if (!cppValue.prepare())
+ return;
- impl->setImplementsStringAttribute(cppValue);
+ impl->setImplementsStringAttribute(cppValue);
}
-void implementsStringAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Value> v8Value = info[0];
+void implementsStringAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Value> v8Value = info[0];
- TestInterfaceImplementationV8Internal::implementsStringAttributeAttributeSetter(v8Value, info);
+ TestInterfaceImplementationV8Internal::implementsStringAttributeAttributeSetter(v8Value, info);
}
-static void implementsNodeAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
+static void implementsNodeAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- v8SetReturnValueFast(info, WTF::getPtr(impl->implementsNodeAttribute()), impl);
+ v8SetReturnValueFast(info, WTF::getPtr(impl->implementsNodeAttribute()), impl);
}
-void implementsNodeAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::implementsNodeAttributeAttributeGetter(info);
+void implementsNodeAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::implementsNodeAttributeAttributeGetter(info);
}
-static void implementsNodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+static void implementsNodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "implementsNodeAttribute");
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "implementsNodeAttribute");
- // Prepare the value to be set.
- Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value);
+ // Prepare the value to be set.
+ Node* cppValue = V8Node::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 'Node'.");
- return;
- }
+ // Type check per: http://heycam.github.io/webidl/#es-interface
+ if (!cppValue) {
+ exceptionState.throwTypeError("The provided value is not of type 'Node'.");
+ return;
+ }
- impl->setImplementsNodeAttribute(cppValue);
+ impl->setImplementsNodeAttribute(cppValue);
}
-void implementsNodeAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Value> v8Value = info[0];
+void implementsNodeAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Value> v8Value = info[0];
- TestInterfaceImplementationV8Internal::implementsNodeAttributeAttributeSetter(v8Value, info);
+ TestInterfaceImplementationV8Internal::implementsNodeAttributeAttributeSetter(v8Value, info);
}
-static void implementsEventHandlerAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
+static void implementsEventHandlerAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- EventListener* cppValue(WTF::getPtr(impl->implementsEventHandlerAttribute()));
+ EventListener* cppValue(WTF::getPtr(impl->implementsEventHandlerAttribute()));
- v8SetReturnValue(info, cppValue ? V8AbstractEventListener::cast(cppValue)->getListenerOrNull(info.GetIsolate(), impl->getExecutionContext()) : v8::Null(info.GetIsolate()).As<v8::Value>());
+ v8SetReturnValue(info, cppValue ? V8AbstractEventListener::cast(cppValue)->getListenerOrNull(info.GetIsolate(), impl->getExecutionContext()) : v8::Null(info.GetIsolate()).As<v8::Value>());
}
-void implementsEventHandlerAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::implementsEventHandlerAttributeAttributeGetter(info);
+void implementsEventHandlerAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::implementsEventHandlerAttributeAttributeGetter(info);
}
-static void implementsEventHandlerAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+static void implementsEventHandlerAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- // Prepare the value to be set.
- moveEventListenerToNewWrapper(info.GetIsolate(), holder, impl->implementsEventHandlerAttribute(), v8Value, V8TestInterface::eventListenerCacheIndex);
+ // Prepare the value to be set.
+ moveEventListenerToNewWrapper(info.GetIsolate(), holder, impl->implementsEventHandlerAttribute(), v8Value, V8TestInterface::eventListenerCacheIndex);
- impl->setImplementsEventHandlerAttribute(V8EventListenerHelper::getEventListener(ScriptState::forReceiverObject(info), v8Value, true, ListenerFindOrCreate));
+ impl->setImplementsEventHandlerAttribute(V8EventListenerHelper::getEventListener(ScriptState::forReceiverObject(info), v8Value, true, ListenerFindOrCreate));
}
-void implementsEventHandlerAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Value> v8Value = info[0];
+void implementsEventHandlerAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Value> v8Value = info[0];
- TestInterfaceImplementationV8Internal::implementsEventHandlerAttributeAttributeSetter(v8Value, info);
+ TestInterfaceImplementationV8Internal::implementsEventHandlerAttributeAttributeSetter(v8Value, info);
}
-static void implementsRuntimeEnabledNodeAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
+static void implementsRuntimeEnabledNodeAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- v8SetReturnValueFast(info, WTF::getPtr(impl->implementsRuntimeEnabledNodeAttribute()), impl);
+ v8SetReturnValueFast(info, WTF::getPtr(impl->implementsRuntimeEnabledNodeAttribute()), impl);
}
-void implementsRuntimeEnabledNodeAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::implementsRuntimeEnabledNodeAttributeAttributeGetter(info);
+void implementsRuntimeEnabledNodeAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::implementsRuntimeEnabledNodeAttributeAttributeGetter(info);
}
-static void implementsRuntimeEnabledNodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+static void implementsRuntimeEnabledNodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "implementsRuntimeEnabledNodeAttribute");
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "implementsRuntimeEnabledNodeAttribute");
- // Prepare the value to be set.
- Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value);
+ // Prepare the value to be set.
+ Node* cppValue = V8Node::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 'Node'.");
- return;
- }
+ // Type check per: http://heycam.github.io/webidl/#es-interface
+ if (!cppValue) {
+ exceptionState.throwTypeError("The provided value is not of type 'Node'.");
+ return;
+ }
- impl->setImplementsRuntimeEnabledNodeAttribute(cppValue);
+ impl->setImplementsRuntimeEnabledNodeAttribute(cppValue);
}
-void implementsRuntimeEnabledNodeAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Value> v8Value = info[0];
+void implementsRuntimeEnabledNodeAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Value> v8Value = info[0];
- TestInterfaceImplementationV8Internal::implementsRuntimeEnabledNodeAttributeAttributeSetter(v8Value, info);
+ TestInterfaceImplementationV8Internal::implementsRuntimeEnabledNodeAttributeAttributeSetter(v8Value, info);
}
-static void implements2StaticStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8SetReturnValueString(info, TestImplements2::implements2StaticStringAttribute(), info.GetIsolate());
+static void implements2StaticStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8SetReturnValueString(info, TestImplements2::implements2StaticStringAttribute(), info.GetIsolate());
}
-void implements2StaticStringAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::implements2StaticStringAttributeAttributeGetter(info);
+void implements2StaticStringAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::implements2StaticStringAttributeAttributeGetter(info);
}
-static void implements2StaticStringAttributeAttributeSetter(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 implements2StaticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ // Prepare the value to be set.
+ V8StringResource<> cppValue = v8Value;
+ if (!cppValue.prepare())
+ return;
- TestImplements2::setImplements2StaticStringAttribute(cppValue);
+ TestImplements2::setImplements2StaticStringAttribute(cppValue);
}
-void implements2StaticStringAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Value> v8Value = info[0];
+void implements2StaticStringAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Value> v8Value = info[0];
- TestInterfaceImplementationV8Internal::implements2StaticStringAttributeAttributeSetter(v8Value, info);
+ TestInterfaceImplementationV8Internal::implements2StaticStringAttributeAttributeSetter(v8Value, info);
}
-static void implements2StringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
+static void implements2StringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- v8SetReturnValueString(info, TestImplements2::implements2StringAttribute(*impl), info.GetIsolate());
+ v8SetReturnValueString(info, TestImplements2::implements2StringAttribute(*impl), info.GetIsolate());
}
-void implements2StringAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::implements2StringAttributeAttributeGetter(info);
+void implements2StringAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::implements2StringAttributeAttributeGetter(info);
}
-static void implements2StringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+static void implements2StringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- // Prepare the value to be set.
- V8StringResource<> cppValue = v8Value;
- if (!cppValue.prepare())
- return;
+ // Prepare the value to be set.
+ V8StringResource<> cppValue = v8Value;
+ if (!cppValue.prepare())
+ return;
- TestImplements2::setImplements2StringAttribute(*impl, cppValue);
+ TestImplements2::setImplements2StringAttribute(*impl, cppValue);
}
-void implements2StringAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Value> v8Value = info[0];
+void implements2StringAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Value> v8Value = info[0];
- TestInterfaceImplementationV8Internal::implements2StringAttributeAttributeSetter(v8Value, info);
+ TestInterfaceImplementationV8Internal::implements2StringAttributeAttributeSetter(v8Value, info);
}
-static void implements3StringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
+static void implements3StringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- v8SetReturnValueString(info, TestImplements3Implementation::implements3StringAttribute(*impl), info.GetIsolate());
+ v8SetReturnValueString(info, TestImplements3Implementation::implements3StringAttribute(*impl), info.GetIsolate());
}
-void implements3StringAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::implements3StringAttributeAttributeGetter(info);
+void implements3StringAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::implements3StringAttributeAttributeGetter(info);
}
-static void implements3StringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+static void implements3StringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- // Prepare the value to be set.
- V8StringResource<> cppValue = v8Value;
- if (!cppValue.prepare())
- return;
+ // Prepare the value to be set.
+ V8StringResource<> cppValue = v8Value;
+ if (!cppValue.prepare())
+ return;
- TestImplements3Implementation::setImplements3StringAttribute(*impl, cppValue);
+ TestImplements3Implementation::setImplements3StringAttribute(*impl, cppValue);
}
-void implements3StringAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Value> v8Value = info[0];
+void implements3StringAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Value> v8Value = info[0];
- TestInterfaceImplementationV8Internal::implements3StringAttributeAttributeSetter(v8Value, info);
+ TestInterfaceImplementationV8Internal::implements3StringAttributeAttributeSetter(v8Value, info);
}
-static void implements3StaticStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8SetReturnValueString(info, TestImplements3Implementation::implements3StaticStringAttribute(), info.GetIsolate());
+static void implements3StaticStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8SetReturnValueString(info, TestImplements3Implementation::implements3StaticStringAttribute(), info.GetIsolate());
}
-void implements3StaticStringAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::implements3StaticStringAttributeAttributeGetter(info);
+void implements3StaticStringAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::implements3StaticStringAttributeAttributeGetter(info);
}
-static void implements3StaticStringAttributeAttributeSetter(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 implements3StaticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ // Prepare the value to be set.
+ V8StringResource<> cppValue = v8Value;
+ if (!cppValue.prepare())
+ return;
- TestImplements3Implementation::setImplements3StaticStringAttribute(cppValue);
+ TestImplements3Implementation::setImplements3StaticStringAttribute(cppValue);
}
-void implements3StaticStringAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Value> v8Value = info[0];
+void implements3StaticStringAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Value> v8Value = info[0];
- TestInterfaceImplementationV8Internal::implements3StaticStringAttributeAttributeSetter(v8Value, info);
+ TestInterfaceImplementationV8Internal::implements3StaticStringAttributeAttributeSetter(v8Value, info);
}
-static void partialLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
+static void partialLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- v8SetReturnValueInt(info, TestInterfacePartial::partialLongAttribute(*impl));
+ v8SetReturnValueInt(info, TestInterfacePartial::partialLongAttribute(*impl));
}
-void partialLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::partialLongAttributeAttributeGetter(info);
+void partialLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::partialLongAttributeAttributeGetter(info);
}
-static void partialLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+static void partialLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "partialLongAttribute");
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "partialLongAttribute");
- // 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;
- TestInterfacePartial::setPartialLongAttribute(*impl, cppValue);
+ TestInterfacePartial::setPartialLongAttribute(*impl, cppValue);
}
-void partialLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Value> v8Value = info[0];
+void partialLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Value> v8Value = info[0];
- TestInterfaceImplementationV8Internal::partialLongAttributeAttributeSetter(v8Value, info);
+ TestInterfaceImplementationV8Internal::partialLongAttributeAttributeSetter(v8Value, info);
}
-static void partialStaticLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8SetReturnValueInt(info, TestInterfacePartial::partialStaticLongAttribute());
+static void partialStaticLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8SetReturnValueInt(info, TestInterfacePartial::partialStaticLongAttribute());
}
-void partialStaticLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::partialStaticLongAttributeAttributeGetter(info);
+void partialStaticLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::partialStaticLongAttributeAttributeGetter(info);
}
-static void partialStaticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "partialStaticLongAttribute");
+static void partialStaticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "partialStaticLongAttribute");
- // 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;
- TestInterfacePartial::setPartialStaticLongAttribute(cppValue);
+ TestInterfacePartial::setPartialStaticLongAttribute(cppValue);
}
-void partialStaticLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Value> v8Value = info[0];
+void partialStaticLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Value> v8Value = info[0];
- TestInterfaceImplementationV8Internal::partialStaticLongAttributeAttributeSetter(v8Value, info);
+ TestInterfaceImplementationV8Internal::partialStaticLongAttributeAttributeSetter(v8Value, info);
}
-static void partialCallWithExecutionContextLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
+static void partialCallWithExecutionContextLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate());
+ ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate());
- v8SetReturnValueInt(info, TestInterfacePartial::partialCallWithExecutionContextLongAttribute(executionContext, *impl));
+ v8SetReturnValueInt(info, TestInterfacePartial::partialCallWithExecutionContextLongAttribute(executionContext, *impl));
}
-void partialCallWithExecutionContextLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::partialCallWithExecutionContextLongAttributeAttributeGetter(info);
+void partialCallWithExecutionContextLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::partialCallWithExecutionContextLongAttributeAttributeGetter(info);
}
-static void partialCallWithExecutionContextLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+static void partialCallWithExecutionContextLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "partialCallWithExecutionContextLongAttribute");
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "partialCallWithExecutionContextLongAttribute");
- // 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;
- ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate());
+ ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate());
- TestInterfacePartial::setPartialCallWithExecutionContextLongAttribute(executionContext, *impl, cppValue);
+ TestInterfacePartial::setPartialCallWithExecutionContextLongAttribute(executionContext, *impl, cppValue);
}
-void partialCallWithExecutionContextLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Value> v8Value = info[0];
+void partialCallWithExecutionContextLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Value> v8Value = info[0];
- TestInterfaceImplementationV8Internal::partialCallWithExecutionContextLongAttributeAttributeSetter(v8Value, info);
+ TestInterfaceImplementationV8Internal::partialCallWithExecutionContextLongAttributeAttributeSetter(v8Value, info);
}
-static void partialPartialEnumTypeAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
+static void partialPartialEnumTypeAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- v8SetReturnValueString(info, TestInterfacePartial::partialPartialEnumTypeAttribute(*impl), info.GetIsolate());
+ v8SetReturnValueString(info, TestInterfacePartial::partialPartialEnumTypeAttribute(*impl), info.GetIsolate());
}
-void partialPartialEnumTypeAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::partialPartialEnumTypeAttributeAttributeGetter(info);
+void partialPartialEnumTypeAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::partialPartialEnumTypeAttributeAttributeGetter(info);
}
-static void partialPartialEnumTypeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+static void partialPartialEnumTypeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "partialPartialEnumTypeAttribute");
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "partialPartialEnumTypeAttribute");
- // Prepare the value to be set.
- V8StringResource<> cppValue = v8Value;
- if (!cppValue.prepare())
- return;
+ // Prepare the value to be set.
+ V8StringResource<> cppValue = v8Value;
+ if (!cppValue.prepare())
+ return;
- // Type check per: http://heycam.github.io/webidl/#dfn-attribute-setter
- // Returns undefined without setting the value if the value is invalid.
- TrackExceptionState trackExceptionState;
- const char* validValues[] = {
- "foo",
- "bar",
- };
- if (!isValidEnum(cppValue, validValues, WTF_ARRAY_LENGTH(validValues), "PartialEnumType", trackExceptionState)) {
- currentExecutionContext(info.GetIsolate())->addConsoleMessage(ConsoleMessage::create(JSMessageSource, WarningMessageLevel, trackExceptionState.message()));
- return;
- }
+ // Type check per: http://heycam.github.io/webidl/#dfn-attribute-setter
+ // Returns undefined without setting the value if the value is invalid.
+ TrackExceptionState trackExceptionState;
+ const char* validValues[] = {
+ "foo",
+ "bar",
+ };
+ if (!isValidEnum(cppValue, validValues, WTF_ARRAY_LENGTH(validValues), "PartialEnumType", trackExceptionState)) {
+ currentExecutionContext(info.GetIsolate())->addConsoleMessage(ConsoleMessage::create(JSMessageSource, WarningMessageLevel, trackExceptionState.message()));
+ return;
+ }
- TestInterfacePartial::setPartialPartialEnumTypeAttribute(*impl, cppValue);
+ TestInterfacePartial::setPartialPartialEnumTypeAttribute(*impl, cppValue);
}
-void partialPartialEnumTypeAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Value> v8Value = info[0];
+void partialPartialEnumTypeAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Value> v8Value = info[0];
- TestInterfaceImplementationV8Internal::partialPartialEnumTypeAttributeAttributeSetter(v8Value, info);
+ TestInterfaceImplementationV8Internal::partialPartialEnumTypeAttributeAttributeSetter(v8Value, info);
}
-static void stringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
+static void stringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- String result;
- if (!V8TestInterface::PrivateScript::stringAttributeAttributeGetter(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, &result))
- return;
+ String result;
+ if (!V8TestInterface::PrivateScript::stringAttributeAttributeGetter(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, &result))
+ return;
- v8SetReturnValueString(info, result, info.GetIsolate());
+ v8SetReturnValueString(info, result, info.GetIsolate());
}
-void stringAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::stringAttributeAttributeGetter(info);
+void stringAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::stringAttributeAttributeGetter(info);
}
-static void stringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+static void stringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- // Prepare the value to be set.
- V8StringResource<> cppValue = v8Value;
- if (!cppValue.prepare())
- return;
+ // Prepare the value to be set.
+ V8StringResource<> cppValue = v8Value;
+ if (!cppValue.prepare())
+ return;
- V8TestInterface::PrivateScript::stringAttributeAttributeSetter(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, cppValue);
+ V8TestInterface::PrivateScript::stringAttributeAttributeSetter(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, cppValue);
}
-void stringAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Value> v8Value = info[0];
+void stringAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Value> v8Value = info[0];
- TestInterfaceImplementationV8Internal::stringAttributeAttributeSetter(v8Value, info);
+ TestInterfaceImplementationV8Internal::stringAttributeAttributeSetter(v8Value, info);
}
-static void partial2LongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
+static void partial2LongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- v8SetReturnValueInt(info, TestInterfacePartial2Implementation::partial2LongAttribute(*impl));
+ v8SetReturnValueInt(info, TestInterfacePartial2Implementation::partial2LongAttribute(*impl));
}
-void partial2LongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::partial2LongAttributeAttributeGetter(info);
+void partial2LongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::partial2LongAttributeAttributeGetter(info);
}
-static void partial2LongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+static void partial2LongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "partial2LongAttribute");
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "partial2LongAttribute");
- // 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;
- TestInterfacePartial2Implementation::setPartial2LongAttribute(*impl, cppValue);
+ TestInterfacePartial2Implementation::setPartial2LongAttribute(*impl, cppValue);
}
-void partial2LongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Value> v8Value = info[0];
+void partial2LongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Value> v8Value = info[0];
- TestInterfaceImplementationV8Internal::partial2LongAttributeAttributeSetter(v8Value, info);
+ TestInterfaceImplementationV8Internal::partial2LongAttributeAttributeSetter(v8Value, info);
}
-static void partial2StaticLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8SetReturnValueInt(info, TestInterfacePartial2Implementation::partial2StaticLongAttribute());
+static void partial2StaticLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8SetReturnValueInt(info, TestInterfacePartial2Implementation::partial2StaticLongAttribute());
}
-void partial2StaticLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::partial2StaticLongAttributeAttributeGetter(info);
+void partial2StaticLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::partial2StaticLongAttributeAttributeGetter(info);
}
-static void partial2StaticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "partial2StaticLongAttribute");
+static void partial2StaticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "partial2StaticLongAttribute");
- // 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;
- TestInterfacePartial2Implementation::setPartial2StaticLongAttribute(cppValue);
+ TestInterfacePartial2Implementation::setPartial2StaticLongAttribute(cppValue);
}
-void partial2StaticLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Value> v8Value = info[0];
+void partial2StaticLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Value> v8Value = info[0];
- TestInterfaceImplementationV8Internal::partial2StaticLongAttributeAttributeSetter(v8Value, info);
+ TestInterfaceImplementationV8Internal::partial2StaticLongAttributeAttributeSetter(v8Value, info);
}
-static void partial2SecureContextAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
+static void partial2SecureContextAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- v8SetReturnValueFast(info, TestInterfacePartial2Implementation::partial2SecureContextAttribute(*impl), impl);
+ v8SetReturnValueFast(info, TestInterfacePartial2Implementation::partial2SecureContextAttribute(*impl), impl);
}
-void partial2SecureContextAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::partial2SecureContextAttributeAttributeGetter(info);
+void partial2SecureContextAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::partial2SecureContextAttributeAttributeGetter(info);
}
-static void partial2SecureContextAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+static void partial2SecureContextAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "partial2SecureContextAttribute");
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "partial2SecureContextAttribute");
- // Prepare the value to be set.
- bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
+ // Prepare the value to be set.
+ bool* cppValue = V8bool::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 'bool'.");
- return;
- }
+ // Type check per: http://heycam.github.io/webidl/#es-interface
+ if (!cppValue) {
+ exceptionState.throwTypeError("The provided value is not of type 'bool'.");
+ return;
+ }
- TestInterfacePartial2Implementation::setPartial2SecureContextAttribute(*impl, cppValue);
+ TestInterfacePartial2Implementation::setPartial2SecureContextAttribute(*impl, cppValue);
}
-void partial2SecureContextAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Value> v8Value = info[0];
+void partial2SecureContextAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Value> v8Value = info[0];
- TestInterfaceImplementationV8Internal::partial2SecureContextAttributeAttributeSetter(v8Value, info);
+ TestInterfaceImplementationV8Internal::partial2SecureContextAttributeAttributeSetter(v8Value, info);
}
-static void partialSecureContextAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
+static void partialSecureContextAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- v8SetReturnValueFast(info, TestInterfacePartialSecureContext::partialSecureContextAttribute(*impl), impl);
+ v8SetReturnValueFast(info, TestInterfacePartialSecureContext::partialSecureContextAttribute(*impl), impl);
}
-void partialSecureContextAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::partialSecureContextAttributeAttributeGetter(info);
+void partialSecureContextAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::partialSecureContextAttributeAttributeGetter(info);
}
-static void partialSecureContextAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+static void partialSecureContextAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "partialSecureContextAttribute");
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "partialSecureContextAttribute");
- // Prepare the value to be set.
- bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
+ // Prepare the value to be set.
+ bool* cppValue = V8bool::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 'bool'.");
- return;
- }
+ // Type check per: http://heycam.github.io/webidl/#es-interface
+ if (!cppValue) {
+ exceptionState.throwTypeError("The provided value is not of type 'bool'.");
+ return;
+ }
- TestInterfacePartialSecureContext::setPartialSecureContextAttribute(*impl, cppValue);
+ TestInterfacePartialSecureContext::setPartialSecureContextAttribute(*impl, cppValue);
}
-void partialSecureContextAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Value> v8Value = info[0];
+void partialSecureContextAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Value> v8Value = info[0];
- TestInterfaceImplementationV8Internal::partialSecureContextAttributeAttributeSetter(v8Value, info);
+ TestInterfaceImplementationV8Internal::partialSecureContextAttributeAttributeSetter(v8Value, info);
}
-static void partialSecureContextRuntimeEnabledAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
+static void partialSecureContextRuntimeEnabledAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- v8SetReturnValueFast(info, TestInterfacePartialSecureContext::partialSecureContextRuntimeEnabledAttribute(*impl), impl);
+ v8SetReturnValueFast(info, TestInterfacePartialSecureContext::partialSecureContextRuntimeEnabledAttribute(*impl), impl);
}
-void partialSecureContextRuntimeEnabledAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::partialSecureContextRuntimeEnabledAttributeAttributeGetter(info);
+void partialSecureContextRuntimeEnabledAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::partialSecureContextRuntimeEnabledAttributeAttributeGetter(info);
}
-static void partialSecureContextRuntimeEnabledAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+static void partialSecureContextRuntimeEnabledAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "partialSecureContextRuntimeEnabledAttribute");
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "partialSecureContextRuntimeEnabledAttribute");
- // Prepare the value to be set.
- bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
+ // Prepare the value to be set.
+ bool* cppValue = V8bool::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 'bool'.");
- return;
- }
+ // Type check per: http://heycam.github.io/webidl/#es-interface
+ if (!cppValue) {
+ exceptionState.throwTypeError("The provided value is not of type 'bool'.");
+ return;
+ }
- TestInterfacePartialSecureContext::setPartialSecureContextRuntimeEnabledAttribute(*impl, cppValue);
+ TestInterfacePartialSecureContext::setPartialSecureContextRuntimeEnabledAttribute(*impl, cppValue);
}
-void partialSecureContextRuntimeEnabledAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Value> v8Value = info[0];
+void partialSecureContextRuntimeEnabledAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Value> v8Value = info[0];
- TestInterfaceImplementationV8Internal::partialSecureContextRuntimeEnabledAttributeAttributeSetter(v8Value, info);
+ TestInterfaceImplementationV8Internal::partialSecureContextRuntimeEnabledAttributeAttributeSetter(v8Value, info);
}
-static void partialSecureContextWindowExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
+static void partialSecureContextWindowExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- v8SetReturnValueFast(info, TestInterfacePartialSecureContext::partialSecureContextWindowExposedAttribute(*impl), impl);
+ v8SetReturnValueFast(info, TestInterfacePartialSecureContext::partialSecureContextWindowExposedAttribute(*impl), impl);
}
-void partialSecureContextWindowExposedAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::partialSecureContextWindowExposedAttributeAttributeGetter(info);
+void partialSecureContextWindowExposedAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::partialSecureContextWindowExposedAttributeAttributeGetter(info);
}
-static void partialSecureContextWindowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+static void partialSecureContextWindowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "partialSecureContextWindowExposedAttribute");
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "partialSecureContextWindowExposedAttribute");
- // Prepare the value to be set.
- bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
+ // Prepare the value to be set.
+ bool* cppValue = V8bool::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 'bool'.");
- return;
- }
+ // Type check per: http://heycam.github.io/webidl/#es-interface
+ if (!cppValue) {
+ exceptionState.throwTypeError("The provided value is not of type 'bool'.");
+ return;
+ }
- TestInterfacePartialSecureContext::setPartialSecureContextWindowExposedAttribute(*impl, cppValue);
+ TestInterfacePartialSecureContext::setPartialSecureContextWindowExposedAttribute(*impl, cppValue);
}
-void partialSecureContextWindowExposedAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Value> v8Value = info[0];
+void partialSecureContextWindowExposedAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Value> v8Value = info[0];
- TestInterfaceImplementationV8Internal::partialSecureContextWindowExposedAttributeAttributeSetter(v8Value, info);
+ TestInterfaceImplementationV8Internal::partialSecureContextWindowExposedAttributeAttributeSetter(v8Value, info);
}
-static void partialSecureContextWorkerExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
+static void partialSecureContextWorkerExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- v8SetReturnValueFast(info, TestInterfacePartialSecureContext::partialSecureContextWorkerExposedAttribute(*impl), impl);
+ v8SetReturnValueFast(info, TestInterfacePartialSecureContext::partialSecureContextWorkerExposedAttribute(*impl), impl);
}
-void partialSecureContextWorkerExposedAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::partialSecureContextWorkerExposedAttributeAttributeGetter(info);
+void partialSecureContextWorkerExposedAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::partialSecureContextWorkerExposedAttributeAttributeGetter(info);
}
-static void partialSecureContextWorkerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+static void partialSecureContextWorkerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "partialSecureContextWorkerExposedAttribute");
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "partialSecureContextWorkerExposedAttribute");
- // Prepare the value to be set.
- bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
+ // Prepare the value to be set.
+ bool* cppValue = V8bool::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 'bool'.");
- return;
- }
+ // Type check per: http://heycam.github.io/webidl/#es-interface
+ if (!cppValue) {
+ exceptionState.throwTypeError("The provided value is not of type 'bool'.");
+ return;
+ }
- TestInterfacePartialSecureContext::setPartialSecureContextWorkerExposedAttribute(*impl, cppValue);
+ TestInterfacePartialSecureContext::setPartialSecureContextWorkerExposedAttribute(*impl, cppValue);
}
-void partialSecureContextWorkerExposedAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Value> v8Value = info[0];
+void partialSecureContextWorkerExposedAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Value> v8Value = info[0];
- TestInterfaceImplementationV8Internal::partialSecureContextWorkerExposedAttributeAttributeSetter(v8Value, info);
+ TestInterfaceImplementationV8Internal::partialSecureContextWorkerExposedAttributeAttributeSetter(v8Value, info);
}
-static void partialSecureContextWindowExposedRuntimeEnabledAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
+static void partialSecureContextWindowExposedRuntimeEnabledAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- v8SetReturnValueFast(info, TestInterfacePartialSecureContext::partialSecureContextWindowExposedRuntimeEnabledAttribute(*impl), impl);
+ v8SetReturnValueFast(info, TestInterfacePartialSecureContext::partialSecureContextWindowExposedRuntimeEnabledAttribute(*impl), impl);
}
-void partialSecureContextWindowExposedRuntimeEnabledAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::partialSecureContextWindowExposedRuntimeEnabledAttributeAttributeGetter(info);
+void partialSecureContextWindowExposedRuntimeEnabledAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::partialSecureContextWindowExposedRuntimeEnabledAttributeAttributeGetter(info);
}
-static void partialSecureContextWindowExposedRuntimeEnabledAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+static void partialSecureContextWindowExposedRuntimeEnabledAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "partialSecureContextWindowExposedRuntimeEnabledAttribute");
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "partialSecureContextWindowExposedRuntimeEnabledAttribute");
- // Prepare the value to be set.
- bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
+ // Prepare the value to be set.
+ bool* cppValue = V8bool::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 'bool'.");
- return;
- }
+ // Type check per: http://heycam.github.io/webidl/#es-interface
+ if (!cppValue) {
+ exceptionState.throwTypeError("The provided value is not of type 'bool'.");
+ return;
+ }
- TestInterfacePartialSecureContext::setPartialSecureContextWindowExposedRuntimeEnabledAttribute(*impl, cppValue);
+ TestInterfacePartialSecureContext::setPartialSecureContextWindowExposedRuntimeEnabledAttribute(*impl, cppValue);
}
-void partialSecureContextWindowExposedRuntimeEnabledAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Value> v8Value = info[0];
+void partialSecureContextWindowExposedRuntimeEnabledAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Value> v8Value = info[0];
- TestInterfaceImplementationV8Internal::partialSecureContextWindowExposedRuntimeEnabledAttributeAttributeSetter(v8Value, info);
+ TestInterfaceImplementationV8Internal::partialSecureContextWindowExposedRuntimeEnabledAttributeAttributeSetter(v8Value, info);
}
-static void partialSecureContextWorkerExposedRuntimeEnabledAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
+static void partialSecureContextWorkerExposedRuntimeEnabledAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- v8SetReturnValueFast(info, TestInterfacePartialSecureContext::partialSecureContextWorkerExposedRuntimeEnabledAttribute(*impl), impl);
+ v8SetReturnValueFast(info, TestInterfacePartialSecureContext::partialSecureContextWorkerExposedRuntimeEnabledAttribute(*impl), impl);
}
-void partialSecureContextWorkerExposedRuntimeEnabledAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::partialSecureContextWorkerExposedRuntimeEnabledAttributeAttributeGetter(info);
+void partialSecureContextWorkerExposedRuntimeEnabledAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::partialSecureContextWorkerExposedRuntimeEnabledAttributeAttributeGetter(info);
}
-static void partialSecureContextWorkerExposedRuntimeEnabledAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
+static void partialSecureContextWorkerExposedRuntimeEnabledAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Object> holder = info.Holder();
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "partialSecureContextWorkerExposedRuntimeEnabledAttribute");
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestInterface", "partialSecureContextWorkerExposedRuntimeEnabledAttribute");
- // Prepare the value to be set.
- bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
+ // Prepare the value to be set.
+ bool* cppValue = V8bool::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 'bool'.");
- return;
- }
+ // Type check per: http://heycam.github.io/webidl/#es-interface
+ if (!cppValue) {
+ exceptionState.throwTypeError("The provided value is not of type 'bool'.");
+ return;
+ }
- TestInterfacePartialSecureContext::setPartialSecureContextWorkerExposedRuntimeEnabledAttribute(*impl, cppValue);
+ TestInterfacePartialSecureContext::setPartialSecureContextWorkerExposedRuntimeEnabledAttribute(*impl, cppValue);
}
-void partialSecureContextWorkerExposedRuntimeEnabledAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Value> v8Value = info[0];
+void partialSecureContextWorkerExposedRuntimeEnabledAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Local<v8::Value> v8Value = info[0];
- TestInterfaceImplementationV8Internal::partialSecureContextWorkerExposedRuntimeEnabledAttributeAttributeSetter(v8Value, info);
+ TestInterfaceImplementationV8Internal::partialSecureContextWorkerExposedRuntimeEnabledAttributeAttributeSetter(v8Value, info);
}
-static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
- if (UNLIKELY(info.Length() < 1)) {
- V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodTestInterfaceEmptyArg", "TestInterface", ExceptionMessages::notEnoughArguments(1, info.Length())));
- return;
- }
+ if (UNLIKELY(info.Length() < 1)) {
+ V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodTestInterfaceEmptyArg", "TestInterface", ExceptionMessages::notEnoughArguments(1, info.Length())));
+ return;
+ }
- TestInterfaceEmpty* testInterfaceEmptyArg;
- testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIsolate(), info[0]);
- if (!testInterfaceEmptyArg) {
- V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodTestInterfaceEmptyArg", "TestInterface", "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", "TestInterface", "parameter 1 is not of type 'TestInterfaceEmpty'."));
- return;
- }
+ return;
+ }
- impl->voidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg);
+ impl->voidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg);
}
-void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::voidMethodTestInterfaceEmptyArgMethod(info);
+void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::voidMethodTestInterfaceEmptyArgMethod(info);
}
-static void voidMethodDoubleArgFloatArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestInterface", "voidMethodDoubleArgFloatArg");
+static void voidMethodDoubleArgFloatArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestInterface", "voidMethodDoubleArgFloatArg");
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+ TestInterfaceImplementation* impl = V8TestInterface::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)
-{
- TestInterfaceImplementationV8Internal::voidMethodDoubleArgFloatArgMethod(info);
+void voidMethodDoubleArgFloatArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::voidMethodDoubleArgFloatArgMethod(info);
}
-static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestInterface", "voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg");
+static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestInterface", "voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg");
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+ TestInterfaceImplementation* impl = V8TestInterface::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)
-{
- TestInterfaceImplementationV8Internal::voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethod(info);
+void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethod(info);
}
-static void voidMethodTestEnumArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestInterface", "voidMethodTestEnumArg");
+static void voidMethodTestEnumArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestInterface", "voidMethodTestEnumArg");
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+ TestInterfaceImplementation* impl = V8TestInterface::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;
+ }
- V8StringResource<> testEnumArg;
- testEnumArg = info[0];
- if (!testEnumArg.prepare())
- return;
- const char* validTestEnumArgValues[] = {
- "",
- "EnumValue1",
- "EnumValue2",
- "EnumValue3",
- };
- if (!isValidEnum(testEnumArg, validTestEnumArgValues, WTF_ARRAY_LENGTH(validTestEnumArgValues), "TestEnum", exceptionState)) {
- return;
- }
+ V8StringResource<> testEnumArg;
+ testEnumArg = info[0];
+ if (!testEnumArg.prepare())
+ return;
+ const char* validTestEnumArgValues[] = {
+ "",
+ "EnumValue1",
+ "EnumValue2",
+ "EnumValue3",
+ };
+ if (!isValidEnum(testEnumArg, validTestEnumArgValues, WTF_ARRAY_LENGTH(validTestEnumArgValues), "TestEnum", exceptionState)) {
+ return;
+ }
- impl->voidMethodTestEnumArg(testEnumArg);
+ impl->voidMethodTestEnumArg(testEnumArg);
}
-void voidMethodTestEnumArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::voidMethodTestEnumArgMethod(info);
+void voidMethodTestEnumArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::voidMethodTestEnumArgMethod(info);
}
-static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
- impl->voidMethod();
+ impl->voidMethod();
}
-void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::voidMethodMethod(info);
+void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::voidMethodMethod(info);
}
-static void voidMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+static void voidMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
- impl->voidMethod();
+ impl->voidMethod();
}
-void voidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::voidMethodMethodForMainWorld(info);
+void voidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::voidMethodMethodForMainWorld(info);
}
-static void alwaysExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+static void alwaysExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
- impl->alwaysExposedMethod();
+ impl->alwaysExposedMethod();
}
-void alwaysExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::alwaysExposedMethodMethod(info);
+void alwaysExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::alwaysExposedMethodMethod(info);
}
-static void workerExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+static void workerExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
- impl->workerExposedMethod();
+ impl->workerExposedMethod();
}
-void workerExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::workerExposedMethodMethod(info);
+void workerExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::workerExposedMethodMethod(info);
}
-static void windowExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+static void windowExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
- impl->windowExposedMethod();
+ impl->windowExposedMethod();
}
-void windowExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::windowExposedMethodMethod(info);
+void windowExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::windowExposedMethodMethod(info);
}
-static void alwaysExposedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation::alwaysExposedStaticMethod();
+static void alwaysExposedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementation::alwaysExposedStaticMethod();
}
-void alwaysExposedStaticMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::alwaysExposedStaticMethodMethod(info);
+void alwaysExposedStaticMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::alwaysExposedStaticMethodMethod(info);
}
-static void workerExposedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation::workerExposedStaticMethod();
+static void workerExposedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementation::workerExposedStaticMethod();
}
-void workerExposedStaticMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::workerExposedStaticMethodMethod(info);
+void workerExposedStaticMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::workerExposedStaticMethodMethod(info);
}
-static void windowExposedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation::windowExposedStaticMethod();
+static void windowExposedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementation::windowExposedStaticMethod();
}
-void windowExposedStaticMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::windowExposedStaticMethodMethod(info);
+void windowExposedStaticMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::windowExposedStaticMethodMethod(info);
}
-static void staticReturnDOMWrapperMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8SetReturnValue(info, TestInterfaceImplementation::staticReturnDOMWrapperMethod(), info.GetIsolate()->GetCurrentContext()->Global());
+static void staticReturnDOMWrapperMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8SetReturnValue(info, TestInterfaceImplementation::staticReturnDOMWrapperMethod(), info.GetIsolate()->GetCurrentContext()->Global());
}
-void staticReturnDOMWrapperMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::staticReturnDOMWrapperMethodMethod(info);
+void staticReturnDOMWrapperMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::staticReturnDOMWrapperMethodMethod(info);
}
-static void methodWithExposedAndRuntimeEnabledFlagMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+static void methodWithExposedAndRuntimeEnabledFlagMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
- impl->methodWithExposedAndRuntimeEnabledFlag();
+ impl->methodWithExposedAndRuntimeEnabledFlag();
}
-void methodWithExposedAndRuntimeEnabledFlagMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::methodWithExposedAndRuntimeEnabledFlagMethod(info);
+void methodWithExposedAndRuntimeEnabledFlagMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::methodWithExposedAndRuntimeEnabledFlagMethod(info);
}
-static void overloadMethodWithExposedAndRuntimeEnabledFlag1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestInterface", "overloadMethodWithExposedAndRuntimeEnabledFlag");
+static void overloadMethodWithExposedAndRuntimeEnabledFlag1Method(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestInterface", "overloadMethodWithExposedAndRuntimeEnabledFlag");
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
- int longArg;
- longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState);
- if (exceptionState.hadException())
- return;
+ int longArg;
+ longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState);
+ if (exceptionState.hadException())
+ return;
- impl->overloadMethodWithExposedAndRuntimeEnabledFlag(longArg);
+ impl->overloadMethodWithExposedAndRuntimeEnabledFlag(longArg);
}
-static void overloadMethodWithExposedAndRuntimeEnabledFlag2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+static void overloadMethodWithExposedAndRuntimeEnabledFlag2Method(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
- V8StringResource<> string;
- string = info[0];
- if (!string.prepare())
- return;
+ V8StringResource<> string;
+ string = info[0];
+ if (!string.prepare())
+ return;
- impl->overloadMethodWithExposedAndRuntimeEnabledFlag(string);
+ impl->overloadMethodWithExposedAndRuntimeEnabledFlag(string);
}
-static void overloadMethodWithExposedAndRuntimeEnabledFlag3Method(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+static void overloadMethodWithExposedAndRuntimeEnabledFlag3Method(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
- DOMWindow* window;
- window = toDOMWindow(info.GetIsolate(), info[0]);
- if (!window) {
- V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("overloadMethodWithExposedAndRuntimeEnabledFlag", "TestInterface", "parameter 1 is not of type 'Window'."));
+ DOMWindow* window;
+ window = toDOMWindow(info.GetIsolate(), info[0]);
+ if (!window) {
+ V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("overloadMethodWithExposedAndRuntimeEnabledFlag", "TestInterface", "parameter 1 is not of type 'Window'."));
- return;
- }
+ return;
+ }
- impl->overloadMethodWithExposedAndRuntimeEnabledFlag(window);
+ impl->overloadMethodWithExposedAndRuntimeEnabledFlag(window);
}
-static void overloadMethodWithExposedAndRuntimeEnabledFlagMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- bool isArityError = false;
- switch (std::min(1, info.Length())) {
+static void overloadMethodWithExposedAndRuntimeEnabledFlagMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ bool isArityError = false;
+ switch (std::min(1, info.Length())) {
case 1:
- if (RuntimeEnabledFeatures::featureName2Enabled()) {
- if (V8Window::hasInstance(info[0], info.GetIsolate())) {
- overloadMethodWithExposedAndRuntimeEnabledFlag3Method(info);
- return;
- }
- }
- if (info[0]->IsNumber()) {
- overloadMethodWithExposedAndRuntimeEnabledFlag1Method(info);
+ if (RuntimeEnabledFeatures::featureName2Enabled()) {
+ if (V8Window::hasInstance(info[0], info.GetIsolate())) {
+ overloadMethodWithExposedAndRuntimeEnabledFlag3Method(info);
return;
- }
- if (RuntimeEnabledFeatures::featureNameEnabled()) {
- if (true) {
- overloadMethodWithExposedAndRuntimeEnabledFlag2Method(info);
- return;
- }
- }
- if (true) {
- overloadMethodWithExposedAndRuntimeEnabledFlag1Method(info);
+ }
+ }
+ if (info[0]->IsNumber()) {
+ overloadMethodWithExposedAndRuntimeEnabledFlag1Method(info);
+ return;
+ }
+ if (RuntimeEnabledFeatures::featureNameEnabled()) {
+ if (true) {
+ overloadMethodWithExposedAndRuntimeEnabledFlag2Method(info);
return;
- }
- break;
+ }
+ }
+ if (true) {
+ overloadMethodWithExposedAndRuntimeEnabledFlag1Method(info);
+ return;
+ }
+ break;
default:
- isArityError = true;
- }
+ isArityError = true;
+ }
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestInterface", "overloadMethodWithExposedAndRuntimeEnabledFlag");
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestInterface", "overloadMethodWithExposedAndRuntimeEnabledFlag");
- if (isArityError) {
- if (info.Length() < 1) {
- exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
- return;
- }
+ if (isArityError) {
+ if (info.Length() < 1) {
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
+ return;
}
- exceptionState.throwTypeError("No function was found that matched the signature provided.");
+ }
+ exceptionState.throwTypeError("No function was found that matched the signature provided.");
}
-void overloadMethodWithExposedAndRuntimeEnabledFlagMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::overloadMethodWithExposedAndRuntimeEnabledFlagMethod(info);
+void overloadMethodWithExposedAndRuntimeEnabledFlagMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::overloadMethodWithExposedAndRuntimeEnabledFlagMethod(info);
}
-static void methodWithExposedHavingRuntimeEnabldFlagMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+static void methodWithExposedHavingRuntimeEnabldFlagMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
- impl->methodWithExposedHavingRuntimeEnabldFlag();
+ impl->methodWithExposedHavingRuntimeEnabldFlag();
}
-void methodWithExposedHavingRuntimeEnabldFlagMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::methodWithExposedHavingRuntimeEnabldFlagMethod(info);
+void methodWithExposedHavingRuntimeEnabldFlagMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::methodWithExposedHavingRuntimeEnabldFlagMethod(info);
}
-static void windowAndServiceWorkerExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+static void windowAndServiceWorkerExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
- impl->windowAndServiceWorkerExposedMethod();
+ impl->windowAndServiceWorkerExposedMethod();
}
-void windowAndServiceWorkerExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::windowAndServiceWorkerExposedMethodMethod(info);
+void windowAndServiceWorkerExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::windowAndServiceWorkerExposedMethodMethod(info);
}
-static void voidMethodPartialOverload1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+static void voidMethodPartialOverload1Method(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
- impl->voidMethodPartialOverload();
+ impl->voidMethodPartialOverload();
}
-static void voidMethodPartialOverload2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestInterface", "voidMethodPartialOverload");
+static void voidMethodPartialOverload2Method(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestInterface", "voidMethodPartialOverload");
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
- double doubleArg;
- doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionState);
- if (exceptionState.hadException())
- return;
+ double doubleArg;
+ doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionState);
+ if (exceptionState.hadException())
+ return;
- impl->voidMethodPartialOverload(doubleArg);
+ impl->voidMethodPartialOverload(doubleArg);
}
-static void staticVoidMethodPartialOverload1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation::staticVoidMethodPartialOverload();
+static void staticVoidMethodPartialOverload1Method(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementation::staticVoidMethodPartialOverload();
}
-static void promiseMethodPartialOverload1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+static void promiseMethodPartialOverload1Method(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
- v8SetReturnValue(info, impl->promiseMethodPartialOverload().v8Value());
+ v8SetReturnValue(info, impl->promiseMethodPartialOverload().v8Value());
}
-static void promiseMethodPartialOverload2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestInterface", "promiseMethodPartialOverload");
- ExceptionToRejectPromiseScope rejectPromiseScope(info, exceptionState);
+static void promiseMethodPartialOverload2Method(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestInterface", "promiseMethodPartialOverload");
+ ExceptionToRejectPromiseScope rejectPromiseScope(info, exceptionState);
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
- DOMWindow* window;
- window = toDOMWindow(info.GetIsolate(), info[0]);
- if (!window) {
- exceptionState.throwTypeError("parameter 1 is not of type 'Window'.");
+ DOMWindow* window;
+ window = toDOMWindow(info.GetIsolate(), info[0]);
+ if (!window) {
+ exceptionState.throwTypeError("parameter 1 is not of type 'Window'.");
- return;
- }
+ return;
+ }
- v8SetReturnValue(info, impl->promiseMethodPartialOverload(window).v8Value());
+ v8SetReturnValue(info, impl->promiseMethodPartialOverload(window).v8Value());
}
-static void staticPromiseMethodPartialOverload1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8SetReturnValue(info, TestInterfaceImplementation::staticPromiseMethodPartialOverload().v8Value());
+static void staticPromiseMethodPartialOverload1Method(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8SetReturnValue(info, TestInterfaceImplementation::staticPromiseMethodPartialOverload().v8Value());
}
-static void legacyInterfaceTypeCheckingMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+static void legacyInterfaceTypeCheckingMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
- if (UNLIKELY(info.Length() < 1)) {
- V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("legacyInterfaceTypeCheckingMethod", "TestInterface", ExceptionMessages::notEnoughArguments(1, info.Length())));
- return;
- }
+ if (UNLIKELY(info.Length() < 1)) {
+ V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("legacyInterfaceTypeCheckingMethod", "TestInterface", ExceptionMessages::notEnoughArguments(1, info.Length())));
+ return;
+ }
- TestInterfaceEmpty* testInterfaceEmptyArg;
- testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIsolate(), info[0]);
+ TestInterfaceEmpty* testInterfaceEmptyArg;
+ testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIsolate(), info[0]);
- impl->legacyInterfaceTypeCheckingMethod(testInterfaceEmptyArg);
+ impl->legacyInterfaceTypeCheckingMethod(testInterfaceEmptyArg);
}
-void legacyInterfaceTypeCheckingMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::legacyInterfaceTypeCheckingMethodMethod(info);
+void legacyInterfaceTypeCheckingMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::legacyInterfaceTypeCheckingMethodMethod(info);
}
-static void secureContextMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+static void secureContextMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
- impl->secureContextMethod();
+ impl->secureContextMethod();
}
-void secureContextMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::secureContextMethodMethod(info);
+void secureContextMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::secureContextMethodMethod(info);
}
-static void secureContextRuntimeEnabledMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+static void secureContextRuntimeEnabledMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
- impl->secureContextRuntimeEnabledMethod();
+ impl->secureContextRuntimeEnabledMethod();
}
-void secureContextRuntimeEnabledMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::secureContextRuntimeEnabledMethodMethod(info);
+void secureContextRuntimeEnabledMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::secureContextRuntimeEnabledMethodMethod(info);
}
-static void secureContextWindowExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+static void secureContextWindowExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
- impl->secureContextWindowExposedMethod();
+ impl->secureContextWindowExposedMethod();
}
-void secureContextWindowExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::secureContextWindowExposedMethodMethod(info);
+void secureContextWindowExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::secureContextWindowExposedMethodMethod(info);
}
-static void secureContextWorkerExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+static void secureContextWorkerExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
- impl->secureContextWorkerExposedMethod();
+ impl->secureContextWorkerExposedMethod();
}
-void secureContextWorkerExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::secureContextWorkerExposedMethodMethod(info);
+void secureContextWorkerExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::secureContextWorkerExposedMethodMethod(info);
}
-static void secureContextWindowExposedRuntimeEnabledMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+static void secureContextWindowExposedRuntimeEnabledMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
- impl->secureContextWindowExposedRuntimeEnabledMethod();
+ impl->secureContextWindowExposedRuntimeEnabledMethod();
}
-void secureContextWindowExposedRuntimeEnabledMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::secureContextWindowExposedRuntimeEnabledMethodMethod(info);
+void secureContextWindowExposedRuntimeEnabledMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::secureContextWindowExposedRuntimeEnabledMethodMethod(info);
}
-static void secureContextWorkerExposedRuntimeEnabledMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+static void secureContextWorkerExposedRuntimeEnabledMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
- impl->secureContextWorkerExposedRuntimeEnabledMethod();
+ impl->secureContextWorkerExposedRuntimeEnabledMethod();
}
-void secureContextWorkerExposedRuntimeEnabledMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::secureContextWorkerExposedRuntimeEnabledMethodMethod(info);
+void secureContextWorkerExposedRuntimeEnabledMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::secureContextWorkerExposedRuntimeEnabledMethodMethod(info);
}
-static void implementsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+static void implementsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
- impl->implementsVoidMethod();
+ impl->implementsVoidMethod();
}
-void implementsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::implementsVoidMethodMethod(info);
+void implementsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::implementsVoidMethodMethod(info);
}
-static void implementsComplexMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestInterface", "implementsComplexMethod");
+static void implementsComplexMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestInterface", "implementsComplexMethod");
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+ TestInterfaceImplementation* impl = V8TestInterface::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;
+ }
- V8StringResource<> strArg;
- TestInterfaceEmpty* testInterfaceEmptyArg;
- strArg = info[0];
- if (!strArg.prepare())
- return;
+ V8StringResource<> strArg;
+ TestInterfaceEmpty* testInterfaceEmptyArg;
+ strArg = info[0];
+ if (!strArg.prepare())
+ return;
- testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIsolate(), info[1]);
- if (!testInterfaceEmptyArg) {
- exceptionState.throwTypeError("parameter 2 is not of type 'TestInterfaceEmpty'.");
+ testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIsolate(), info[1]);
+ if (!testInterfaceEmptyArg) {
+ exceptionState.throwTypeError("parameter 2 is not of type 'TestInterfaceEmpty'.");
- return;
- }
+ return;
+ }
- ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate());
- TestInterfaceEmpty* result = impl->implementsComplexMethod(executionContext, strArg, testInterfaceEmptyArg, exceptionState);
- if (exceptionState.hadException()) {
- return;
- }
- v8SetReturnValue(info, result);
+ ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate());
+ TestInterfaceEmpty* result = impl->implementsComplexMethod(executionContext, strArg, testInterfaceEmptyArg, exceptionState);
+ if (exceptionState.hadException()) {
+ return;
+ }
+ v8SetReturnValue(info, result);
}
-void implementsComplexMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::implementsComplexMethodMethod(info);
+void implementsComplexMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::implementsComplexMethodMethod(info);
}
-void implementsCustomVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- V8TestInterface::implementsCustomVoidMethodMethodCustom(info);
+void implementsCustomVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ V8TestInterface::implementsCustomVoidMethodMethodCustom(info);
}
-static void implementsStaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation::implementsStaticVoidMethod();
+static void implementsStaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementation::implementsStaticVoidMethod();
}
-void implementsStaticVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::implementsStaticVoidMethodMethod(info);
+void implementsStaticVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::implementsStaticVoidMethodMethod(info);
}
-static void implements2VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+static void implements2VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
- TestImplements2::implements2VoidMethod(*impl);
+ TestImplements2::implements2VoidMethod(*impl);
}
-void implements2VoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::implements2VoidMethodMethod(info);
+void implements2VoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::implements2VoidMethodMethod(info);
}
-static void implements3VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+static void implements3VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
- TestImplements3Implementation::implements3VoidMethod(*impl);
+ TestImplements3Implementation::implements3VoidMethod(*impl);
}
-void implements3VoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::implements3VoidMethodMethod(info);
+void implements3VoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::implements3VoidMethodMethod(info);
}
-static void implements3StaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestImplements3Implementation::implements3StaticVoidMethod();
+static void implements3StaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestImplements3Implementation::implements3StaticVoidMethod();
}
-void implements3StaticVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::implements3StaticVoidMethodMethod(info);
+void implements3StaticVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::implements3StaticVoidMethodMethod(info);
}
-static void partialVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+static void partialVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
- TestInterfacePartial::partialVoidMethod(*impl);
+ TestInterfacePartial::partialVoidMethod(*impl);
}
-void partialVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::partialVoidMethodMethod(info);
+void partialVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::partialVoidMethodMethod(info);
}
-static void partialStaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfacePartial::partialStaticVoidMethod();
+static void partialStaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfacePartial::partialStaticVoidMethod();
}
-void partialStaticVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::partialStaticVoidMethodMethod(info);
+void partialStaticVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::partialStaticVoidMethodMethod(info);
}
-static void partialVoidMethodLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestInterface", "partialVoidMethodLongArg");
+static void partialVoidMethodLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestInterface", "partialVoidMethodLongArg");
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+ TestInterfaceImplementation* impl = V8TestInterface::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;
+ }
- int longArg;
- longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState);
- if (exceptionState.hadException())
- return;
+ int longArg;
+ longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState);
+ if (exceptionState.hadException())
+ return;
- TestInterfacePartial::partialVoidMethodLongArg(*impl, longArg);
+ TestInterfacePartial::partialVoidMethodLongArg(*impl, longArg);
}
-void partialVoidMethodLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::partialVoidMethodLongArgMethod(info);
+void partialVoidMethodLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::partialVoidMethodLongArgMethod(info);
}
-static void partialCallWithExecutionContextRaisesExceptionVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestInterface", "partialCallWithExecutionContextRaisesExceptionVoidMethod");
+static void partialCallWithExecutionContextRaisesExceptionVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestInterface", "partialCallWithExecutionContextRaisesExceptionVoidMethod");
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
- ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate());
- TestInterfacePartial::partialCallWithExecutionContextRaisesExceptionVoidMethod(executionContext, *impl, exceptionState);
- if (exceptionState.hadException()) {
- return;
- }
+ ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate());
+ TestInterfacePartial::partialCallWithExecutionContextRaisesExceptionVoidMethod(executionContext, *impl, exceptionState);
+ if (exceptionState.hadException()) {
+ return;
+ }
}
-void partialCallWithExecutionContextRaisesExceptionVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::partialCallWithExecutionContextRaisesExceptionVoidMethodMethod(info);
+void partialCallWithExecutionContextRaisesExceptionVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::partialCallWithExecutionContextRaisesExceptionVoidMethodMethod(info);
}
-static void partialVoidMethodPartialCallbackTypeArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+static void partialVoidMethodPartialCallbackTypeArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
- if (UNLIKELY(info.Length() < 1)) {
- V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("partialVoidMethodPartialCallbackTypeArg", "TestInterface", ExceptionMessages::notEnoughArguments(1, info.Length())));
- return;
- }
+ if (UNLIKELY(info.Length() < 1)) {
+ V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("partialVoidMethodPartialCallbackTypeArg", "TestInterface", ExceptionMessages::notEnoughArguments(1, info.Length())));
+ return;
+ }
- ScriptValue partialCallbackTypeArg;
- if (!info[0]->IsFunction()) {
- V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("partialVoidMethodPartialCallbackTypeArg", "TestInterface", "The callback provided as parameter 1 is not a function."));
+ ScriptValue partialCallbackTypeArg;
+ if (!info[0]->IsFunction()) {
+ V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("partialVoidMethodPartialCallbackTypeArg", "TestInterface", "The callback provided as parameter 1 is not a function."));
- return;
- }
- partialCallbackTypeArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[0]);
+ return;
+ }
+ partialCallbackTypeArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[0]);
- TestInterfacePartial::partialVoidMethodPartialCallbackTypeArg(*impl, partialCallbackTypeArg);
+ TestInterfacePartial::partialVoidMethodPartialCallbackTypeArg(*impl, partialCallbackTypeArg);
}
-void partialVoidMethodPartialCallbackTypeArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::partialVoidMethodPartialCallbackTypeArgMethod(info);
+void partialVoidMethodPartialCallbackTypeArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::partialVoidMethodPartialCallbackTypeArgMethod(info);
}
-static void shortMethodWithShortArgumentImplementedInPrivateScriptMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestInterface", "shortMethodWithShortArgumentImplementedInPrivateScript");
+static void shortMethodWithShortArgumentImplementedInPrivateScriptMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestInterface", "shortMethodWithShortArgumentImplementedInPrivateScript");
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+ TestInterfaceImplementation* impl = V8TestInterface::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;
+ }
- int value;
- value = toInt16(info.GetIsolate(), info[0], NormalConversion, exceptionState);
- if (exceptionState.hadException())
- return;
+ int value;
+ value = toInt16(info.GetIsolate(), info[0], NormalConversion, exceptionState);
+ if (exceptionState.hadException())
+ return;
- int result = 0;
- if (!V8TestInterface::PrivateScript::shortMethodWithShortArgumentImplementedInPrivateScriptMethod(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, value, &result))
- return;
- v8SetReturnValueInt(info, result);
+ int result = 0;
+ if (!V8TestInterface::PrivateScript::shortMethodWithShortArgumentImplementedInPrivateScriptMethod(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, value, &result))
+ return;
+ v8SetReturnValueInt(info, result);
}
-void shortMethodWithShortArgumentImplementedInPrivateScriptMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::shortMethodWithShortArgumentImplementedInPrivateScriptMethod(info);
+void shortMethodWithShortArgumentImplementedInPrivateScriptMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::shortMethodWithShortArgumentImplementedInPrivateScriptMethod(info);
}
-static void partial2VoidMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+static void partial2VoidMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
- TestInterfacePartial2Implementation::partial2VoidMethod(*impl);
+ TestInterfacePartial2Implementation::partial2VoidMethod(*impl);
}
-static void partial2StaticVoidMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfacePartial2Implementation::partial2StaticVoidMethod();
+static void partial2StaticVoidMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfacePartial2Implementation::partial2StaticVoidMethod();
}
-static void partial2SecureContextMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+static void partial2SecureContextMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
- TestInterfacePartial2Implementation::partial2SecureContextMethod(*impl);
+ TestInterfacePartial2Implementation::partial2SecureContextMethod(*impl);
}
-void partial2SecureContextMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::partial2SecureContextMethodMethod(info);
+void partial2SecureContextMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::partial2SecureContextMethodMethod(info);
}
-static void partialSecureContextMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+static void partialSecureContextMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
- TestInterfacePartialSecureContext::partialSecureContextMethod(*impl);
+ TestInterfacePartialSecureContext::partialSecureContextMethod(*impl);
}
-void partialSecureContextMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::partialSecureContextMethodMethod(info);
+void partialSecureContextMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::partialSecureContextMethodMethod(info);
}
-static void partialSecureContextRuntimeEnabledMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+static void partialSecureContextRuntimeEnabledMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
- TestInterfacePartialSecureContext::partialSecureContextRuntimeEnabledMethod(*impl);
+ TestInterfacePartialSecureContext::partialSecureContextRuntimeEnabledMethod(*impl);
}
-void partialSecureContextRuntimeEnabledMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::partialSecureContextRuntimeEnabledMethodMethod(info);
+void partialSecureContextRuntimeEnabledMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::partialSecureContextRuntimeEnabledMethodMethod(info);
}
-static void partialSecureContextWindowExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+static void partialSecureContextWindowExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
- TestInterfacePartialSecureContext::partialSecureContextWindowExposedMethod(*impl);
+ TestInterfacePartialSecureContext::partialSecureContextWindowExposedMethod(*impl);
}
-void partialSecureContextWindowExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::partialSecureContextWindowExposedMethodMethod(info);
+void partialSecureContextWindowExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::partialSecureContextWindowExposedMethodMethod(info);
}
-static void partialSecureContextWorkerExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+static void partialSecureContextWorkerExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
- TestInterfacePartialSecureContext::partialSecureContextWorkerExposedMethod(*impl);
+ TestInterfacePartialSecureContext::partialSecureContextWorkerExposedMethod(*impl);
}
-void partialSecureContextWorkerExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::partialSecureContextWorkerExposedMethodMethod(info);
+void partialSecureContextWorkerExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::partialSecureContextWorkerExposedMethodMethod(info);
}
-static void partialSecureContextWindowExposedRuntimeEnabledMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+static void partialSecureContextWindowExposedRuntimeEnabledMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
- TestInterfacePartialSecureContext::partialSecureContextWindowExposedRuntimeEnabledMethod(*impl);
+ TestInterfacePartialSecureContext::partialSecureContextWindowExposedRuntimeEnabledMethod(*impl);
}
-void partialSecureContextWindowExposedRuntimeEnabledMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::partialSecureContextWindowExposedRuntimeEnabledMethodMethod(info);
+void partialSecureContextWindowExposedRuntimeEnabledMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::partialSecureContextWindowExposedRuntimeEnabledMethodMethod(info);
}
-static void partialSecureContextWorkerExposedRuntimeEnabledMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+static void partialSecureContextWorkerExposedRuntimeEnabledMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
- TestInterfacePartialSecureContext::partialSecureContextWorkerExposedRuntimeEnabledMethod(*impl);
+ TestInterfacePartialSecureContext::partialSecureContextWorkerExposedRuntimeEnabledMethod(*impl);
}
-void partialSecureContextWorkerExposedRuntimeEnabledMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::partialSecureContextWorkerExposedRuntimeEnabledMethodMethod(info);
+void partialSecureContextWorkerExposedRuntimeEnabledMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::partialSecureContextWorkerExposedRuntimeEnabledMethodMethod(info);
}
-static void voidMethodPartialOverloadMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- switch (std::min(1, info.Length())) {
+static void voidMethodPartialOverloadMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ switch (std::min(1, info.Length())) {
case 0:
- if (true) {
- voidMethodPartialOverload1Method(info);
- return;
- }
- break;
+ if (true) {
+ voidMethodPartialOverload1Method(info);
+ return;
+ }
+ break;
case 1:
- if (info[0]->IsNumber()) {
- voidMethodPartialOverload2Method(info);
- return;
- }
- if (true) {
- voidMethodPartialOverload2Method(info);
- return;
- }
- break;
- }
+ if (info[0]->IsNumber()) {
+ voidMethodPartialOverload2Method(info);
+ return;
+ }
+ if (true) {
+ voidMethodPartialOverload2Method(info);
+ return;
+ }
+ break;
+ }
- DCHECK(voidMethodPartialOverloadMethodForPartialInterface);
- (voidMethodPartialOverloadMethodForPartialInterface)(info);
+ DCHECK(voidMethodPartialOverloadMethodForPartialInterface);
+ (voidMethodPartialOverloadMethodForPartialInterface)(info);
}
-void voidMethodPartialOverloadMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::voidMethodPartialOverloadMethod(info);
+void voidMethodPartialOverloadMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::voidMethodPartialOverloadMethod(info);
}
-static void staticVoidMethodPartialOverloadMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- switch (std::min(1, info.Length())) {
+static void staticVoidMethodPartialOverloadMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ switch (std::min(1, info.Length())) {
case 0:
- if (true) {
- staticVoidMethodPartialOverload1Method(info);
- return;
- }
- break;
+ if (true) {
+ staticVoidMethodPartialOverload1Method(info);
+ return;
+ }
+ break;
case 1:
- break;
- }
+ break;
+ }
- DCHECK(staticVoidMethodPartialOverloadMethodForPartialInterface);
- (staticVoidMethodPartialOverloadMethodForPartialInterface)(info);
+ DCHECK(staticVoidMethodPartialOverloadMethodForPartialInterface);
+ (staticVoidMethodPartialOverloadMethodForPartialInterface)(info);
}
-void staticVoidMethodPartialOverloadMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::staticVoidMethodPartialOverloadMethod(info);
+void staticVoidMethodPartialOverloadMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::staticVoidMethodPartialOverloadMethod(info);
}
-static void promiseMethodPartialOverloadMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- switch (std::min(1, info.Length())) {
+static void promiseMethodPartialOverloadMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ switch (std::min(1, info.Length())) {
case 0:
- if (true) {
- promiseMethodPartialOverload1Method(info);
- return;
- }
- break;
+ if (true) {
+ promiseMethodPartialOverload1Method(info);
+ return;
+ }
+ break;
case 1:
- if (V8Window::hasInstance(info[0], info.GetIsolate())) {
- promiseMethodPartialOverload2Method(info);
- return;
- }
- break;
- }
+ if (V8Window::hasInstance(info[0], info.GetIsolate())) {
+ promiseMethodPartialOverload2Method(info);
+ return;
+ }
+ break;
+ }
- DCHECK(promiseMethodPartialOverloadMethodForPartialInterface);
- (promiseMethodPartialOverloadMethodForPartialInterface)(info);
+ DCHECK(promiseMethodPartialOverloadMethodForPartialInterface);
+ (promiseMethodPartialOverloadMethodForPartialInterface)(info);
}
-void promiseMethodPartialOverloadMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::promiseMethodPartialOverloadMethod(info);
+void promiseMethodPartialOverloadMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::promiseMethodPartialOverloadMethod(info);
}
-static void staticPromiseMethodPartialOverloadMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- switch (std::min(1, info.Length())) {
+static void staticPromiseMethodPartialOverloadMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ switch (std::min(1, info.Length())) {
case 0:
- if (true) {
- staticPromiseMethodPartialOverload1Method(info);
- return;
- }
- break;
+ if (true) {
+ staticPromiseMethodPartialOverload1Method(info);
+ return;
+ }
+ break;
case 1:
- break;
- }
+ break;
+ }
- DCHECK(staticPromiseMethodPartialOverloadMethodForPartialInterface);
- (staticPromiseMethodPartialOverloadMethodForPartialInterface)(info);
+ DCHECK(staticPromiseMethodPartialOverloadMethodForPartialInterface);
+ (staticPromiseMethodPartialOverloadMethodForPartialInterface)(info);
}
-void staticPromiseMethodPartialOverloadMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::staticPromiseMethodPartialOverloadMethod(info);
+void staticPromiseMethodPartialOverloadMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::staticPromiseMethodPartialOverloadMethod(info);
}
-static void partial2VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- switch (std::min(1, info.Length())) {
+static void partial2VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ switch (std::min(1, info.Length())) {
case 0:
- if (true) {
- partial2VoidMethod1Method(info);
- return;
- }
- break;
+ if (true) {
+ partial2VoidMethod1Method(info);
+ return;
+ }
+ break;
case 1:
- break;
- }
+ break;
+ }
- DCHECK(partial2VoidMethodMethodForPartialInterface);
- (partial2VoidMethodMethodForPartialInterface)(info);
+ DCHECK(partial2VoidMethodMethodForPartialInterface);
+ (partial2VoidMethodMethodForPartialInterface)(info);
}
-void partial2VoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::partial2VoidMethodMethod(info);
+void partial2VoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::partial2VoidMethodMethod(info);
}
-static void partial2StaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- switch (std::min(1, info.Length())) {
+static void partial2StaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ switch (std::min(1, info.Length())) {
case 0:
- if (true) {
- partial2StaticVoidMethod1Method(info);
- return;
- }
- break;
+ if (true) {
+ partial2StaticVoidMethod1Method(info);
+ return;
+ }
+ break;
case 1:
- break;
- }
+ break;
+ }
- DCHECK(partial2StaticVoidMethodMethodForPartialInterface);
- (partial2StaticVoidMethodMethodForPartialInterface)(info);
+ DCHECK(partial2StaticVoidMethodMethodForPartialInterface);
+ (partial2StaticVoidMethodMethodForPartialInterface)(info);
}
-void partial2StaticVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethod(info);
+void partial2StaticVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethod(info);
}
-static void toJSONMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestInterface", "toJSON");
+static void toJSONMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestInterface", "toJSON");
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
- ScriptState* scriptState = ScriptState::forReceiverObject(info);
+ ScriptState* scriptState = ScriptState::forReceiverObject(info);
- ScriptValue result = impl->toJSONForBinding(scriptState, exceptionState);
- if (exceptionState.hadException()) {
- return;
- }
- v8SetReturnValue(info, result.v8Value());
+ ScriptValue result = impl->toJSONForBinding(scriptState, exceptionState);
+ if (exceptionState.hadException()) {
+ return;
+ }
+ v8SetReturnValue(info, result.v8Value());
}
-void toJSONMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::toJSONMethod(info);
+void toJSONMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::toJSONMethod(info);
}
-static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
- v8SetReturnValueString(info, impl->toString(), info.GetIsolate());
+ v8SetReturnValueString(info, impl->toString(), info.GetIsolate());
}
-void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementationV8Internal::toStringMethod(info);
+void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::toStringMethod(info);
}
-static void iteratorMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestInterface", "iterator");
+static void iteratorMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestInterface", "iterator");
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+ TestInterfaceImplementation* impl = V8TestInterface::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)
-{
- TestInterfaceImplementationV8Internal::iteratorMethod(info);
+void iteratorMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::iteratorMethod(info);
}
-static void namedPropertyGetter(const AtomicString& name, const v8::PropertyCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation* impl = V8TestInterface::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) {
+ TestInterfaceImplementation* impl = V8TestInterface::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>());
- TestInterfaceImplementationV8Internal::namedPropertyGetter(propertyName, info);
+ TestInterfaceImplementationV8Internal::namedPropertyGetter(propertyName, info);
}
-static void namedPropertySetter(const AtomicString& name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation* impl = V8TestInterface::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) {
+ TestInterfaceImplementation* impl = V8TestInterface::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>());
- TestInterfaceImplementationV8Internal::namedPropertySetter(propertyName, v8Value, info);
+ TestInterfaceImplementationV8Internal::namedPropertySetter(propertyName, v8Value, info);
}
-static void namedPropertyDeleter(const AtomicString& name, const v8::PropertyCallbackInfo<v8::Boolean>& info)
-{
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+static void namedPropertyDeleter(const AtomicString& name, const v8::PropertyCallbackInfo<v8::Boolean>& info) {
+ TestInterfaceImplementation* impl = V8TestInterface::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>());
- TestInterfaceImplementationV8Internal::namedPropertyDeleter(propertyName, info);
+ TestInterfaceImplementationV8Internal::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, "TestInterface", 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, "TestInterface", nameInUtf8.data());
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+ TestInterfaceImplementation* impl = V8TestInterface::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>());
- TestInterfaceImplementationV8Internal::namedPropertyQuery(propertyName, info);
+ TestInterfaceImplementationV8Internal::namedPropertyQuery(propertyName, info);
}
-static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& info)
-{
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::EnumerationContext, "TestInterface");
+static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& info) {
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::EnumerationContext, "TestInterface");
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+ TestInterfaceImplementation* impl = V8TestInterface::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)
-{
- TestInterfaceImplementationV8Internal::namedPropertyEnumerator(info);
+void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::Array>& info) {
+ TestInterfaceImplementationV8Internal::namedPropertyEnumerator(info);
}
-static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementation* impl = V8TestInterface::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)
-{
- TestInterfaceImplementationV8Internal::indexedPropertyGetter(index, info);
+void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::indexedPropertyGetter(index, info);
}
-static void indexedPropertySetter(uint32_t index, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation* impl = V8TestInterface::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) {
+ TestInterfaceImplementation* impl = V8TestInterface::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)
-{
- TestInterfaceImplementationV8Internal::indexedPropertySetter(index, v8Value, info);
+void indexedPropertySetterCallback(uint32_t index, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info) {
+ TestInterfaceImplementationV8Internal::indexedPropertySetter(index, v8Value, info);
}
-static void indexedPropertyDeleter(uint32_t index, const v8::PropertyCallbackInfo<v8::Boolean>& info)
-{
- TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+static void indexedPropertyDeleter(uint32_t index, const v8::PropertyCallbackInfo<v8::Boolean>& info) {
+ TestInterfaceImplementation* impl = V8TestInterface::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)
-{
- TestInterfaceImplementationV8Internal::indexedPropertyDeleter(index, info);
+void indexedPropertyDeleterCallback(uint32_t index, const v8::PropertyCallbackInfo<v8::Boolean>& info) {
+ TestInterfaceImplementationV8Internal::indexedPropertyDeleter(index, info);
}
} // namespace TestInterfaceImplementationV8Internal
-void V8TestInterface::visitDOMWrapper(v8::Isolate* isolate, ScriptWrappable* scriptWrappable, const v8::Persistent<v8::Object>& wrapper)
-{
- TestInterfaceImplementation* impl = scriptWrappable->toImpl<TestInterfaceImplementation>();
- TestInterfaceImplementation* referencedName = impl->referencedName();
- if (referencedName) {
- DOMWrapperWorld::setWrapperReferencesInAllWorlds(wrapper, referencedName, isolate);
- }
+void V8TestInterface::visitDOMWrapper(v8::Isolate* isolate, ScriptWrappable* scriptWrappable, const v8::Persistent<v8::Object>& wrapper) {
+ TestInterfaceImplementation* impl = scriptWrappable->toImpl<TestInterfaceImplementation>();
+ TestInterfaceImplementation* referencedName = impl->referencedName();
+ if (referencedName) {
+ DOMWrapperWorld::setWrapperReferencesInAllWorlds(wrapper, referencedName, isolate);
+ }
}
// Suppress warning: global constructors, because AttributeConfiguration is trivial
@@ -3008,469 +2687,442 @@ const V8DOMConfiguration::MethodConfiguration V8TestInterfaceMethods[] = {
{"toString", TestInterfaceImplementationV8Internal::toStringMethodCallback, 0, 0, static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype},
};
-void V8TestInterface::installV8TestInterfaceTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate)
-{
- // Initialize the interface object's template.
- V8DOMConfiguration::initializeDOMInterfaceTemplate(isolate, interfaceTemplate, V8TestInterface::wrapperTypeInfo.interfaceName, V8TestInterfaceEmpty::domTemplate(isolate, world), V8TestInterface::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 V8TestInterfaceConstants[] = {
- {"UNSIGNED_LONG", 0, 0, V8DOMConfiguration::ConstantTypeUnsignedLong},
- {"CONST_JAVASCRIPT", 1, 0, V8DOMConfiguration::ConstantTypeShort},
- {"IMPLEMENTS_CONSTANT_1", 1, 0, V8DOMConfiguration::ConstantTypeUnsignedShort},
- {"IMPLEMENTS_CONSTANT_2", 2, 0, V8DOMConfiguration::ConstantTypeUnsignedShort},
- {"PARTIAL2_UNSIGNED_SHORT", 0, 0, V8DOMConfiguration::ConstantTypeUnsignedShort},
- };
- V8DOMConfiguration::installConstants(isolate, interfaceTemplate, prototypeTemplate, V8TestInterfaceConstants, WTF_ARRAY_LENGTH(V8TestInterfaceConstants));
- if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) {
- const V8DOMConfiguration::ConstantConfiguration constantPartialUnsignedShortConfiguration = {"PARTIAL_UNSIGNED_SHORT", 0, 0, V8DOMConfiguration::ConstantTypeUnsignedShort};
- V8DOMConfiguration::installConstant(isolate, interfaceTemplate, prototypeTemplate, constantPartialUnsignedShortConfiguration);
- const V8DOMConfiguration::ConstantConfiguration constantPartialDoubleConfiguration = {"PARTIAL_DOUBLE", 0, 3.14, V8DOMConfiguration::ConstantTypeDouble};
- V8DOMConfiguration::installConstant(isolate, interfaceTemplate, prototypeTemplate, constantPartialDoubleConfiguration);
- }
- V8DOMConfiguration::installAttributes(isolate, world, instanceTemplate, prototypeTemplate, V8TestInterfaceAttributes, WTF_ARRAY_LENGTH(V8TestInterfaceAttributes));
- V8DOMConfiguration::installAccessors(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestInterfaceAccessors, WTF_ARRAY_LENGTH(V8TestInterfaceAccessors));
- V8DOMConfiguration::installMethods(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestInterfaceMethods, WTF_ARRAY_LENGTH(V8TestInterfaceMethods));
- }
-
- if (RuntimeEnabledFeatures::featureNameEnabled()) {
- const V8DOMConfiguration::AccessorConfiguration accessorconditionalReadOnlyLongAttributeConfiguration = \
- {"conditionalReadOnlyLongAttribute", TestInterfaceImplementationV8Internal::conditionalReadOnlyLongAttributeAttributeGetterCallback, 0, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder};
- V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessorconditionalReadOnlyLongAttributeConfiguration);
- const V8DOMConfiguration::AccessorConfiguration accessorstaticConditionalReadOnlyLongAttributeConfiguration = \
- {"staticConditionalReadOnlyLongAttribute", TestInterfaceImplementationV8Internal::staticConditionalReadOnlyLongAttributeAttributeGetterCallback, 0, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder};
- V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessorstaticConditionalReadOnlyLongAttributeConfiguration);
- const V8DOMConfiguration::AccessorConfiguration accessorconditionalLongAttributeConfiguration = \
- {"conditionalLongAttribute", TestInterfaceImplementationV8Internal::conditionalLongAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::conditionalLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder};
- V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessorconditionalLongAttributeConfiguration);
- }
-
- if (RuntimeEnabledFeatures::implements2FeatureNameEnabled()) {
- const V8DOMConfiguration::AccessorConfiguration accessorimplements2StaticStringAttributeConfiguration = \
- {"implements2StaticStringAttribute", TestInterfaceImplementationV8Internal::implements2StaticStringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::implements2StaticStringAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder};
- V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessorimplements2StaticStringAttributeConfiguration);
- const V8DOMConfiguration::AccessorConfiguration accessorimplements2StringAttributeConfiguration = \
- {"implements2StringAttribute", TestInterfaceImplementationV8Internal::implements2StringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::implements2StringAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder};
- V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessorimplements2StringAttributeConfiguration);
- }
-
- if (RuntimeEnabledFeatures::implementsFeatureNameEnabled()) {
- const V8DOMConfiguration::AccessorConfiguration accessorimplementsRuntimeEnabledNodeAttributeConfiguration = \
- {"implementsRuntimeEnabledNodeAttribute", TestInterfaceImplementationV8Internal::implementsRuntimeEnabledNodeAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::implementsRuntimeEnabledNodeAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder};
- V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessorimplementsRuntimeEnabledNodeAttributeConfiguration);
- }
-
- if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) {
- const V8DOMConfiguration::AccessorConfiguration accessorpartialPartialEnumTypeAttributeConfiguration = \
- {"partialPartialEnumTypeAttribute", TestInterfaceImplementationV8Internal::partialPartialEnumTypeAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partialPartialEnumTypeAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder};
- V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessorpartialPartialEnumTypeAttributeConfiguration);
- const V8DOMConfiguration::AccessorConfiguration accessorpartialCallWithExecutionContextLongAttributeConfiguration = \
- {"partialCallWithExecutionContextLongAttribute", TestInterfaceImplementationV8Internal::partialCallWithExecutionContextLongAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partialCallWithExecutionContextLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder};
- V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessorpartialCallWithExecutionContextLongAttributeConfiguration);
- const V8DOMConfiguration::AccessorConfiguration accessorpartialLongAttributeConfiguration = \
- {"partialLongAttribute", TestInterfaceImplementationV8Internal::partialLongAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partialLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder};
- V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessorpartialLongAttributeConfiguration);
- const V8DOMConfiguration::AccessorConfiguration accessorpartialStaticLongAttributeConfiguration = \
- {"partialStaticLongAttribute", TestInterfaceImplementationV8Internal::partialStaticLongAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partialStaticLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder};
- V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessorpartialStaticLongAttributeConfiguration);
- const V8DOMConfiguration::AccessorConfiguration accessorstringAttributeConfiguration = \
- {"stringAttribute", TestInterfaceImplementationV8Internal::stringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::stringAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder};
- V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessorstringAttributeConfiguration);
- }
-
- // Indexed properties
- v8::IndexedPropertyHandlerConfiguration indexedPropertyHandlerConfig(TestInterfaceImplementationV8Internal::indexedPropertyGetterCallback, TestInterfaceImplementationV8Internal::indexedPropertySetterCallback, 0, TestInterfaceImplementationV8Internal::indexedPropertyDeleterCallback, indexedPropertyEnumerator<TestInterfaceImplementation>, v8::Local<v8::Value>(), v8::PropertyHandlerFlags::kAllCanRead);
- instanceTemplate->SetHandler(indexedPropertyHandlerConfig);
- // Named properties
- v8::NamedPropertyHandlerConfiguration namedPropertyHandlerConfig(TestInterfaceImplementationV8Internal::namedPropertyGetterCallback, TestInterfaceImplementationV8Internal::namedPropertySetterCallback, TestInterfaceImplementationV8Internal::namedPropertyQueryCallback, TestInterfaceImplementationV8Internal::namedPropertyDeleterCallback, TestInterfaceImplementationV8Internal::namedPropertyEnumeratorCallback, v8::Local<v8::Value>(), static_cast<v8::PropertyHandlerFlags>(int(v8::PropertyHandlerFlags::kOnlyInterceptStrings) | int(v8::PropertyHandlerFlags::kAllCanRead) | int(v8::PropertyHandlerFlags::kNonMasking)));
- instanceTemplate->SetHandler(namedPropertyHandlerConfig);
-
- // Iterator (@@iterator)
- const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIteratorConfiguration = { v8::Symbol::GetIterator, TestInterfaceImplementationV8Internal::iteratorMethodCallback, 0, v8::DontEnum, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype };
- V8DOMConfiguration::installMethod(isolate, world, prototypeTemplate, signature, symbolKeyedIteratorConfiguration);
-
- instanceTemplate->SetCallAsFunctionHandler(V8TestInterface::legacyCallCustom);
-
- if (RuntimeEnabledFeatures::implements2FeatureNameEnabled()) {
- const V8DOMConfiguration::MethodConfiguration implements2VoidMethodMethodConfiguration = {"implements2VoidMethod", TestInterfaceImplementationV8Internal::implements2VoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
- V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, implements2VoidMethodMethodConfiguration);
- }
- if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) {
- const V8DOMConfiguration::MethodConfiguration partialVoidMethodMethodConfiguration = {"partialVoidMethod", TestInterfaceImplementationV8Internal::partialVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
- V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, partialVoidMethodMethodConfiguration);
- }
- if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) {
- const V8DOMConfiguration::MethodConfiguration partialStaticVoidMethodMethodConfiguration = {"partialStaticVoidMethod", TestInterfaceImplementationV8Internal::partialStaticVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface};
- V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, partialStaticVoidMethodMethodConfiguration);
- }
- if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) {
- const V8DOMConfiguration::MethodConfiguration partialVoidMethodLongArgMethodConfiguration = {"partialVoidMethodLongArg", TestInterfaceImplementationV8Internal::partialVoidMethodLongArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
- V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, partialVoidMethodLongArgMethodConfiguration);
- }
- if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) {
- const V8DOMConfiguration::MethodConfiguration partialCallWithExecutionContextRaisesExceptionVoidMethodMethodConfiguration = {"partialCallWithExecutionContextRaisesExceptionVoidMethod", TestInterfaceImplementationV8Internal::partialCallWithExecutionContextRaisesExceptionVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
- V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, partialCallWithExecutionContextRaisesExceptionVoidMethodMethodConfiguration);
- }
- if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) {
- const V8DOMConfiguration::MethodConfiguration partialVoidMethodPartialCallbackTypeArgMethodConfiguration = {"partialVoidMethodPartialCallbackTypeArg", TestInterfaceImplementationV8Internal::partialVoidMethodPartialCallbackTypeArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
- V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, partialVoidMethodPartialCallbackTypeArgMethodConfiguration);
- }
- if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) {
- const V8DOMConfiguration::MethodConfiguration shortMethodWithShortArgumentImplementedInPrivateScriptMethodConfiguration = {"shortMethodWithShortArgumentImplementedInPrivateScript", TestInterfaceImplementationV8Internal::shortMethodWithShortArgumentImplementedInPrivateScriptMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
- V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, shortMethodWithShortArgumentImplementedInPrivateScriptMethodConfiguration);
- }
-}
-
-v8::Local<v8::FunctionTemplate> V8TestInterface::domTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world)
-{
- return V8DOMConfiguration::domClassTemplate(isolate, world, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), V8TestInterface::installV8TestInterfaceTemplateFunction);
-}
-
-bool V8TestInterface::hasInstance(v8::Local<v8::Value> v8Value, v8::Isolate* isolate)
-{
- return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Value);
-}
-
-v8::Local<v8::Object> V8TestInterface::findInstanceInPrototypeChain(v8::Local<v8::Value> v8Value, v8::Isolate* isolate)
-{
- return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrapperTypeInfo, v8Value);
-}
-
-TestInterfaceImplementation* V8TestInterface::toImplWithTypeCheck(v8::Isolate* isolate, v8::Local<v8::Value> value)
-{
- return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(value)) : nullptr;
-}
-
-void V8TestInterface::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", TestInterfaceImplementationV8Internal::workerExposedAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::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", TestInterfaceImplementationV8Internal::windowExposedAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::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);
- }
- if (executionContext && (executionContext->isSecureContext())) {
- const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextAttribute", TestInterfaceImplementationV8Internal::secureContextAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::secureContextAttributeAttributeSetterCallback, 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->isSecureContext())) {
- if (RuntimeEnabledFeatures::secureFeatureEnabled()) {
- const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextRuntimeEnabledAttribute", TestInterfaceImplementationV8Internal::secureContextRuntimeEnabledAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::secureContextRuntimeEnabledAttributeAttributeSetterCallback, 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())) {
- if (executionContext && (executionContext->isSecureContext())) {
- const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextWindowExposedAttribute", TestInterfaceImplementationV8Internal::secureContextWindowExposedAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::secureContextWindowExposedAttributeAttributeSetterCallback, 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->isWorkerGlobalScope())) {
- if (executionContext && (executionContext->isSecureContext())) {
- const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextWorkerExposedAttribute", TestInterfaceImplementationV8Internal::secureContextWorkerExposedAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::secureContextWorkerExposedAttributeAttributeSetterCallback, 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())) {
- if (executionContext && (executionContext->isSecureContext())) {
- if (RuntimeEnabledFeatures::secureFeatureEnabled()) {
- const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextWindowExposedRuntimeEnabledAttribute", TestInterfaceImplementationV8Internal::secureContextWindowExposedRuntimeEnabledAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::secureContextWindowExposedRuntimeEnabledAttributeAttributeSetterCallback, 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->isWorkerGlobalScope())) {
- if (executionContext && (executionContext->isSecureContext())) {
- if (RuntimeEnabledFeatures::secureFeatureEnabled()) {
- const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextWorkerExposedRuntimeEnabledAttribute", TestInterfaceImplementationV8Internal::secureContextWorkerExposedRuntimeEnabledAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::secureContextWorkerExposedRuntimeEnabledAttributeAttributeSetterCallback, 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->isSecureContext())) {
- const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"partial2SecureContextAttribute", TestInterfaceImplementationV8Internal::partial2SecureContextAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partial2SecureContextAttributeAttributeSetterCallback, 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->isSecureContext())) {
- const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"partialSecureContextAttribute", TestInterfaceImplementationV8Internal::partialSecureContextAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partialSecureContextAttributeAttributeSetterCallback, 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->isSecureContext())) {
- if (RuntimeEnabledFeatures::secureFeatureEnabled()) {
- const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"partialSecureContextRuntimeEnabledAttribute", TestInterfaceImplementationV8Internal::partialSecureContextRuntimeEnabledAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partialSecureContextRuntimeEnabledAttributeAttributeSetterCallback, 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())) {
- if (executionContext && (executionContext->isSecureContext())) {
- const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"partialSecureContextWindowExposedAttribute", TestInterfaceImplementationV8Internal::partialSecureContextWindowExposedAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partialSecureContextWindowExposedAttributeAttributeSetterCallback, 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->isWorkerGlobalScope())) {
- if (executionContext && (executionContext->isSecureContext())) {
- const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"partialSecureContextWorkerExposedAttribute", TestInterfaceImplementationV8Internal::partialSecureContextWorkerExposedAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partialSecureContextWorkerExposedAttributeAttributeSetterCallback, 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())) {
- if (executionContext && (executionContext->isSecureContext())) {
- if (RuntimeEnabledFeatures::secureFeatureEnabled()) {
- const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"partialSecureContextWindowExposedRuntimeEnabledAttribute", TestInterfaceImplementationV8Internal::partialSecureContextWindowExposedRuntimeEnabledAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partialSecureContextWindowExposedRuntimeEnabledAttributeAttributeSetterCallback, 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->isWorkerGlobalScope())) {
- if (executionContext && (executionContext->isSecureContext())) {
- if (RuntimeEnabledFeatures::secureFeatureEnabled()) {
- const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"partialSecureContextWorkerExposedRuntimeEnabledAttribute", TestInterfaceImplementationV8Internal::partialSecureContextWorkerExposedRuntimeEnabledAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partialSecureContextWorkerExposedRuntimeEnabledAttributeAttributeSetterCallback, 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", TestInterfaceImplementationV8Internal::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", TestInterfaceImplementationV8Internal::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", TestInterfaceImplementationV8Internal::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", TestInterfaceImplementationV8Internal::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())) {
- if (RuntimeEnabledFeatures::featureNameEnabled()) {
- const V8DOMConfiguration::MethodConfiguration methodWithExposedAndRuntimeEnabledFlagMethodConfiguration = {"methodWithExposedAndRuntimeEnabledFlag", TestInterfaceImplementationV8Internal::methodWithExposedAndRuntimeEnabledFlagMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
- V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, methodWithExposedAndRuntimeEnabledFlagMethodConfiguration);
- }
- }
- if (executionContext && (executionContext->isDocument())) {
- const V8DOMConfiguration::MethodConfiguration overloadMethodWithExposedAndRuntimeEnabledFlagMethodConfiguration = {"overloadMethodWithExposedAndRuntimeEnabledFlag", TestInterfaceImplementationV8Internal::overloadMethodWithExposedAndRuntimeEnabledFlagMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
- V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, overloadMethodWithExposedAndRuntimeEnabledFlagMethodConfiguration);
- }
- if (executionContext && ((executionContext->isDocument() && RuntimeEnabledFeatures::featureNameEnabled()) || (executionContext->isWorkerGlobalScope() && RuntimeEnabledFeatures::featureName2Enabled()))) {
- const V8DOMConfiguration::MethodConfiguration methodWithExposedHavingRuntimeEnabldFlagMethodConfiguration = {"methodWithExposedHavingRuntimeEnabldFlag", TestInterfaceImplementationV8Internal::methodWithExposedHavingRuntimeEnabldFlagMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
- V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, methodWithExposedHavingRuntimeEnabldFlagMethodConfiguration);
- }
- if (executionContext && (executionContext->isDocument() || executionContext->isServiceWorkerGlobalScope())) {
- const V8DOMConfiguration::MethodConfiguration windowAndServiceWorkerExposedMethodMethodConfiguration = {"windowAndServiceWorkerExposedMethod", TestInterfaceImplementationV8Internal::windowAndServiceWorkerExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
- V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, windowAndServiceWorkerExposedMethodMethodConfiguration);
- }
- if (executionContext && (executionContext->isSecureContext())) {
- const V8DOMConfiguration::MethodConfiguration secureContextMethodMethodConfiguration = {"secureContextMethod", TestInterfaceImplementationV8Internal::secureContextMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
- V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, secureContextMethodMethodConfiguration);
- }
- if (executionContext && (executionContext->isSecureContext())) {
- if (RuntimeEnabledFeatures::secureFeatureEnabled()) {
- const V8DOMConfiguration::MethodConfiguration secureContextRuntimeEnabledMethodMethodConfiguration = {"secureContextRuntimeEnabledMethod", TestInterfaceImplementationV8Internal::secureContextRuntimeEnabledMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
- V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, secureContextRuntimeEnabledMethodMethodConfiguration);
- }
- }
- if (executionContext && (executionContext->isSecureContext())) {
- if (executionContext && (executionContext->isDocument())) {
- const V8DOMConfiguration::MethodConfiguration secureContextWindowExposedMethodMethodConfiguration = {"secureContextWindowExposedMethod", TestInterfaceImplementationV8Internal::secureContextWindowExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
- V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, secureContextWindowExposedMethodMethodConfiguration);
- }
- }
- if (executionContext && (executionContext->isSecureContext())) {
- if (executionContext && (executionContext->isWorkerGlobalScope())) {
- const V8DOMConfiguration::MethodConfiguration secureContextWorkerExposedMethodMethodConfiguration = {"secureContextWorkerExposedMethod", TestInterfaceImplementationV8Internal::secureContextWorkerExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
- V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, secureContextWorkerExposedMethodMethodConfiguration);
- }
- }
- if (executionContext && (executionContext->isSecureContext())) {
- if (executionContext && (executionContext->isDocument())) {
- if (RuntimeEnabledFeatures::secureFeatureEnabled()) {
- const V8DOMConfiguration::MethodConfiguration secureContextWindowExposedRuntimeEnabledMethodMethodConfiguration = {"secureContextWindowExposedRuntimeEnabledMethod", TestInterfaceImplementationV8Internal::secureContextWindowExposedRuntimeEnabledMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
- V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, secureContextWindowExposedRuntimeEnabledMethodMethodConfiguration);
- }
- }
- }
- if (executionContext && (executionContext->isSecureContext())) {
- if (executionContext && (executionContext->isWorkerGlobalScope())) {
- if (RuntimeEnabledFeatures::secureFeatureEnabled()) {
- const V8DOMConfiguration::MethodConfiguration secureContextWorkerExposedRuntimeEnabledMethodMethodConfiguration = {"secureContextWorkerExposedRuntimeEnabledMethod", TestInterfaceImplementationV8Internal::secureContextWorkerExposedRuntimeEnabledMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
- V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, secureContextWorkerExposedRuntimeEnabledMethodMethodConfiguration);
- }
- }
- }
- if (executionContext && (executionContext->isSecureContext())) {
- const V8DOMConfiguration::MethodConfiguration partial2SecureContextMethodMethodConfiguration = {"partial2SecureContextMethod", TestInterfaceImplementationV8Internal::partial2SecureContextMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
- V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, partial2SecureContextMethodMethodConfiguration);
- }
- if (executionContext && (executionContext->isSecureContext())) {
- const V8DOMConfiguration::MethodConfiguration partialSecureContextMethodMethodConfiguration = {"partialSecureContextMethod", TestInterfaceImplementationV8Internal::partialSecureContextMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
- V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, partialSecureContextMethodMethodConfiguration);
- }
- if (executionContext && (executionContext->isSecureContext())) {
- if (RuntimeEnabledFeatures::secureFeatureEnabled()) {
- const V8DOMConfiguration::MethodConfiguration partialSecureContextRuntimeEnabledMethodMethodConfiguration = {"partialSecureContextRuntimeEnabledMethod", TestInterfaceImplementationV8Internal::partialSecureContextRuntimeEnabledMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
- V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, partialSecureContextRuntimeEnabledMethodMethodConfiguration);
- }
- }
- if (executionContext && (executionContext->isSecureContext())) {
- if (executionContext && (executionContext->isDocument())) {
- const V8DOMConfiguration::MethodConfiguration partialSecureContextWindowExposedMethodMethodConfiguration = {"partialSecureContextWindowExposedMethod", TestInterfaceImplementationV8Internal::partialSecureContextWindowExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
- V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, partialSecureContextWindowExposedMethodMethodConfiguration);
- }
- }
- if (executionContext && (executionContext->isSecureContext())) {
- if (executionContext && (executionContext->isWorkerGlobalScope())) {
- const V8DOMConfiguration::MethodConfiguration partialSecureContextWorkerExposedMethodMethodConfiguration = {"partialSecureContextWorkerExposedMethod", TestInterfaceImplementationV8Internal::partialSecureContextWorkerExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
- V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, partialSecureContextWorkerExposedMethodMethodConfiguration);
- }
- }
- if (executionContext && (executionContext->isSecureContext())) {
- if (executionContext && (executionContext->isDocument())) {
- if (RuntimeEnabledFeatures::secureFeatureEnabled()) {
- const V8DOMConfiguration::MethodConfiguration partialSecureContextWindowExposedRuntimeEnabledMethodMethodConfiguration = {"partialSecureContextWindowExposedRuntimeEnabledMethod", TestInterfaceImplementationV8Internal::partialSecureContextWindowExposedRuntimeEnabledMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
- V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, partialSecureContextWindowExposedRuntimeEnabledMethodMethodConfiguration);
- }
- }
- }
- if (executionContext && (executionContext->isSecureContext())) {
- if (executionContext && (executionContext->isWorkerGlobalScope())) {
- if (RuntimeEnabledFeatures::secureFeatureEnabled()) {
- const V8DOMConfiguration::MethodConfiguration partialSecureContextWorkerExposedRuntimeEnabledMethodMethodConfiguration = {"partialSecureContextWorkerExposedRuntimeEnabledMethod", TestInterfaceImplementationV8Internal::partialSecureContextWorkerExposedRuntimeEnabledMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
- V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, partialSecureContextWorkerExposedRuntimeEnabledMethodMethodConfiguration);
- }
- }
- }
-}
-
-bool V8TestInterface::PrivateScript::shortMethodWithShortArgumentImplementedInPrivateScriptMethod(LocalFrame* frame, TestInterface* holderImpl, int value, int* result)
-{
- if (!frame)
- return false;
- v8::HandleScope handleScope(toIsolate(frame));
- ScriptForbiddenScope::AllowUserAgentScript script;
- ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::privateScriptIsolatedWorld());
- if (!scriptState)
- return false;
- ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame);
- if (!scriptStateInUserScript)
- return false;
-
- ScriptState::Scope scope(scriptState);
- v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Global(), scriptState->isolate());
- v8::Local<v8::Value> valueHandle = v8::Integer::New(scriptState->isolate(), value);
- v8::Local<v8::Value> argv[] = { valueHandle };
- ExceptionState exceptionState(scriptState->isolate(), ExceptionState::ExecutionContext, "TestInterfaceImplementation", "shortMethodWithShortArgumentImplementedInPrivateScript");
- v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptState, scriptStateInUserScript, "TestInterfaceImplementation", "shortMethodWithShortArgumentImplementedInPrivateScript", holder, 1, argv);
- if (v8Value.IsEmpty())
- return false;
- int cppValue = toInt16(scriptState->isolate(), v8Value, NormalConversion, exceptionState);
- if (exceptionState.hadException())
- return false;
- *result = cppValue;
- CHECK(!exceptionState.hadException());
- return true;
-}
-
-bool V8TestInterface::PrivateScript::stringAttributeAttributeGetter(LocalFrame* frame, TestInterfaceImplementation* holderImpl, String* result)
-{
- if (!frame)
- return false;
- v8::HandleScope handleScope(toIsolate(frame));
- ScriptForbiddenScope::AllowUserAgentScript script;
- ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::privateScriptIsolatedWorld());
- if (!scriptState)
- return false;
- ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame);
- if (!scriptStateInUserScript)
- return false;
-
- ScriptState::Scope scope(scriptState);
- v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Global(), scriptState->isolate());
- ExceptionState exceptionState(ExceptionState::GetterContext, "stringAttribute", "TestInterfaceImplementation", scriptState->context()->Global(), scriptState->isolate());
- v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(scriptState, scriptStateInUserScript, "TestInterfaceImplementation", "stringAttribute", holder);
- if (v8Value.IsEmpty())
- return false;
- V8StringResource<> cppValue = v8Value;
- if (!cppValue.prepare())
- return false;
- RELEASE_ASSERT(!exceptionState.hadException());
- *result = cppValue;
- return true;
-}
-
-bool V8TestInterface::PrivateScript::stringAttributeAttributeSetter(LocalFrame* frame, TestInterfaceImplementation* holderImpl, String cppValue)
-{
- if (!frame)
- return false;
- v8::HandleScope handleScope(toIsolate(frame));
- ScriptForbiddenScope::AllowUserAgentScript script;
- ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::privateScriptIsolatedWorld());
- if (!scriptState)
- return false;
- ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame);
- if (!scriptStateInUserScript)
- return false;
-
- ScriptState::Scope scope(scriptState);
- v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Global(), scriptState->isolate());
- ExceptionState exceptionState(ExceptionState::SetterContext, "stringAttribute", "TestInterfaceImplementation", scriptState->context()->Global(), scriptState->isolate());
- return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateInUserScript, "TestInterfaceImplementation", "stringAttribute", holder, v8String(scriptState->isolate(), cppValue));
+void V8TestInterface::installV8TestInterfaceTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
+ // Initialize the interface object's template.
+ V8DOMConfiguration::initializeDOMInterfaceTemplate(isolate, interfaceTemplate, V8TestInterface::wrapperTypeInfo.interfaceName, V8TestInterfaceEmpty::domTemplate(isolate, world), V8TestInterface::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 V8TestInterfaceConstants[] = {
+ {"UNSIGNED_LONG", 0, 0, V8DOMConfiguration::ConstantTypeUnsignedLong},
+ {"CONST_JAVASCRIPT", 1, 0, V8DOMConfiguration::ConstantTypeShort},
+ {"IMPLEMENTS_CONSTANT_1", 1, 0, V8DOMConfiguration::ConstantTypeUnsignedShort},
+ {"IMPLEMENTS_CONSTANT_2", 2, 0, V8DOMConfiguration::ConstantTypeUnsignedShort},
+ {"PARTIAL2_UNSIGNED_SHORT", 0, 0, V8DOMConfiguration::ConstantTypeUnsignedShort},
+ };
+ V8DOMConfiguration::installConstants(isolate, interfaceTemplate, prototypeTemplate, V8TestInterfaceConstants, WTF_ARRAY_LENGTH(V8TestInterfaceConstants));
+ if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) {
+ const V8DOMConfiguration::ConstantConfiguration constantPartialUnsignedShortConfiguration = {"PARTIAL_UNSIGNED_SHORT", 0, 0, V8DOMConfiguration::ConstantTypeUnsignedShort};
+ V8DOMConfiguration::installConstant(isolate, interfaceTemplate, prototypeTemplate, constantPartialUnsignedShortConfiguration);
+ const V8DOMConfiguration::ConstantConfiguration constantPartialDoubleConfiguration = {"PARTIAL_DOUBLE", 0, 3.14, V8DOMConfiguration::ConstantTypeDouble};
+ V8DOMConfiguration::installConstant(isolate, interfaceTemplate, prototypeTemplate, constantPartialDoubleConfiguration);
+ }
+ V8DOMConfiguration::installAttributes(isolate, world, instanceTemplate, prototypeTemplate, V8TestInterfaceAttributes, WTF_ARRAY_LENGTH(V8TestInterfaceAttributes));
+ V8DOMConfiguration::installAccessors(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestInterfaceAccessors, WTF_ARRAY_LENGTH(V8TestInterfaceAccessors));
+ V8DOMConfiguration::installMethods(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestInterfaceMethods, WTF_ARRAY_LENGTH(V8TestInterfaceMethods));
+ }
+
+ if (RuntimeEnabledFeatures::featureNameEnabled()) {
+ const V8DOMConfiguration::AccessorConfiguration accessorconditionalReadOnlyLongAttributeConfiguration = {"conditionalReadOnlyLongAttribute", TestInterfaceImplementationV8Internal::conditionalReadOnlyLongAttributeAttributeGetterCallback, 0, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder};
+ V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessorconditionalReadOnlyLongAttributeConfiguration);
+ const V8DOMConfiguration::AccessorConfiguration accessorstaticConditionalReadOnlyLongAttributeConfiguration = {"staticConditionalReadOnlyLongAttribute", TestInterfaceImplementationV8Internal::staticConditionalReadOnlyLongAttributeAttributeGetterCallback, 0, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder};
+ V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessorstaticConditionalReadOnlyLongAttributeConfiguration);
+ const V8DOMConfiguration::AccessorConfiguration accessorconditionalLongAttributeConfiguration = {"conditionalLongAttribute", TestInterfaceImplementationV8Internal::conditionalLongAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::conditionalLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder};
+ V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessorconditionalLongAttributeConfiguration);
+ }
+
+ if (RuntimeEnabledFeatures::implements2FeatureNameEnabled()) {
+ const V8DOMConfiguration::AccessorConfiguration accessorimplements2StaticStringAttributeConfiguration = {"implements2StaticStringAttribute", TestInterfaceImplementationV8Internal::implements2StaticStringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::implements2StaticStringAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder};
+ V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessorimplements2StaticStringAttributeConfiguration);
+ const V8DOMConfiguration::AccessorConfiguration accessorimplements2StringAttributeConfiguration = {"implements2StringAttribute", TestInterfaceImplementationV8Internal::implements2StringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::implements2StringAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder};
+ V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessorimplements2StringAttributeConfiguration);
+ }
+
+ if (RuntimeEnabledFeatures::implementsFeatureNameEnabled()) {
+ const V8DOMConfiguration::AccessorConfiguration accessorimplementsRuntimeEnabledNodeAttributeConfiguration = {"implementsRuntimeEnabledNodeAttribute", TestInterfaceImplementationV8Internal::implementsRuntimeEnabledNodeAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::implementsRuntimeEnabledNodeAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder};
+ V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessorimplementsRuntimeEnabledNodeAttributeConfiguration);
+ }
+
+ if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) {
+ const V8DOMConfiguration::AccessorConfiguration accessorpartialPartialEnumTypeAttributeConfiguration = {"partialPartialEnumTypeAttribute", TestInterfaceImplementationV8Internal::partialPartialEnumTypeAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partialPartialEnumTypeAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder};
+ V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessorpartialPartialEnumTypeAttributeConfiguration);
+ const V8DOMConfiguration::AccessorConfiguration accessorpartialCallWithExecutionContextLongAttributeConfiguration = {"partialCallWithExecutionContextLongAttribute", TestInterfaceImplementationV8Internal::partialCallWithExecutionContextLongAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partialCallWithExecutionContextLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder};
+ V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessorpartialCallWithExecutionContextLongAttributeConfiguration);
+ const V8DOMConfiguration::AccessorConfiguration accessorpartialLongAttributeConfiguration = {"partialLongAttribute", TestInterfaceImplementationV8Internal::partialLongAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partialLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder};
+ V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessorpartialLongAttributeConfiguration);
+ const V8DOMConfiguration::AccessorConfiguration accessorpartialStaticLongAttributeConfiguration = {"partialStaticLongAttribute", TestInterfaceImplementationV8Internal::partialStaticLongAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partialStaticLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder};
+ V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessorpartialStaticLongAttributeConfiguration);
+ const V8DOMConfiguration::AccessorConfiguration accessorstringAttributeConfiguration = {"stringAttribute", TestInterfaceImplementationV8Internal::stringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::stringAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder};
+ V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessorstringAttributeConfiguration);
+ }
+
+ // Indexed properties
+ v8::IndexedPropertyHandlerConfiguration indexedPropertyHandlerConfig(TestInterfaceImplementationV8Internal::indexedPropertyGetterCallback, TestInterfaceImplementationV8Internal::indexedPropertySetterCallback, 0, TestInterfaceImplementationV8Internal::indexedPropertyDeleterCallback, indexedPropertyEnumerator<TestInterfaceImplementation>, v8::Local<v8::Value>(), v8::PropertyHandlerFlags::kAllCanRead);
+ instanceTemplate->SetHandler(indexedPropertyHandlerConfig);
+ // Named properties
+ v8::NamedPropertyHandlerConfiguration namedPropertyHandlerConfig(TestInterfaceImplementationV8Internal::namedPropertyGetterCallback, TestInterfaceImplementationV8Internal::namedPropertySetterCallback, TestInterfaceImplementationV8Internal::namedPropertyQueryCallback, TestInterfaceImplementationV8Internal::namedPropertyDeleterCallback, TestInterfaceImplementationV8Internal::namedPropertyEnumeratorCallback, v8::Local<v8::Value>(), static_cast<v8::PropertyHandlerFlags>(int(v8::PropertyHandlerFlags::kOnlyInterceptStrings) | int(v8::PropertyHandlerFlags::kAllCanRead) | int(v8::PropertyHandlerFlags::kNonMasking)));
+ instanceTemplate->SetHandler(namedPropertyHandlerConfig);
+
+ // Iterator (@@iterator)
+ const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIteratorConfiguration = { v8::Symbol::GetIterator, TestInterfaceImplementationV8Internal::iteratorMethodCallback, 0, v8::DontEnum, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype };
+ V8DOMConfiguration::installMethod(isolate, world, prototypeTemplate, signature, symbolKeyedIteratorConfiguration);
+
+ instanceTemplate->SetCallAsFunctionHandler(V8TestInterface::legacyCallCustom);
+
+ if (RuntimeEnabledFeatures::implements2FeatureNameEnabled()) {
+ const V8DOMConfiguration::MethodConfiguration implements2VoidMethodMethodConfiguration = {"implements2VoidMethod", TestInterfaceImplementationV8Internal::implements2VoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
+ V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, implements2VoidMethodMethodConfiguration);
+ }
+ if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) {
+ const V8DOMConfiguration::MethodConfiguration partialVoidMethodMethodConfiguration = {"partialVoidMethod", TestInterfaceImplementationV8Internal::partialVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
+ V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, partialVoidMethodMethodConfiguration);
+ }
+ if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) {
+ const V8DOMConfiguration::MethodConfiguration partialStaticVoidMethodMethodConfiguration = {"partialStaticVoidMethod", TestInterfaceImplementationV8Internal::partialStaticVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface};
+ V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, partialStaticVoidMethodMethodConfiguration);
+ }
+ if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) {
+ const V8DOMConfiguration::MethodConfiguration partialVoidMethodLongArgMethodConfiguration = {"partialVoidMethodLongArg", TestInterfaceImplementationV8Internal::partialVoidMethodLongArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
+ V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, partialVoidMethodLongArgMethodConfiguration);
+ }
+ if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) {
+ const V8DOMConfiguration::MethodConfiguration partialCallWithExecutionContextRaisesExceptionVoidMethodMethodConfiguration = {"partialCallWithExecutionContextRaisesExceptionVoidMethod", TestInterfaceImplementationV8Internal::partialCallWithExecutionContextRaisesExceptionVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
+ V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, partialCallWithExecutionContextRaisesExceptionVoidMethodMethodConfiguration);
+ }
+ if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) {
+ const V8DOMConfiguration::MethodConfiguration partialVoidMethodPartialCallbackTypeArgMethodConfiguration = {"partialVoidMethodPartialCallbackTypeArg", TestInterfaceImplementationV8Internal::partialVoidMethodPartialCallbackTypeArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
+ V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, partialVoidMethodPartialCallbackTypeArgMethodConfiguration);
+ }
+ if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) {
+ const V8DOMConfiguration::MethodConfiguration shortMethodWithShortArgumentImplementedInPrivateScriptMethodConfiguration = {"shortMethodWithShortArgumentImplementedInPrivateScript", TestInterfaceImplementationV8Internal::shortMethodWithShortArgumentImplementedInPrivateScriptMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
+ V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, shortMethodWithShortArgumentImplementedInPrivateScriptMethodConfiguration);
+ }
+}
+
+v8::Local<v8::FunctionTemplate> V8TestInterface::domTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world) {
+ return V8DOMConfiguration::domClassTemplate(isolate, world, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), V8TestInterface::installV8TestInterfaceTemplateFunction);
+}
+
+bool V8TestInterface::hasInstance(v8::Local<v8::Value> v8Value, v8::Isolate* isolate) {
+ return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Value);
+}
+
+v8::Local<v8::Object> V8TestInterface::findInstanceInPrototypeChain(v8::Local<v8::Value> v8Value, v8::Isolate* isolate) {
+ return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrapperTypeInfo, v8Value);
+}
+
+TestInterfaceImplementation* V8TestInterface::toImplWithTypeCheck(v8::Isolate* isolate, v8::Local<v8::Value> value) {
+ return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(value)) : nullptr;
+}
+
+void V8TestInterface::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", TestInterfaceImplementationV8Internal::workerExposedAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::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", TestInterfaceImplementationV8Internal::windowExposedAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::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);
+ }
+ if (executionContext && (executionContext->isSecureContext())) {
+ const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextAttribute", TestInterfaceImplementationV8Internal::secureContextAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::secureContextAttributeAttributeSetterCallback, 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->isSecureContext())) {
+ if (RuntimeEnabledFeatures::secureFeatureEnabled()) {
+ const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextRuntimeEnabledAttribute", TestInterfaceImplementationV8Internal::secureContextRuntimeEnabledAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::secureContextRuntimeEnabledAttributeAttributeSetterCallback, 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())) {
+ if (executionContext && (executionContext->isSecureContext())) {
+ const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextWindowExposedAttribute", TestInterfaceImplementationV8Internal::secureContextWindowExposedAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::secureContextWindowExposedAttributeAttributeSetterCallback, 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->isWorkerGlobalScope())) {
+ if (executionContext && (executionContext->isSecureContext())) {
+ const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextWorkerExposedAttribute", TestInterfaceImplementationV8Internal::secureContextWorkerExposedAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::secureContextWorkerExposedAttributeAttributeSetterCallback, 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())) {
+ if (executionContext && (executionContext->isSecureContext())) {
+ if (RuntimeEnabledFeatures::secureFeatureEnabled()) {
+ const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextWindowExposedRuntimeEnabledAttribute", TestInterfaceImplementationV8Internal::secureContextWindowExposedRuntimeEnabledAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::secureContextWindowExposedRuntimeEnabledAttributeAttributeSetterCallback, 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->isWorkerGlobalScope())) {
+ if (executionContext && (executionContext->isSecureContext())) {
+ if (RuntimeEnabledFeatures::secureFeatureEnabled()) {
+ const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextWorkerExposedRuntimeEnabledAttribute", TestInterfaceImplementationV8Internal::secureContextWorkerExposedRuntimeEnabledAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::secureContextWorkerExposedRuntimeEnabledAttributeAttributeSetterCallback, 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->isSecureContext())) {
+ const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"partial2SecureContextAttribute", TestInterfaceImplementationV8Internal::partial2SecureContextAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partial2SecureContextAttributeAttributeSetterCallback, 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->isSecureContext())) {
+ const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"partialSecureContextAttribute", TestInterfaceImplementationV8Internal::partialSecureContextAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partialSecureContextAttributeAttributeSetterCallback, 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->isSecureContext())) {
+ if (RuntimeEnabledFeatures::secureFeatureEnabled()) {
+ const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"partialSecureContextRuntimeEnabledAttribute", TestInterfaceImplementationV8Internal::partialSecureContextRuntimeEnabledAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partialSecureContextRuntimeEnabledAttributeAttributeSetterCallback, 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())) {
+ if (executionContext && (executionContext->isSecureContext())) {
+ const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"partialSecureContextWindowExposedAttribute", TestInterfaceImplementationV8Internal::partialSecureContextWindowExposedAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partialSecureContextWindowExposedAttributeAttributeSetterCallback, 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->isWorkerGlobalScope())) {
+ if (executionContext && (executionContext->isSecureContext())) {
+ const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"partialSecureContextWorkerExposedAttribute", TestInterfaceImplementationV8Internal::partialSecureContextWorkerExposedAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partialSecureContextWorkerExposedAttributeAttributeSetterCallback, 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())) {
+ if (executionContext && (executionContext->isSecureContext())) {
+ if (RuntimeEnabledFeatures::secureFeatureEnabled()) {
+ const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"partialSecureContextWindowExposedRuntimeEnabledAttribute", TestInterfaceImplementationV8Internal::partialSecureContextWindowExposedRuntimeEnabledAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partialSecureContextWindowExposedRuntimeEnabledAttributeAttributeSetterCallback, 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->isWorkerGlobalScope())) {
+ if (executionContext && (executionContext->isSecureContext())) {
+ if (RuntimeEnabledFeatures::secureFeatureEnabled()) {
+ const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"partialSecureContextWorkerExposedRuntimeEnabledAttribute", TestInterfaceImplementationV8Internal::partialSecureContextWorkerExposedRuntimeEnabledAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partialSecureContextWorkerExposedRuntimeEnabledAttributeAttributeSetterCallback, 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", TestInterfaceImplementationV8Internal::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", TestInterfaceImplementationV8Internal::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", TestInterfaceImplementationV8Internal::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", TestInterfaceImplementationV8Internal::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())) {
+ if (RuntimeEnabledFeatures::featureNameEnabled()) {
+ const V8DOMConfiguration::MethodConfiguration methodWithExposedAndRuntimeEnabledFlagMethodConfiguration = {"methodWithExposedAndRuntimeEnabledFlag", TestInterfaceImplementationV8Internal::methodWithExposedAndRuntimeEnabledFlagMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
+ V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, methodWithExposedAndRuntimeEnabledFlagMethodConfiguration);
+ }
+ }
+ if (executionContext && (executionContext->isDocument())) {
+ const V8DOMConfiguration::MethodConfiguration overloadMethodWithExposedAndRuntimeEnabledFlagMethodConfiguration = {"overloadMethodWithExposedAndRuntimeEnabledFlag", TestInterfaceImplementationV8Internal::overloadMethodWithExposedAndRuntimeEnabledFlagMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
+ V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, overloadMethodWithExposedAndRuntimeEnabledFlagMethodConfiguration);
+ }
+ if (executionContext && ((executionContext->isDocument() && RuntimeEnabledFeatures::featureNameEnabled()) || (executionContext->isWorkerGlobalScope() && RuntimeEnabledFeatures::featureName2Enabled()))) {
+ const V8DOMConfiguration::MethodConfiguration methodWithExposedHavingRuntimeEnabldFlagMethodConfiguration = {"methodWithExposedHavingRuntimeEnabldFlag", TestInterfaceImplementationV8Internal::methodWithExposedHavingRuntimeEnabldFlagMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
+ V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, methodWithExposedHavingRuntimeEnabldFlagMethodConfiguration);
+ }
+ if (executionContext && (executionContext->isDocument() || executionContext->isServiceWorkerGlobalScope())) {
+ const V8DOMConfiguration::MethodConfiguration windowAndServiceWorkerExposedMethodMethodConfiguration = {"windowAndServiceWorkerExposedMethod", TestInterfaceImplementationV8Internal::windowAndServiceWorkerExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
+ V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, windowAndServiceWorkerExposedMethodMethodConfiguration);
+ }
+ if (executionContext && (executionContext->isSecureContext())) {
+ const V8DOMConfiguration::MethodConfiguration secureContextMethodMethodConfiguration = {"secureContextMethod", TestInterfaceImplementationV8Internal::secureContextMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
+ V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, secureContextMethodMethodConfiguration);
+ }
+ if (executionContext && (executionContext->isSecureContext())) {
+ if (RuntimeEnabledFeatures::secureFeatureEnabled()) {
+ const V8DOMConfiguration::MethodConfiguration secureContextRuntimeEnabledMethodMethodConfiguration = {"secureContextRuntimeEnabledMethod", TestInterfaceImplementationV8Internal::secureContextRuntimeEnabledMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
+ V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, secureContextRuntimeEnabledMethodMethodConfiguration);
+ }
+ }
+ if (executionContext && (executionContext->isSecureContext())) {
+ if (executionContext && (executionContext->isDocument())) {
+ const V8DOMConfiguration::MethodConfiguration secureContextWindowExposedMethodMethodConfiguration = {"secureContextWindowExposedMethod", TestInterfaceImplementationV8Internal::secureContextWindowExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
+ V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, secureContextWindowExposedMethodMethodConfiguration);
+ }
+ }
+ if (executionContext && (executionContext->isSecureContext())) {
+ if (executionContext && (executionContext->isWorkerGlobalScope())) {
+ const V8DOMConfiguration::MethodConfiguration secureContextWorkerExposedMethodMethodConfiguration = {"secureContextWorkerExposedMethod", TestInterfaceImplementationV8Internal::secureContextWorkerExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
+ V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, secureContextWorkerExposedMethodMethodConfiguration);
+ }
+ }
+ if (executionContext && (executionContext->isSecureContext())) {
+ if (executionContext && (executionContext->isDocument())) {
+ if (RuntimeEnabledFeatures::secureFeatureEnabled()) {
+ const V8DOMConfiguration::MethodConfiguration secureContextWindowExposedRuntimeEnabledMethodMethodConfiguration = {"secureContextWindowExposedRuntimeEnabledMethod", TestInterfaceImplementationV8Internal::secureContextWindowExposedRuntimeEnabledMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
+ V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, secureContextWindowExposedRuntimeEnabledMethodMethodConfiguration);
+ }
+ }
+ }
+ if (executionContext && (executionContext->isSecureContext())) {
+ if (executionContext && (executionContext->isWorkerGlobalScope())) {
+ if (RuntimeEnabledFeatures::secureFeatureEnabled()) {
+ const V8DOMConfiguration::MethodConfiguration secureContextWorkerExposedRuntimeEnabledMethodMethodConfiguration = {"secureContextWorkerExposedRuntimeEnabledMethod", TestInterfaceImplementationV8Internal::secureContextWorkerExposedRuntimeEnabledMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
+ V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, secureContextWorkerExposedRuntimeEnabledMethodMethodConfiguration);
+ }
+ }
+ }
+ if (executionContext && (executionContext->isSecureContext())) {
+ const V8DOMConfiguration::MethodConfiguration partial2SecureContextMethodMethodConfiguration = {"partial2SecureContextMethod", TestInterfaceImplementationV8Internal::partial2SecureContextMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
+ V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, partial2SecureContextMethodMethodConfiguration);
+ }
+ if (executionContext && (executionContext->isSecureContext())) {
+ const V8DOMConfiguration::MethodConfiguration partialSecureContextMethodMethodConfiguration = {"partialSecureContextMethod", TestInterfaceImplementationV8Internal::partialSecureContextMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
+ V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, partialSecureContextMethodMethodConfiguration);
+ }
+ if (executionContext && (executionContext->isSecureContext())) {
+ if (RuntimeEnabledFeatures::secureFeatureEnabled()) {
+ const V8DOMConfiguration::MethodConfiguration partialSecureContextRuntimeEnabledMethodMethodConfiguration = {"partialSecureContextRuntimeEnabledMethod", TestInterfaceImplementationV8Internal::partialSecureContextRuntimeEnabledMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
+ V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, partialSecureContextRuntimeEnabledMethodMethodConfiguration);
+ }
+ }
+ if (executionContext && (executionContext->isSecureContext())) {
+ if (executionContext && (executionContext->isDocument())) {
+ const V8DOMConfiguration::MethodConfiguration partialSecureContextWindowExposedMethodMethodConfiguration = {"partialSecureContextWindowExposedMethod", TestInterfaceImplementationV8Internal::partialSecureContextWindowExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
+ V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, partialSecureContextWindowExposedMethodMethodConfiguration);
+ }
+ }
+ if (executionContext && (executionContext->isSecureContext())) {
+ if (executionContext && (executionContext->isWorkerGlobalScope())) {
+ const V8DOMConfiguration::MethodConfiguration partialSecureContextWorkerExposedMethodMethodConfiguration = {"partialSecureContextWorkerExposedMethod", TestInterfaceImplementationV8Internal::partialSecureContextWorkerExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
+ V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, partialSecureContextWorkerExposedMethodMethodConfiguration);
+ }
+ }
+ if (executionContext && (executionContext->isSecureContext())) {
+ if (executionContext && (executionContext->isDocument())) {
+ if (RuntimeEnabledFeatures::secureFeatureEnabled()) {
+ const V8DOMConfiguration::MethodConfiguration partialSecureContextWindowExposedRuntimeEnabledMethodMethodConfiguration = {"partialSecureContextWindowExposedRuntimeEnabledMethod", TestInterfaceImplementationV8Internal::partialSecureContextWindowExposedRuntimeEnabledMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
+ V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, partialSecureContextWindowExposedRuntimeEnabledMethodMethodConfiguration);
+ }
+ }
+ }
+ if (executionContext && (executionContext->isSecureContext())) {
+ if (executionContext && (executionContext->isWorkerGlobalScope())) {
+ if (RuntimeEnabledFeatures::secureFeatureEnabled()) {
+ const V8DOMConfiguration::MethodConfiguration partialSecureContextWorkerExposedRuntimeEnabledMethodMethodConfiguration = {"partialSecureContextWorkerExposedRuntimeEnabledMethod", TestInterfaceImplementationV8Internal::partialSecureContextWorkerExposedRuntimeEnabledMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
+ V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, partialSecureContextWorkerExposedRuntimeEnabledMethodMethodConfiguration);
+ }
+ }
+ }
+}
+
+bool V8TestInterface::PrivateScript::shortMethodWithShortArgumentImplementedInPrivateScriptMethod(LocalFrame* frame, TestInterface* holderImpl, int value, int* result) {
+ if (!frame)
+ return false;
+ v8::HandleScope handleScope(toIsolate(frame));
+ ScriptForbiddenScope::AllowUserAgentScript script;
+ ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::privateScriptIsolatedWorld());
+ if (!scriptState)
+ return false;
+ ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame);
+ if (!scriptStateInUserScript)
+ return false;
+
+ ScriptState::Scope scope(scriptState);
+ v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Global(), scriptState->isolate());
+ v8::Local<v8::Value> valueHandle = v8::Integer::New(scriptState->isolate(), value);
+ v8::Local<v8::Value> argv[] = { valueHandle };
+ ExceptionState exceptionState(scriptState->isolate(), ExceptionState::ExecutionContext, "TestInterfaceImplementation", "shortMethodWithShortArgumentImplementedInPrivateScript");
+ v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptState, scriptStateInUserScript, "TestInterfaceImplementation", "shortMethodWithShortArgumentImplementedInPrivateScript", holder, 1, argv);
+ if (v8Value.IsEmpty())
+ return false;
+ int cppValue = toInt16(scriptState->isolate(), v8Value, NormalConversion, exceptionState);
+ if (exceptionState.hadException())
+ return false;
+ *result = cppValue;
+ CHECK(!exceptionState.hadException());
+ return true;
+}
+
+bool V8TestInterface::PrivateScript::stringAttributeAttributeGetter(LocalFrame* frame, TestInterfaceImplementation* holderImpl, String* result) {
+ if (!frame)
+ return false;
+ v8::HandleScope handleScope(toIsolate(frame));
+ ScriptForbiddenScope::AllowUserAgentScript script;
+ ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::privateScriptIsolatedWorld());
+ if (!scriptState)
+ return false;
+ ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame);
+ if (!scriptStateInUserScript)
+ return false;
+
+ ScriptState::Scope scope(scriptState);
+ v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Global(), scriptState->isolate());
+ ExceptionState exceptionState(ExceptionState::GetterContext, "stringAttribute", "TestInterfaceImplementation", scriptState->context()->Global(), scriptState->isolate());
+ v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(scriptState, scriptStateInUserScript, "TestInterfaceImplementation", "stringAttribute", holder);
+ if (v8Value.IsEmpty())
+ return false;
+ V8StringResource<> cppValue = v8Value;
+ if (!cppValue.prepare())
+ return false;
+ CHECK(!exceptionState.hadException());
+ *result = cppValue;
+ return true;
+}
+
+bool V8TestInterface::PrivateScript::stringAttributeAttributeSetter(LocalFrame* frame, TestInterfaceImplementation* holderImpl, String cppValue) {
+ if (!frame)
+ return false;
+ v8::HandleScope handleScope(toIsolate(frame));
+ ScriptForbiddenScope::AllowUserAgentScript script;
+ ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::privateScriptIsolatedWorld());
+ if (!scriptState)
+ return false;
+ ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame);
+ if (!scriptStateInUserScript)
+ return false;
+
+ ScriptState::Scope scope(scriptState);
+ v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Global(), scriptState->isolate());
+ ExceptionState exceptionState(ExceptionState::SetterContext, "stringAttribute", "TestInterfaceImplementation", scriptState->context()->Global(), scriptState->isolate());
+ return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateInUserScript, "TestInterfaceImplementation", "stringAttribute", holder, v8String(scriptState->isolate(), cppValue));
}
InstallTemplateFunction V8TestInterface::installV8TestInterfaceTemplateFunction = (InstallTemplateFunction)&V8TestInterface::installV8TestInterfaceTemplate;
-void V8TestInterface::updateWrapperTypeInfo(InstallTemplateFunction installTemplateFunction, PreparePrototypeAndInterfaceObjectFunction preparePrototypeAndInterfaceObjectFunction)
-{
- V8TestInterface::installV8TestInterfaceTemplateFunction = installTemplateFunction;
- if (preparePrototypeAndInterfaceObjectFunction)
- V8TestInterface::wrapperTypeInfo.preparePrototypeAndInterfaceObjectFunction = preparePrototypeAndInterfaceObjectFunction;
+void V8TestInterface::updateWrapperTypeInfo(InstallTemplateFunction installTemplateFunction, PreparePrototypeAndInterfaceObjectFunction preparePrototypeAndInterfaceObjectFunction) {
+ V8TestInterface::installV8TestInterfaceTemplateFunction = installTemplateFunction;
+ if (preparePrototypeAndInterfaceObjectFunction)
+ V8TestInterface::wrapperTypeInfo.preparePrototypeAndInterfaceObjectFunction = preparePrototypeAndInterfaceObjectFunction;
}
-void V8TestInterface::registerVoidMethodPartialOverloadMethodForPartialInterface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&))
-{
- TestInterfaceImplementationV8Internal::voidMethodPartialOverloadMethodForPartialInterface = method;
+void V8TestInterface::registerVoidMethodPartialOverloadMethodForPartialInterface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) {
+ TestInterfaceImplementationV8Internal::voidMethodPartialOverloadMethodForPartialInterface = method;
}
-void V8TestInterface::registerStaticVoidMethodPartialOverloadMethodForPartialInterface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&))
-{
- TestInterfaceImplementationV8Internal::staticVoidMethodPartialOverloadMethodForPartialInterface = method;
+void V8TestInterface::registerStaticVoidMethodPartialOverloadMethodForPartialInterface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) {
+ TestInterfaceImplementationV8Internal::staticVoidMethodPartialOverloadMethodForPartialInterface = method;
}
-void V8TestInterface::registerPromiseMethodPartialOverloadMethodForPartialInterface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&))
-{
- TestInterfaceImplementationV8Internal::promiseMethodPartialOverloadMethodForPartialInterface = method;
+void V8TestInterface::registerPromiseMethodPartialOverloadMethodForPartialInterface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) {
+ TestInterfaceImplementationV8Internal::promiseMethodPartialOverloadMethodForPartialInterface = method;
}
-void V8TestInterface::registerStaticPromiseMethodPartialOverloadMethodForPartialInterface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&))
-{
- TestInterfaceImplementationV8Internal::staticPromiseMethodPartialOverloadMethodForPartialInterface = method;
+void V8TestInterface::registerStaticPromiseMethodPartialOverloadMethodForPartialInterface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) {
+ TestInterfaceImplementationV8Internal::staticPromiseMethodPartialOverloadMethodForPartialInterface = method;
}
-void V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&))
-{
- TestInterfaceImplementationV8Internal::partial2VoidMethodMethodForPartialInterface = method;
+void V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) {
+ TestInterfaceImplementationV8Internal::partial2VoidMethodMethodForPartialInterface = method;
}
-void V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&))
-{
- TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethodForPartialInterface = method;
+void V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) {
+ TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethodForPartialInterface = method;
}
-} // namespace blink
+} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698