diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-07-16 11:45:35 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-07-17 08:59:23 +0000 |
commit | 552906b0f222c5d5dd11b9fd73829d510980461a (patch) | |
tree | 3a11e6ed0538a81dd83b20cf3a4783e297f26d91 /chromium/third_party/blink/renderer/bindings/core/v8/v8_dom_configuration.cc | |
parent | 1b05827804eaf047779b597718c03e7d38344261 (diff) | |
download | qtwebengine-chromium-552906b0f222c5d5dd11b9fd73829d510980461a.tar.gz |
BASELINE: Update Chromium to 83.0.4103.122
Change-Id: Ie3a82f5bb0076eec2a7c6a6162326b4301ee291e
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/third_party/blink/renderer/bindings/core/v8/v8_dom_configuration.cc')
-rw-r--r-- | chromium/third_party/blink/renderer/bindings/core/v8/v8_dom_configuration.cc | 52 |
1 files changed, 51 insertions, 1 deletions
diff --git a/chromium/third_party/blink/renderer/bindings/core/v8/v8_dom_configuration.cc b/chromium/third_party/blink/renderer/bindings/core/v8/v8_dom_configuration.cc index 739ba61e9f2..6809daa161c 100644 --- a/chromium/third_party/blink/renderer/bindings/core/v8/v8_dom_configuration.cc +++ b/chromium/third_party/blink/renderer/bindings/core/v8/v8_dom_configuration.cc @@ -689,9 +689,10 @@ void V8DOMConfiguration::InstallConstants( v8::Local<v8::ObjectTemplate> prototype_template, const ConstantConfiguration* constants, size_t constant_count) { - for (size_t i = 0; i < constant_count; ++i) + for (size_t i = 0; i < constant_count; ++i) { InstallConstantInternal(isolate, interface_template, prototype_template, constants[i]); + } } void V8DOMConfiguration::InstallConstant( @@ -711,6 +712,41 @@ void V8DOMConfiguration::InstallConstant( InstallConstantInternal(isolate, interface, prototype, constant); } +void V8DOMConfiguration::InstallConstants( + v8::Isolate* isolate, + v8::Local<v8::FunctionTemplate> interface_template, + v8::Local<v8::ObjectTemplate> prototype_template, + const ConstantCallbackConfiguration* constants, + size_t constant_count) { + for (size_t i = 0; i < constant_count; ++i) { + v8::Local<v8::String> name = V8AtomicString(isolate, constants[i].name); + interface_template->SetNativeDataProperty( + name, constants[i].getter, nullptr, v8::Local<v8::Value>(), + static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontDelete), + v8::Local<v8::AccessorSignature>(), v8::DEFAULT, + v8::SideEffectType::kHasNoSideEffect, + v8::SideEffectType::kHasNoSideEffect); + prototype_template->SetNativeDataProperty( + name, constants[i].getter, nullptr, v8::Local<v8::Value>(), + static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontDelete), + v8::Local<v8::AccessorSignature>(), v8::DEFAULT, + v8::SideEffectType::kHasNoSideEffect, + v8::SideEffectType::kHasNoSideEffect); + } +} + +void V8DOMConfiguration::InstallConstants( + v8::Isolate* isolate, + v8::Local<v8::Function> interface_object, + v8::Local<v8::Object> prototype_object, + const V8DOMConfiguration::ConstantConfiguration* constants, + size_t constant_count) { + for (size_t i = 0; i < constant_count; ++i) { + InstallConstantInternal(isolate, interface_object, prototype_object, + constants[i]); + } +} + void V8DOMConfiguration::InstallConstantWithGetter( v8::Isolate* isolate, v8::Local<v8::FunctionTemplate> interface_template, @@ -752,6 +788,20 @@ void V8DOMConfiguration::InstallMethod( interface_template, signature, method, world); } +void V8DOMConfiguration::InstallMethods(v8::Isolate* isolate, + const DOMWrapperWorld& world, + v8::Local<v8::Object> instance, + v8::Local<v8::Object> prototype, + v8::Local<v8::Function> interface, + v8::Local<v8::Signature> signature, + const MethodConfiguration* methods, + size_t method_count) { + for (size_t i = 0; i < method_count; ++i) { + InstallMethodInternal(isolate, instance, prototype, interface, signature, + methods[i], world); + } +} + void V8DOMConfiguration::InstallMethod(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::Object> instance, |