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

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

Issue 196133029: Oilpan: move Location to the oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased Created 6 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 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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 TypeError), per http://www.w3.org/TR/WebIDL/#es-interface #} 220 TypeError), per http://www.w3.org/TR/WebIDL/#es-interface #}
221 if (!isUndefinedOrNull(jsValue) && !V8{{attribute.idl_type}}::hasInstance(js Value, info.GetIsolate())) { 221 if (!isUndefinedOrNull(jsValue) && !V8{{attribute.idl_type}}::hasInstance(js Value, info.GetIsolate())) {
222 exceptionState.throwTypeError("The provided value is not of type '{{attr ibute.idl_type}}'."); 222 exceptionState.throwTypeError("The provided value is not of type '{{attr ibute.idl_type}}'.");
223 exceptionState.throwIfNeeded(); 223 exceptionState.throwIfNeeded();
224 return; 224 return;
225 } 225 }
226 {% endif %} 226 {% endif %}
227 {# impl #} 227 {# impl #}
228 {% if attribute.put_forwards %} 228 {% if attribute.put_forwards %}
229 {{cpp_class}}* proxyImpl = {{v8_class}}::toNative(info.Holder()); 229 {{cpp_class}}* proxyImpl = {{v8_class}}::toNative(info.Holder());
230 RefPtr<{{attribute.idl_type}}> impl = WTF::getPtr(proxyImpl->{{attribute.nam e}}()); 230 {{attribute.ref_ptr}}<{{attribute.idl_type}}> impl = WTF::getPtr(proxyImpl-> {{attribute.name}}());
231 if (!impl) 231 if (!impl)
232 return; 232 return;
233 {% elif not attribute.is_static %} 233 {% elif not attribute.is_static %}
234 {{cpp_class}}* impl = {{v8_class}}::toNative(info.Holder()); 234 {{cpp_class}}* impl = {{v8_class}}::toNative(info.Holder());
235 {% endif %} 235 {% endif %}
236 {% if attribute.is_implemented_by and not attribute.is_static %} 236 {% if attribute.is_implemented_by and not attribute.is_static %}
237 ASSERT(impl); 237 ASSERT(impl);
238 {% endif %} 238 {% endif %}
239 {% if attribute.idl_type == 'EventHandler' and interface_name == 'Window' %} 239 {% if attribute.idl_type == 'EventHandler' and interface_name == 'Window' %}
240 if (!impl->document()) 240 if (!impl->document())
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 {% endif %} 309 {% endif %}
310 {% if attribute.has_custom_setter %} 310 {% if attribute.has_custom_setter %}
311 {{v8_class}}::{{attribute.name}}AttributeSetterCustom(jsValue, info); 311 {{v8_class}}::{{attribute.name}}AttributeSetterCustom(jsValue, info);
312 {% else %} 312 {% else %}
313 {{cpp_class}}V8Internal::{{attribute.name}}AttributeSetter{{world_suffix}}(j sValue, info); 313 {{cpp_class}}V8Internal::{{attribute.name}}AttributeSetter{{world_suffix}}(j sValue, info);
314 {% endif %} 314 {% endif %}
315 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 315 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
316 } 316 }
317 {% endfilter %} 317 {% endfilter %}
318 {% endmacro %} 318 {% endmacro %}
OLDNEW
« no previous file with comments | « Source/bindings/scripts/v8_attributes.py ('k') | Source/bindings/tests/idls/TestObjectPython.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698