Commit def63444 authored by yukishiino's avatar yukishiino Committed by Commit bot

binding: Supports preparePrototypeAndInterfaceObject on partial interfaces.

Supports V8<Type>Partial::preparePrototypeAndInterfaceObject.

BUG=

Review-Url: https://codereview.chromium.org/2620013002
Cr-Commit-Position: refs/heads/master@{#442846}
parent d4c201b6
......@@ -139,6 +139,8 @@ class {{v8_class}} {
{% if unscopables or has_conditional_attributes_on_prototype or
methods | conditionally_exposed(is_partial) %}
{{exported}}static void preparePrototypeAndInterfaceObject(v8::Local<v8::Context>, const DOMWrapperWorld&, v8::Local<v8::Object> prototypeObject, v8::Local<v8::Function> interfaceObject, v8::Local<v8::FunctionTemplate> interfaceTemplate);
{% elif has_partial_interface %}
{{exported}}static void preparePrototypeAndInterfaceObject(v8::Local<v8::Context>, const DOMWrapperWorld&, v8::Local<v8::Object> prototypeObject, v8::Local<v8::Function> interfaceObject, v8::Local<v8::FunctionTemplate> interfaceTemplate) {}
{% endif %}
{% if has_partial_interface %}
{{exported}}static void updateWrapperTypeInfo(InstallTemplateFunction, PreparePrototypeAndInterfaceObjectFunction);
......
......@@ -16,7 +16,6 @@
{% from 'methods.cpp.tmpl' import install_conditionally_enabled_methods with context %}
{% if has_prepare_prototype_and_interface_object %}
void {{v8_class_or_partial}}::preparePrototypeAndInterfaceObject(v8::Local<v8::Context> context, const DOMWrapperWorld& world, v8::Local<v8::Object> prototypeObject, v8::Local<v8::Function> interfaceObject, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
#error No one is currently using a partial interface with context-dependent properties. If you\'re planning to use it, please consult with the binding team: <blink-reviews-bindings@chromium.org>
{{v8_class}}::preparePrototypeAndInterfaceObject(context, world, prototypeObject, interfaceObject, interfaceTemplate);
v8::Isolate* isolate = context->GetIsolate();
{% if unscopables %}
......
......@@ -44,6 +44,7 @@ class V8TestInterface2 {
static void visitDOMWrapper(v8::Isolate*, ScriptWrappable*, const v8::Persistent<v8::Object>&);
static void constructorCallback(const v8::FunctionCallbackInfo<v8::Value>&);
static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0;
CORE_EXPORT static void preparePrototypeAndInterfaceObject(v8::Local<v8::Context>, const DOMWrapperWorld&, v8::Local<v8::Object> prototypeObject, v8::Local<v8::Function> interfaceObject, v8::Local<v8::FunctionTemplate> interfaceTemplate) {}
CORE_EXPORT static void updateWrapperTypeInfo(InstallTemplateFunction, PreparePrototypeAndInterfaceObjectFunction);
CORE_EXPORT static void installV8TestInterface2Template(v8::Isolate*, const DOMWrapperWorld&, v8::Local<v8::FunctionTemplate> interfaceTemplate);
......
......@@ -429,7 +429,6 @@ void V8TestInterfacePartial::installOriginTrialPartialFeature(ScriptState* scrip
}
void V8TestInterfacePartial::preparePrototypeAndInterfaceObject(v8::Local<v8::Context> context, const DOMWrapperWorld& world, v8::Local<v8::Object> prototypeObject, v8::Local<v8::Function> interfaceObject, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
#error No one is currently using a partial interface with context-dependent properties. If you\'re planning to use it, please consult with the binding team: <blink-reviews-bindings@chromium.org>
V8TestInterface::preparePrototypeAndInterfaceObject(context, world, prototypeObject, interfaceObject, interfaceTemplate);
v8::Isolate* isolate = context->GetIsolate();
v8::Local<v8::Name> unscopablesSymbol(v8::Symbol::GetUnscopables(isolate));
......
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