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

Side by Side Diff: third_party/WebKit/Source/bindings/templates/union_container.cpp

Issue 1996903002: [Binding] Delete hasInstance() from ArrayBuffer related interfaces (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 {% from 'utilities.cpp' import declare_enum_validation_variable %} 1 {% from 'utilities.cpp' import declare_enum_validation_variable %}
2 {% include 'copyright_block.txt' %} 2 {% include 'copyright_block.txt' %}
3 #include "{{this_include_header_name}}.h" 3 #include "{{this_include_header_name}}.h"
4 4
5 {% from 'utilities.cpp' import v8_value_to_local_cpp_value %} 5 {% from 'utilities.cpp' import v8_value_to_local_cpp_value %}
6 {% macro assign_and_return_if_hasinstance(member) %} 6 {% macro assign_and_return_if_hasinstance(member) %}
7 {% if member.is_array_buffer_or_view_type %}
8 if (v8Value->Is{{member.type_name}}()) {
9 {% else %}
7 if (V8{{member.type_name}}::hasInstance(v8Value, isolate)) { 10 if (V8{{member.type_name}}::hasInstance(v8Value, isolate)) {
11 {% endif %}
8 {{member.cpp_local_type}} cppValue = V8{{member.type_name}}::toImpl(v8::Loca l<v8::Object>::Cast(v8Value)); 12 {{member.cpp_local_type}} cppValue = V8{{member.type_name}}::toImpl(v8::Loca l<v8::Object>::Cast(v8Value));
9 impl.set{{member.type_name}}(cppValue); 13 impl.set{{member.type_name}}(cppValue);
10 return; 14 return;
11 } 15 }
12 {% endmacro %} 16 {% endmacro %}
13 {% for filename in cpp_includes %} 17 {% for filename in cpp_includes %}
14 #include "{{filename}}" 18 #include "{{filename}}"
15 {% endfor %} 19 {% endfor %}
16 20
17 namespace blink { 21 namespace blink {
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 } 199 }
196 200
197 {{cpp_class}} NativeValueTraits<{{cpp_class}}>::nativeValue(v8::Isolate* isolate , v8::Local<v8::Value> value, ExceptionState& exceptionState) 201 {{cpp_class}} NativeValueTraits<{{cpp_class}}>::nativeValue(v8::Isolate* isolate , v8::Local<v8::Value> value, ExceptionState& exceptionState)
198 { 202 {
199 {{cpp_class}} impl; 203 {{cpp_class}} impl;
200 {{v8_class}}::toImpl(isolate, value, impl, UnionTypeConversionMode::NotNulla ble, exceptionState); 204 {{v8_class}}::toImpl(isolate, value, impl, UnionTypeConversionMode::NotNulla ble, exceptionState);
201 return impl; 205 return impl;
202 } 206 }
203 207
204 } // namespace blink 208 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698