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

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

Issue 2647643002: Fix V8 bindings for named constructors to set prototype object correctly (Closed)
Patch Set: Rebase Created 3 years, 9 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/attributes.cpp.tmpl
diff --git a/third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl
index a1be921da37bd29b7b66ee99cf8cd345b8798c89..6d4c1676888a1a26d77e849af2e7a6df82d4be1a 100644
--- a/third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl
+++ b/third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl
@@ -461,10 +461,12 @@ const v8::FunctionCallbackInfo<v8::Value>& info
{% macro attribute_configuration(attribute) %}
{% from 'utilities.cpp.tmpl' import property_location %}
{% if attribute.constructor_type %}
-{% set getter_callback =
- '%s::%sConstructorGetterCallback' % (v8_class_or_partial, attribute.name)
- if attribute.needs_constructor_getter_callback else
- 'v8ConstructorAttributeGetter' %}
+ {% if attribute.needs_constructor_getter_callback %}
+ {% set getter_callback = '%s::%sConstructorGetterCallback' % (v8_class_or_partial, attribute.name) %}
+ {% else %}
+ {% set getter_callback = 'V8%s::NamedConstructorAttributeGetter' % (attribute.constructor_type)
+ if attribute.is_named_constructor else 'v8ConstructorAttributeGetter' %}
+ {% endif %}
{% set setter_callback = 'nullptr' %}
{% else %}{# regular attributes #}
{% set getter_callback = '%s::%sAttributeGetterCallback' %

Powered by Google App Engine
This is Rietveld 408576698