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

Unified Diff: Source/bindings/templates/partial_interface.cpp

Issue 1085453003: IDL: Add support for [Unscopeable] on attributes and methods (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fixes Created 5 years, 8 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
« no previous file with comments | « Source/bindings/templates/partial_interface.h ('k') | Source/bindings/tests/idls/core/TestObject.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/templates/partial_interface.cpp
diff --git a/Source/bindings/templates/partial_interface.cpp b/Source/bindings/templates/partial_interface.cpp
index cc5b852034949ac67aa4f9a0c083a235418b25cb..2282dd3a01534f8f4980c6ebbec88cdb7ffc2c9d 100644
--- a/Source/bindings/templates/partial_interface.cpp
+++ b/Source/bindings/templates/partial_interface.cpp
@@ -1,5 +1,25 @@
{% extends 'interface_base.cpp' %}
+
+{##############################################################################}
+{% block prepare_prototype_object %}
+{% from 'interface.cpp' import install_unscopeables with context %}
+{% from 'methods.cpp' import install_conditionally_enabled_methods
+ with context %}
+void {{v8_class_or_partial}}::preparePrototypeObject(v8::Isolate* isolate, v8::Local<v8::Object> prototypeObject)
+{
+ {{v8_class}}::preparePrototypeObject(isolate, prototypeObject);
+{% if unscopeables %}
+ {{install_unscopeables() | indent}}
+{% endif %}
+{% if conditionally_enabled_methods %}
+ {{install_conditionally_enabled_methods() | indent}}
+{% endif %}
+}
+
+{% endblock %}
+
+
{##############################################################################}
{% block partial_interface %}
void {{v8_class_or_partial}}::initialize()
@@ -7,7 +27,7 @@ void {{v8_class_or_partial}}::initialize()
// Should be invoked from initModules.
{{v8_class}}::updateWrapperTypeInfo(
&{{v8_class_or_partial}}::install{{v8_class}}Template,
- &{{v8_class_or_partial}}::installConditionallyEnabledMethods);
+ &{{v8_class_or_partial}}::preparePrototypeObject);
{% for method in methods %}
{% if method.overloads and method.overloads.has_partial_overloads %}
{{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInterface(&{{cpp_class_or_partial}}V8Internal::{{method.name}}Method);
« no previous file with comments | « Source/bindings/templates/partial_interface.h ('k') | Source/bindings/tests/idls/core/TestObject.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698