Chromium Code Reviews| 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 5acc271f5b09ce22838c48f5bbefb94d0b58689a..86c62839d3f51f6b9957341626a8f9b63b622db7 100644 |
| --- a/third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl |
| +++ b/third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl |
| @@ -43,8 +43,12 @@ const v8::FunctionCallbackInfo<v8::Value>& info |
| {% endif %} |
| {% if not attribute.is_static %} |
| + {% if interface_name == 'Window' and not attribute.has_cross_origin_getter %} |
| + LocalDOMWindow* impl = toLocalDOMWindow({{v8_class}}::toImpl(holder)); |
|
haraken
2017/02/03 09:03:18
Add a comment and explain what it's doing.
dcheng
2017/02/03 10:04:26
Done.
|
| + {% else %} |
| {{cpp_class}}* impl = {{v8_class}}::toImpl(holder); |
| {% endif %} |
| + {% endif %} |
| {% if attribute.cached_attribute_validation_method %} |
| // [CachedAttribute] |
| @@ -282,9 +286,13 @@ v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info |
| if (!impl) |
| return; |
| {% else %} |
| + {% if interface_name == 'Window' and not attribute.has_cross_origin_setter %} |
| + LocalDOMWindow* impl = toLocalDOMWindow({{v8_class}}::toImpl(holder)); |
| + {% else %} |
| {{cpp_class}}* impl = {{v8_class}}::toImpl(holder); |
| {% endif %} |
| {% endif %} |
| + {% endif %} |
| {% if attribute.is_check_security_for_receiver and not attribute.is_data_type_property %} |
| // Perform a security check for the receiver object. |