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

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

Issue 2707243006: [SharedArrayBuffer] Prevent SharedArrayBuffer being used in Web APIs (Closed)
Patch Set: add some layout tests 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, v8_value_t o_local_cpp_value %} 1 {% from 'utilities.cpp.tmpl' import declare_enum_validation_variable, v8_value_t o_local_cpp_value %}
2 2
3 {##############################################################################} 3 {##############################################################################}
4 {% macro attribute_getter(attribute, world_suffix) %} 4 {% macro attribute_getter(attribute, world_suffix) %}
5 static void {{attribute.name}}AttributeGetter{{world_suffix}}( 5 static void {{attribute.name}}AttributeGetter{{world_suffix}}(
6 {%- if attribute.is_data_type_property %} 6 {%- if attribute.is_data_type_property %}
7 const v8::PropertyCallbackInfo<v8::Value>& info 7 const v8::PropertyCallbackInfo<v8::Value>& info
8 {%- else %} 8 {%- else %}
9 const v8::FunctionCallbackInfo<v8::Value>& info 9 const v8::FunctionCallbackInfo<v8::Value>& info
10 {%- endif %}) { 10 {%- endif %}) {
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 {% if attribute.is_explicit_nullable %} 144 {% if attribute.is_explicit_nullable %}
145 if (isNull) { 145 if (isNull) {
146 v8SetReturnValueNull(info); 146 v8SetReturnValueNull(info);
147 return; 147 return;
148 } 148 }
149 {% endif %} 149 {% endif %}
150 150
151 {% if attribute.is_keep_alive_for_gc %} 151 {% if attribute.is_keep_alive_for_gc %}
152 // Keep the wrapper object for the return value alive as long as |this| 152 // Keep the wrapper object for the return value alive as long as |this|
153 // object is alive in order to save creation time of the wrapper object. 153 // object is alive in order to save creation time of the wrapper object.
154 if ({{attribute.cpp_value}} && DOMDataStore::setReturnValue{{world_suffix}}(in fo.GetReturnValue(), {{attribute.cpp_value}})) 154 if ({{attribute.cpp_value}} && DOMDataStore::setReturnValue{{world_suffix}}(in fo.GetReturnValue(), {{attribute.cpp_value_to_script_wrappable}}))
155 return; 155 return;
156 v8::Local<v8::Value> v8Value(ToV8({{attribute.cpp_value}}, holder, info.GetIso late())); 156 v8::Local<v8::Value> v8Value(ToV8({{attribute.cpp_value_to_script_wrappable}}, holder, info.GetIsolate()));
157 V8PrivateProperty::getSymbol( 157 V8PrivateProperty::getSymbol(
158 info.GetIsolate(), "KeepAlive#{{interface_name}}#{{attribute.name}}") 158 info.GetIsolate(), "KeepAlive#{{interface_name}}#{{attribute.name}}")
159 .set(holder, v8Value); 159 .set(holder, v8Value);
160 {% endif %} 160 {% endif %}
161 161
162 {% if world_suffix %} 162 {% if world_suffix %}
163 {{attribute.v8_set_return_value_for_main_world}}; 163 {{attribute.v8_set_return_value_for_main_world}};
164 {% else %} 164 {% else %}
165 {{attribute.v8_set_return_value}}; 165 {{attribute.v8_set_return_value}};
166 {% endif %} 166 {% endif %}
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 static const V8DOMConfiguration::AccessorConfiguration accessorConfiguration[] = { 515 static const V8DOMConfiguration::AccessorConfiguration accessorConfiguration[] = {
516 {{attribute_configuration(attribute)}} 516 {{attribute_configuration(attribute)}}
517 }; 517 };
518 for (const auto& accessorConfig : accessorConfiguration) 518 for (const auto& accessorConfig : accessorConfiguration)
519 V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), p rototypeObject, interfaceObject, signature, accessorConfig); 519 V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), p rototypeObject, interfaceObject, signature, accessorConfig);
520 {% endfilter %}{# runtime_enabled #} 520 {% endfilter %}{# runtime_enabled #}
521 {% endfilter %}{# secure_context #} 521 {% endfilter %}{# secure_context #}
522 {% endfilter %}{# exposed #} 522 {% endfilter %}{# exposed #}
523 {% endfor %} 523 {% endfor %}
524 {% endmacro %} 524 {% endmacro %}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698