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

Unified Diff: third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl

Issue 2692753003: [Bindings] Update runtime enabled features from partial interfaces (Closed)
Patch Set: Remove needless classname addition Created 3 years, 10 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
Index: third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl
diff --git a/third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl
index c10b0ff334ebd57882ba29dabfa52f8a1ebca18e..0a0e32d3e87f238d42efbe0a7ef6242b5520ca35 100644
--- a/third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl
+++ b/third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl
@@ -920,12 +920,29 @@ V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), pro
{##############################################################################}
{% block partial_interface %}
{% if has_partial_interface %}
+{% if needs_runtime_enabled_installer %}
+InstallRuntimeEnabledFunction {{v8_class}}::install{{v8_class}}RuntimeEnabledFunction = (InstallRuntimeEnabledFunction)&{{v8_class}}::installRuntimeEnabledFeatures;
Yuki 2017/02/13 12:15:03 nit: Better avoid casting.
+{% endif %}
+
InstallTemplateFunction {{v8_class}}::install{{v8_class}}TemplateFunction = (InstallTemplateFunction)&{{v8_class}}::install{{v8_class}}Template;
-void {{v8_class}}::updateWrapperTypeInfo(InstallTemplateFunction installTemplateFunction, PreparePrototypeAndInterfaceObjectFunction preparePrototypeAndInterfaceObjectFunction) {
- {{v8_class}}::install{{v8_class}}TemplateFunction = installTemplateFunction;
- if (preparePrototypeAndInterfaceObjectFunction)
- {{v8_class}}::wrapperTypeInfo.preparePrototypeAndInterfaceObjectFunction = preparePrototypeAndInterfaceObjectFunction;
+void {{v8_class}}::updateWrapperTypeInfo(
+ InstallTemplateFunction installTemplateFunction,
+ InstallRuntimeEnabledFunction installRuntimeEnabledFunction,
+ PreparePrototypeAndInterfaceObjectFunction preparePrototypeAndInterfaceObjectFunction) {
+ ALLOW_UNUSED_LOCAL(installRuntimeEnabledFunction);
+
+ {{v8_class}}::install{{v8_class}}TemplateFunction =
+ installTemplateFunction;
+ {% if needs_runtime_enabled_installer %}
+ CHECK(installRuntimeEnabledFunction);
+ {{v8_class}}::install{{v8_class}}RuntimeEnabledFunction =
+ installRuntimeEnabledFunction;
+ {% endif %}
+ if (preparePrototypeAndInterfaceObjectFunction) {
+ {{v8_class}}::wrapperTypeInfo.preparePrototypeAndInterfaceObjectFunction =
+ preparePrototypeAndInterfaceObjectFunction;
+ }
}
{% for method in methods if method.overloads and method.overloads.has_partial_overloads %}

Powered by Google App Engine
This is Rietveld 408576698