| Index: third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface3.cpp
|
| diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface3.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface3.cpp
|
| index f917f5accf4d8caf1c2f6427f3f5aa0e48b93ffa..6cb4164f4e106e295f75c6d78496bf409783349e 100644
|
| --- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface3.cpp
|
| +++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface3.cpp
|
| @@ -220,67 +220,58 @@ void iteratorMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| TestInterface3V8Internal::iteratorMethod(info);
|
| }
|
|
|
| -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>());
|
|
|
| - V8TestInterface3::namedPropertyGetterCustom(propertyName, info);
|
| + V8TestInterface3::namedPropertyGetterCustom(propertyName, info);
|
| }
|
|
|
| -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>());
|
|
|
| - V8TestInterface3::namedPropertySetterCustom(propertyName, v8Value, info);
|
| + V8TestInterface3::namedPropertySetterCustom(propertyName, v8Value, info);
|
| }
|
|
|
| -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>());
|
|
|
| - V8TestInterface3::namedPropertyDeleterCustom(propertyName, info);
|
| + V8TestInterface3::namedPropertyDeleterCustom(propertyName, info);
|
| }
|
|
|
| -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>());
|
|
|
| - V8TestInterface3::namedPropertyQueryCustom(propertyName, info);
|
| + V8TestInterface3::namedPropertyQueryCustom(propertyName, info);
|
| }
|
|
|
| -void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::Array>& info)
|
| -{
|
| - V8TestInterface3::namedPropertyEnumeratorCustom(info);
|
| +void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::Array>& info) {
|
| + V8TestInterface3::namedPropertyEnumeratorCustom(info);
|
| }
|
|
|
| -void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCallbackInfo<v8::Value>& info)
|
| -{
|
| - V8TestInterface3::indexedPropertyGetterCustom(index, info);
|
| +void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCallbackInfo<v8::Value>& info) {
|
| + V8TestInterface3::indexedPropertyGetterCustom(index, info);
|
| }
|
|
|
| -void indexedPropertySetterCallback(uint32_t index, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info)
|
| -{
|
| - V8TestInterface3::indexedPropertySetterCustom(index, v8Value, info);
|
| +void indexedPropertySetterCallback(uint32_t index, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info) {
|
| + V8TestInterface3::indexedPropertySetterCustom(index, v8Value, info);
|
| }
|
|
|
| -void indexedPropertyDeleterCallback(uint32_t index, const v8::PropertyCallbackInfo<v8::Boolean>& info)
|
| -{
|
| - V8TestInterface3::indexedPropertyDeleterCustom(index, info);
|
| +void indexedPropertyDeleterCallback(uint32_t index, const v8::PropertyCallbackInfo<v8::Boolean>& info) {
|
| + V8TestInterface3::indexedPropertyDeleterCustom(index, info);
|
| }
|
|
|
| } // namespace TestInterface3V8Internal
|
|
|
| -void V8TestInterface3::visitDOMWrapper(v8::Isolate* isolate, ScriptWrappable* scriptWrappable, const v8::Persistent<v8::Object>& wrapper)
|
| -{
|
| - V8TestInterface3::visitDOMWrapperCustom(isolate, scriptWrappable, wrapper);
|
| +void V8TestInterface3::visitDOMWrapper(v8::Isolate* isolate, ScriptWrappable* scriptWrappable, const v8::Persistent<v8::Object>& wrapper) {
|
| + V8TestInterface3::visitDOMWrapperCustom(isolate, scriptWrappable, wrapper);
|
| }
|
|
|
| const V8DOMConfiguration::AccessorConfiguration V8TestInterface3Accessors[] = {
|
| @@ -292,69 +283,64 @@ const V8DOMConfiguration::MethodConfiguration V8TestInterface3Methods[] = {
|
| {"toString", TestInterface3V8Internal::toStringMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype},
|
| };
|
|
|
| -static void installV8TestInterface3Template(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate)
|
| -{
|
| - // Initialize the interface object's template.
|
| - V8DOMConfiguration::initializeDOMInterfaceTemplate(isolate, interfaceTemplate, V8TestInterface3::wrapperTypeInfo.interfaceName, v8::Local<v8::FunctionTemplate>(), V8TestInterface3::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.
|
| - V8DOMConfiguration::installAccessors(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestInterface3Accessors, WTF_ARRAY_LENGTH(V8TestInterface3Accessors));
|
| - V8DOMConfiguration::installMethods(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestInterface3Methods, WTF_ARRAY_LENGTH(V8TestInterface3Methods));
|
| -
|
| - // Indexed properties
|
| - v8::IndexedPropertyHandlerConfiguration indexedPropertyHandlerConfig(TestInterface3V8Internal::indexedPropertyGetterCallback, TestInterface3V8Internal::indexedPropertySetterCallback, 0, TestInterface3V8Internal::indexedPropertyDeleterCallback, indexedPropertyEnumerator<TestInterface3>, v8::Local<v8::Value>(), v8::PropertyHandlerFlags::kNone);
|
| - instanceTemplate->SetHandler(indexedPropertyHandlerConfig);
|
| - // Named properties
|
| - v8::NamedPropertyHandlerConfiguration namedPropertyHandlerConfig(TestInterface3V8Internal::namedPropertyGetterCallback, TestInterface3V8Internal::namedPropertySetterCallback, TestInterface3V8Internal::namedPropertyQueryCallback, TestInterface3V8Internal::namedPropertyDeleterCallback, TestInterface3V8Internal::namedPropertyEnumeratorCallback, v8::Local<v8::Value>(), static_cast<v8::PropertyHandlerFlags>(int(v8::PropertyHandlerFlags::kOnlyInterceptStrings) | int(v8::PropertyHandlerFlags::kNonMasking)));
|
| - instanceTemplate->SetHandler(namedPropertyHandlerConfig);
|
| -
|
| - if (RuntimeEnabledFeatures::featureNameEnabled()) {
|
| - // Iterator (@@iterator)
|
| - const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIteratorConfiguration = { v8::Symbol::GetIterator, TestInterface3V8Internal::iteratorMethodCallback, 0, v8::DontEnum, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype };
|
| - V8DOMConfiguration::installMethod(isolate, world, prototypeTemplate, signature, symbolKeyedIteratorConfiguration);
|
| - }
|
| -
|
| - if (RuntimeEnabledFeatures::featureNameEnabled()) {
|
| - const V8DOMConfiguration::MethodConfiguration keysMethodConfiguration = {"keys", TestInterface3V8Internal::keysMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
|
| - V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, keysMethodConfiguration);
|
| - }
|
| - if (RuntimeEnabledFeatures::featureNameEnabled()) {
|
| - const V8DOMConfiguration::MethodConfiguration valuesMethodConfiguration = {"values", TestInterface3V8Internal::valuesMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
|
| - V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, valuesMethodConfiguration);
|
| - }
|
| - if (RuntimeEnabledFeatures::featureNameEnabled()) {
|
| - const V8DOMConfiguration::MethodConfiguration entriesMethodConfiguration = {"entries", TestInterface3V8Internal::entriesMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
|
| - V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, entriesMethodConfiguration);
|
| - }
|
| - if (RuntimeEnabledFeatures::featureNameEnabled()) {
|
| - const V8DOMConfiguration::MethodConfiguration forEachMethodConfiguration = {"forEach", TestInterface3V8Internal::forEachMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
|
| - V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, forEachMethodConfiguration);
|
| - }
|
| +static void installV8TestInterface3Template(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
|
| + // Initialize the interface object's template.
|
| + V8DOMConfiguration::initializeDOMInterfaceTemplate(isolate, interfaceTemplate, V8TestInterface3::wrapperTypeInfo.interfaceName, v8::Local<v8::FunctionTemplate>(), V8TestInterface3::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.
|
| + V8DOMConfiguration::installAccessors(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestInterface3Accessors, WTF_ARRAY_LENGTH(V8TestInterface3Accessors));
|
| + V8DOMConfiguration::installMethods(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestInterface3Methods, WTF_ARRAY_LENGTH(V8TestInterface3Methods));
|
| +
|
| + // Indexed properties
|
| + v8::IndexedPropertyHandlerConfiguration indexedPropertyHandlerConfig(TestInterface3V8Internal::indexedPropertyGetterCallback, TestInterface3V8Internal::indexedPropertySetterCallback, 0, TestInterface3V8Internal::indexedPropertyDeleterCallback, indexedPropertyEnumerator<TestInterface3>, v8::Local<v8::Value>(), v8::PropertyHandlerFlags::kNone);
|
| + instanceTemplate->SetHandler(indexedPropertyHandlerConfig);
|
| + // Named properties
|
| + v8::NamedPropertyHandlerConfiguration namedPropertyHandlerConfig(TestInterface3V8Internal::namedPropertyGetterCallback, TestInterface3V8Internal::namedPropertySetterCallback, TestInterface3V8Internal::namedPropertyQueryCallback, TestInterface3V8Internal::namedPropertyDeleterCallback, TestInterface3V8Internal::namedPropertyEnumeratorCallback, v8::Local<v8::Value>(), static_cast<v8::PropertyHandlerFlags>(int(v8::PropertyHandlerFlags::kOnlyInterceptStrings) | int(v8::PropertyHandlerFlags::kNonMasking)));
|
| + instanceTemplate->SetHandler(namedPropertyHandlerConfig);
|
| +
|
| + if (RuntimeEnabledFeatures::featureNameEnabled()) {
|
| + // Iterator (@@iterator)
|
| + const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIteratorConfiguration = { v8::Symbol::GetIterator, TestInterface3V8Internal::iteratorMethodCallback, 0, v8::DontEnum, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype };
|
| + V8DOMConfiguration::installMethod(isolate, world, prototypeTemplate, signature, symbolKeyedIteratorConfiguration);
|
| + }
|
| +
|
| + if (RuntimeEnabledFeatures::featureNameEnabled()) {
|
| + const V8DOMConfiguration::MethodConfiguration keysMethodConfiguration = {"keys", TestInterface3V8Internal::keysMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
|
| + V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, keysMethodConfiguration);
|
| + }
|
| + if (RuntimeEnabledFeatures::featureNameEnabled()) {
|
| + const V8DOMConfiguration::MethodConfiguration valuesMethodConfiguration = {"values", TestInterface3V8Internal::valuesMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
|
| + V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, valuesMethodConfiguration);
|
| + }
|
| + if (RuntimeEnabledFeatures::featureNameEnabled()) {
|
| + const V8DOMConfiguration::MethodConfiguration entriesMethodConfiguration = {"entries", TestInterface3V8Internal::entriesMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
|
| + V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, entriesMethodConfiguration);
|
| + }
|
| + if (RuntimeEnabledFeatures::featureNameEnabled()) {
|
| + const V8DOMConfiguration::MethodConfiguration forEachMethodConfiguration = {"forEach", TestInterface3V8Internal::forEachMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
|
| + V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, forEachMethodConfiguration);
|
| + }
|
| }
|
|
|
| -v8::Local<v8::FunctionTemplate> V8TestInterface3::domTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world)
|
| -{
|
| - return V8DOMConfiguration::domClassTemplate(isolate, world, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), installV8TestInterface3Template);
|
| +v8::Local<v8::FunctionTemplate> V8TestInterface3::domTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world) {
|
| + return V8DOMConfiguration::domClassTemplate(isolate, world, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), installV8TestInterface3Template);
|
| }
|
|
|
| -bool V8TestInterface3::hasInstance(v8::Local<v8::Value> v8Value, v8::Isolate* isolate)
|
| -{
|
| - return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Value);
|
| +bool V8TestInterface3::hasInstance(v8::Local<v8::Value> v8Value, v8::Isolate* isolate) {
|
| + return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Value);
|
| }
|
|
|
| -v8::Local<v8::Object> V8TestInterface3::findInstanceInPrototypeChain(v8::Local<v8::Value> v8Value, v8::Isolate* isolate)
|
| -{
|
| - return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrapperTypeInfo, v8Value);
|
| +v8::Local<v8::Object> V8TestInterface3::findInstanceInPrototypeChain(v8::Local<v8::Value> v8Value, v8::Isolate* isolate) {
|
| + return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrapperTypeInfo, v8Value);
|
| }
|
|
|
| -TestInterface3* V8TestInterface3::toImplWithTypeCheck(v8::Isolate* isolate, v8::Local<v8::Value> value)
|
| -{
|
| - return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(value)) : nullptr;
|
| +TestInterface3* V8TestInterface3::toImplWithTypeCheck(v8::Isolate* isolate, v8::Local<v8::Value> value) {
|
| + return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(value)) : nullptr;
|
| }
|
|
|
| -} // namespace blink
|
| +} // namespace blink
|
|
|