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

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

Issue 2439013002: Implement cross-origin attributes using access check interceptors. (Closed)
Patch Set: etc2 Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl
diff --git a/third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl
index 481492af10fa15f4173687eca5c6f6e11634275c..90391cb6a1d51fcdff982006aee65c6254b9c724 100644
--- a/third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl
+++ b/third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl
@@ -259,7 +259,9 @@ void {{attribute.name}}ConstructorGetterCallback{{world_suffix}}(v8::Local<v8::N
{##############################################################################}
{% macro attribute_setter(attribute, world_suffix) %}
static void {{attribute.name}}AttributeSetter{{world_suffix}}(
-{%- if attribute.is_data_type_property %}
+{%- if attribute.has_cross_origin_setter %}
+v8::Local<v8::Value> v8Value, const V8CrossOriginSetterInfo& info
+{%- elif attribute.is_data_type_property %}
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
{%- else %}
v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info
@@ -412,6 +414,8 @@ const v8::FunctionCallbackInfo<v8::Value>& info
{% if attribute.has_custom_setter %}
{{v8_class}}::{{attribute.name}}AttributeSetterCustom(v8Value, info);
+ {% elif attribute.has_cross_origin_setter %}
+ {{cpp_class_or_partial}}V8Internal::{{attribute.name}}AttributeSetter{{world_suffix}}(v8Value, V8CrossOriginSetterInfo(info.GetIsolate(), info.Holder()));
{% else %}
{{cpp_class_or_partial}}V8Internal::{{attribute.name}}AttributeSetter{{world_suffix}}(v8Value, info);
{% endif %}

Powered by Google App Engine
This is Rietveld 408576698