| OLD | NEW |
| 1 {% filter format_blink_cpp_source_code %} | 1 {% filter format_blink_cpp_source_code %} |
| 2 | 2 |
| 3 {% include 'copyright_block.txt' %} | 3 {% include 'copyright_block.txt' %} |
| 4 #include "{{v8_class_or_partial}}.h" | 4 #include "{{v8_class_or_partial}}.h" |
| 5 | 5 |
| 6 {% for filename in cpp_includes if filename != '%s.h' % cpp_class_or_partial %} | 6 {% for filename in cpp_includes if filename != '%s.h' % cpp_class_or_partial %} |
| 7 #include "{{filename}}" | 7 #include "{{filename}}" |
| 8 {% endfor %} | 8 {% endfor %} |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 | 237 |
| 238 {% if has_access_check_callbacks and not is_partial %} | 238 {% if has_access_check_callbacks and not is_partial %} |
| 239 bool {{v8_class_or_partial}}::securityCheck(v8::Local<v8::Context> accessingCont
ext, v8::Local<v8::Object> accessedObject, v8::Local<v8::Value> data) { | 239 bool {{v8_class_or_partial}}::securityCheck(v8::Local<v8::Context> accessingCont
ext, v8::Local<v8::Object> accessedObject, v8::Local<v8::Value> data) { |
| 240 {% if interface_name == 'Window' %} | 240 {% if interface_name == 'Window' %} |
| 241 v8::Isolate* isolate = v8::Isolate::GetCurrent(); | 241 v8::Isolate* isolate = v8::Isolate::GetCurrent(); |
| 242 v8::Local<v8::Object> window = V8Window::findInstanceInPrototypeChain(accessed
Object, isolate); | 242 v8::Local<v8::Object> window = V8Window::findInstanceInPrototypeChain(accessed
Object, isolate); |
| 243 if (window.IsEmpty()) | 243 if (window.IsEmpty()) |
| 244 return false; // the frame is gone. | 244 return false; // the frame is gone. |
| 245 | 245 |
| 246 const DOMWindow* targetWindow = V8Window::toImpl(window); | 246 const DOMWindow* targetWindow = V8Window::toImpl(window); |
| 247 return BindingSecurity::shouldAllowAccessTo(toLocalDOMWindow(toDOMWindow(acces
singContext)), targetWindow, BindingSecurity::ErrorReportOption::DoNotReport); | 247 return BindingSecurity::shouldAllowAccessTo(toLocalDOMWindow(accessingContext)
, targetWindow, BindingSecurity::ErrorReportOption::DoNotReport); |
| 248 {% elif interface_name == 'Location' %} | 248 {% elif interface_name == 'Location' %} |
| 249 {{cpp_class}}* impl = {{v8_class}}::toImpl(accessedObject); | 249 {{cpp_class}}* impl = {{v8_class}}::toImpl(accessedObject); |
| 250 return BindingSecurity::shouldAllowAccessTo(toLocalDOMWindow(toDOMWindow(acces
singContext)), impl, BindingSecurity::ErrorReportOption::DoNotReport); | 250 return BindingSecurity::shouldAllowAccessTo(toLocalDOMWindow(accessingContext)
, impl, BindingSecurity::ErrorReportOption::DoNotReport); |
| 251 {% else %} | 251 {% else %} |
| 252 #error "Unexpected security check for interface {{interface_name}}" | 252 #error "Unexpected security check for interface {{interface_name}}" |
| 253 {% endif %} | 253 {% endif %} |
| 254 } | 254 } |
| 255 | 255 |
| 256 {% if has_cross_origin_named_getter %} | 256 {% if has_cross_origin_named_getter %} |
| 257 void {{v8_class_or_partial}}::crossOriginNamedGetter(v8::Local<v8::Name> name, c
onst v8::PropertyCallbackInfo<v8::Value>& info) { | 257 void {{v8_class_or_partial}}::crossOriginNamedGetter(v8::Local<v8::Name> name, c
onst v8::PropertyCallbackInfo<v8::Value>& info) { |
| 258 if (!name->IsString()) | 258 if (!name->IsString()) |
| 259 return; | 259 return; |
| 260 const AtomicString& propertyName = toCoreAtomicString(name.As<v8::String>()); | 260 const AtomicString& propertyName = toCoreAtomicString(name.As<v8::String>()); |
| (...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 738 {% endif %} | 738 {% endif %} |
| 739 } | 739 } |
| 740 {% endif %} | 740 {% endif %} |
| 741 | 741 |
| 742 {% endblock %} | 742 {% endblock %} |
| 743 {##############################################################################} | 743 {##############################################################################} |
| 744 {% block partial_interface %}{% endblock %} | 744 {% block partial_interface %}{% endblock %} |
| 745 } // namespace blink | 745 } // namespace blink |
| 746 | 746 |
| 747 {% endfilter %}{# format_blink_cpp_source_code #} | 747 {% endfilter %}{# format_blink_cpp_source_code #} |
| OLD | NEW |