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

Side by Side Diff: Source/bindings/templates/attributes.cpp

Issue 668673002: Move the v8::Isolate* parameter to the first parameter of various binding methods in third_party/We… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git/+/master
Patch Set: Created 6 years, 2 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 {##############################################################################} 1 {##############################################################################}
2 {% macro attribute_getter(attribute, world_suffix) %} 2 {% macro attribute_getter(attribute, world_suffix) %}
3 {% filter conditional(attribute.conditional_string) %} 3 {% filter conditional(attribute.conditional_string) %}
4 static void {{attribute.name}}AttributeGetter{{world_suffix}}( 4 static void {{attribute.name}}AttributeGetter{{world_suffix}}(
5 {%- if attribute.is_expose_js_accessors %} 5 {%- if attribute.is_expose_js_accessors %}
6 const v8::FunctionCallbackInfo<v8::Value>& info 6 const v8::FunctionCallbackInfo<v8::Value>& info
7 {%- else %} 7 {%- else %}
8 const v8::PropertyCallbackInfo<v8::Value>& info 8 const v8::PropertyCallbackInfo<v8::Value>& info
9 {%- endif %}) 9 {%- endif %})
10 { 10 {
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 {{cpp_class}}* impl = {{v8_class}}::toImpl(holder); 233 {{cpp_class}}* impl = {{v8_class}}::toImpl(holder);
234 {% endif %} 234 {% endif %}
235 {% if attribute.idl_type == 'EventHandler' and interface_name == 'Window' %} 235 {% if attribute.idl_type == 'EventHandler' and interface_name == 'Window' %}
236 if (!impl->document()) 236 if (!impl->document())
237 return; 237 return;
238 {% endif %} 238 {% endif %}
239 {# Convert JS value to C++ value #} 239 {# Convert JS value to C++ value #}
240 {% if attribute.idl_type != 'EventHandler' %} 240 {% if attribute.idl_type != 'EventHandler' %}
241 {{attribute.v8_value_to_local_cpp_value}}; 241 {{attribute.v8_value_to_local_cpp_value}};
242 {% elif not is_node %}{# EventHandler hack #} 242 {% elif not is_node %}{# EventHandler hack #}
243 moveEventListenerToNewWrapper(holder, {{attribute.event_handler_getter_expre ssion}}, v8Value, {{v8_class}}::eventListenerCacheIndex, info.GetIsolate()); 243 moveEventListenerToNewWrapper(info.GetIsolate(), holder, {{attribute.event_h andler_getter_expression}}, v8Value, {{v8_class}}::eventListenerCacheIndex);
244 {% endif %} 244 {% endif %}
245 {# Type checking, possibly throw a TypeError, per: 245 {# Type checking, possibly throw a TypeError, per:
246 http://www.w3.org/TR/WebIDL/#es-type-mapping #} 246 http://www.w3.org/TR/WebIDL/#es-type-mapping #}
247 {% if attribute.has_type_checking_unrestricted %} 247 {% if attribute.has_type_checking_unrestricted %}
248 {# Non-finite floating point values (NaN, +Infinity or −Infinity), per: 248 {# Non-finite floating point values (NaN, +Infinity or −Infinity), per:
249 http://heycam.github.io/webidl/#es-float 249 http://heycam.github.io/webidl/#es-float
250 http://heycam.github.io/webidl/#es-double #} 250 http://heycam.github.io/webidl/#es-double #}
251 if (!std::isfinite(cppValue)) { 251 if (!std::isfinite(cppValue)) {
252 exceptionState.throwTypeError("The provided {{attribute.idl_type}} value is non-finite."); 252 exceptionState.throwTypeError("The provided {{attribute.idl_type}} value is non-finite.");
253 exceptionState.throwIfNeeded(); 253 exceptionState.throwIfNeeded();
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 access_control, 427 access_control,
428 property_attribute, 428 property_attribute,
429 only_exposed_to_private_script, 429 only_exposed_to_private_script,
430 ] %} 430 ] %}
431 {% if not attribute.is_expose_js_accessors %} 431 {% if not attribute.is_expose_js_accessors %}
432 {% set attribute_configuration_list = attribute_configuration_list 432 {% set attribute_configuration_list = attribute_configuration_list
433 + [on_prototype] %} 433 + [on_prototype] %}
434 {% endif %} 434 {% endif %}
435 {{'{'}}{{attribute_configuration_list | join(', ')}}{{'}'}} 435 {{'{'}}{{attribute_configuration_list | join(', ')}}{{'}'}}
436 {%- endmacro %} 436 {%- endmacro %}
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/V8WorkerGlobalScopeEventListener.cpp ('k') | Source/bindings/templates/methods.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698