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

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

Issue 2692343006: [Bindings] Declare signature and executionContext once (Closed)
Patch Set: Add a test 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_base.cpp.tmpl
diff --git a/third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl
index 57ab4ac3dc3096a1afac1f3e30ef961dda890305..439615c4fd15d94c5bc8da58f2282b87ca9c18db 100644
--- a/third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl
+++ b/third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl
@@ -714,7 +714,13 @@ void {{v8_class_or_partial}}::preparePrototypeAndInterfaceObject(v8::Local<v8::C
{% if is_partial %}
{{v8_class}}::preparePrototypeAndInterfaceObject(context, world, prototypeObject, interfaceObject, interfaceTemplate);
{% endif %}
+
v8::Isolate* isolate = context->GetIsolate();
+ {% if has_conditional_attributes_on_prototype or methods | conditionally_exposed(is_partial) %}
+ v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemplate);
+ ExecutionContext* executionContext = toExecutionContext(context);
+ DCHECK(executionContext);
+ {% endif %}
{% if unscopables %}
v8::Local<v8::Name> unscopablesSymbol(v8::Symbol::GetUnscopables(isolate));

Powered by Google App Engine
This is Rietveld 408576698