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

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

Issue 2707243006: [SharedArrayBuffer] Prevent SharedArrayBuffer being used in Web APIs (Closed)
Patch Set: remove unused checks Created 3 years, 8 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.tmpl' import declare_enum_validation_variable %} 1 {% from 'utilities.cpp.tmpl' import declare_enum_validation_variable %}
2 {% from 'utilities.cpp.tmpl' import v8_value_to_local_cpp_value %} 2 {% from 'utilities.cpp.tmpl' import v8_value_to_local_cpp_value %}
3 {#############################################################################} 3 {#############################################################################}
4 {% macro assign_and_return_if_hasinstance(member) %} 4 {% macro assign_and_return_if_hasinstance(member) %}
5 {% if member.is_array_buffer_or_view_type %} 5 {% if member.is_array_buffer_or_view_type %}
6 if (v8Value->Is{{member.type_name}}()) { 6 if (v8Value->Is{{member.type_name}}()) {
7 {% else %} 7 {% else %}
8 if (V8{{member.type_name}}::hasInstance(v8Value, isolate)) { 8 if (V8{{member.type_name}}::hasInstance(v8Value, isolate)) {
9 {% endif %} 9 {% endif %}
10 {% if member.is_array_buffer_view_or_typed_array %}
11 {{member.cpp_local_type}} cppValue = toNotShared<{{member.cpp_local_type}}>(is olate, v8Value, exceptionState);
12 if (exceptionState.hadException())
13 return;
14 {% else %}
10 {{member.cpp_local_type}} cppValue = V8{{member.type_name}}::toImpl(v8::Local< v8::Object>::Cast(v8Value)); 15 {{member.cpp_local_type}} cppValue = V8{{member.type_name}}::toImpl(v8::Local< v8::Object>::Cast(v8Value));
16 {% endif %}
11 impl.set{{member.type_name}}(cppValue); 17 impl.set{{member.type_name}}(cppValue);
12 return; 18 return;
13 } 19 }
14 {% endmacro %} 20 {% endmacro %}
15 {#############################################################################} 21 {#############################################################################}
16 {% filter format_blink_cpp_source_code %} 22 {% filter format_blink_cpp_source_code %}
17 {% include 'copyright_block.txt' %} 23 {% include 'copyright_block.txt' %}
18 #include "{{this_include_header_name}}.h" 24 #include "{{this_include_header_name}}.h"
19 25
20 {% for filename in cpp_includes %} 26 {% for filename in cpp_includes %}
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 213
208 {{cpp_class}} NativeValueTraits<{{cpp_class}}>::nativeValue(v8::Isolate* isolate , v8::Local<v8::Value> value, ExceptionState& exceptionState) { 214 {{cpp_class}} NativeValueTraits<{{cpp_class}}>::nativeValue(v8::Isolate* isolate , v8::Local<v8::Value> value, ExceptionState& exceptionState) {
209 {{cpp_class}} impl; 215 {{cpp_class}} impl;
210 {{v8_class}}::toImpl(isolate, value, impl, UnionTypeConversionMode::NotNullabl e, exceptionState); 216 {{v8_class}}::toImpl(isolate, value, impl, UnionTypeConversionMode::NotNullabl e, exceptionState);
211 return impl; 217 return impl;
212 } 218 }
213 219
214 } // namespace blink 220 } // namespace blink
215 221
216 {% endfilter %}{# format_blink_cpp_source_code #} 222 {% endfilter %}{# format_blink_cpp_source_code #}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698