Commit 783ef8ee authored by Yuki Shiino's avatar Yuki Shiino Committed by Commit Bot

bind-gen: Implement V8DOMConfiguration::InstallConstants

Implements V8DOMConfiguration::InstallConstants for context-
dependent property installation.

Bug: 839389
Change-Id: I3f67010e247ff4b1719cafec37b0865c9e05aa75
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2081729Reviewed-by: default avatarHitoshi Yoshida <peria@chromium.org>
Commit-Queue: Yuki Shiino <yukishiino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#745959}
parent 4c96f85a
......@@ -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(
......@@ -734,6 +735,18 @@ void V8DOMConfiguration::InstallConstants(
}
}
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,
......
......@@ -278,6 +278,12 @@ class CORE_EXPORT V8DOMConfiguration final {
const ConstantCallbackConfiguration*,
size_t constant_count);
static void InstallConstants(v8::Isolate* isolate,
v8::Local<v8::Function> interface_object,
v8::Local<v8::Object> prototype_object,
const ConstantConfiguration* constants,
size_t constant_count);
static void InstallConstantWithGetter(
v8::Isolate*,
v8::Local<v8::FunctionTemplate> interface_template,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment