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

Side by Side Diff: third_party/WebKit/Source/bindings/templates/interface.h.tmpl

Issue 2647643002: Fix V8 bindings for named constructors to set prototype object correctly (Closed)
Patch Set: Review feedback 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 unified diff | Download patch
OLDNEW
1 {% filter format_blink_cpp_source_code %} 1 {% filter format_blink_cpp_source_code %}
2 2
3 {% include 'copyright_block.txt' %} 3 {% include 'copyright_block.txt' %}
4 #ifndef {{v8_class}}_h 4 #ifndef {{v8_class}}_h
5 #define {{v8_class}}_h 5 #define {{v8_class}}_h
6 6
7 {% for filename in header_includes %} 7 {% for filename in header_includes %}
8 #include "{{filename}}" 8 #include "{{filename}}"
9 {% endfor %} 9 {% endfor %}
10 10
11 namespace blink { 11 namespace blink {
12 12
13 {% if has_event_constructor %} 13 {% if has_event_constructor %}
14 class Dictionary; 14 class Dictionary;
15 {% endif %} 15 {% endif %}
16 {% if origin_trial_attributes %} 16 {% if origin_trial_attributes %}
17 class ScriptState; 17 class ScriptState;
18 {% endif %} 18 {% endif %}
19 {% if named_constructor %} 19 {% if named_constructor %}
20 class {{v8_class}}Constructor { 20 class {{v8_class}}Constructor {
21 STATIC_ONLY({{v8_class}}Constructor); 21 STATIC_ONLY({{v8_class}}Constructor);
22 public: 22 public:
23 static v8::Local<v8::FunctionTemplate> domTemplate(v8::Isolate*, const DOMWrap perWorld&); 23 static v8::Local<v8::FunctionTemplate> domTemplate(v8::Isolate*, const DOMWrap perWorld&);
24 static v8::Local<v8::FunctionTemplate> NamedConstructorAttributeGetter(v8::Iso late*, const DOMWrapperWorld&);
haraken 2017/01/25 03:37:16 Is this needed?
sashab 2017/01/25 04:54:15 Nope :) Removed.
25 static void NamedConstructorAttributeGetter(v8::Local<v8::Name> propertyName, const v8::PropertyCallbackInfo<v8::Value>& info);
24 {{exported}}static const WrapperTypeInfo wrapperTypeInfo; 26 {{exported}}static const WrapperTypeInfo wrapperTypeInfo;
25 }; 27 };
26 28
27 {% endif %} 29 {% endif %}
28 class {{v8_class}} { 30 class {{v8_class}} {
29 STATIC_ONLY({{v8_class}}); 31 STATIC_ONLY({{v8_class}});
30 public: 32 public:
31 {% if is_array_buffer_or_view %} 33 {% if is_array_buffer_or_view %}
32 {{exported}}static {{cpp_class}}* toImpl(v8::Local<v8::Object> object); 34 {{exported}}static {{cpp_class}}* toImpl(v8::Local<v8::Object> object);
33 {% else %} 35 {% else %}
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 template <> 183 template <>
182 struct V8TypeOf<{{cpp_class}}> { 184 struct V8TypeOf<{{cpp_class}}> {
183 typedef {{v8_class}} Type; 185 typedef {{v8_class}} Type;
184 }; 186 };
185 187
186 } // namespace blink 188 } // namespace blink
187 189
188 #endif // {{v8_class}}_h 190 #endif // {{v8_class}}_h
189 191
190 {% endfilter %}{# format_blink_cpp_source_code #} 192 {% endfilter %}{# format_blink_cpp_source_code #}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698