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

Side by Side Diff: Source/bindings/templates/interface_base.cpp

Issue 825003002: [bindings] Eliminate usage of Handle<> from interface_base.cpp from bindings template. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@bindings-install-v8-class-template
Patch Set: Created 5 years, 12 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
« no previous file with comments | « no previous file | Source/bindings/tests/results/core/V8TestInterface.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file has been auto-generated by {{code_generator}}. DO NOT MODIFY! 5 // This file has been auto-generated by {{code_generator}}. DO NOT MODIFY!
6 6
7 #include "config.h" 7 #include "config.h"
8 {% filter conditional(conditional_string) %} 8 {% filter conditional(conditional_string) %}
9 #include "{{v8_class_or_partial}}.h" 9 #include "{{v8_class_or_partial}}.h"
10 10
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 {% if is_check_security %} 102 {% if is_check_security %}
103 {{cpp_class}}* impl = {{v8_class}}::toImpl(info.Holder()); 103 {{cpp_class}}* impl = {{v8_class}}::toImpl(info.Holder());
104 v8::String::Utf8Value attributeName(name); 104 v8::String::Utf8Value attributeName(name);
105 ExceptionState exceptionState(ExceptionState::SetterContext, *attributeName, "{{interface_name}}", info.Holder(), info.GetIsolate()); 105 ExceptionState exceptionState(ExceptionState::SetterContext, *attributeName, "{{interface_name}}", info.Holder(), info.GetIsolate());
106 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), impl->fram e(), exceptionState)) { 106 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), impl->fram e(), exceptionState)) {
107 exceptionState.throwIfNeeded(); 107 exceptionState.throwIfNeeded();
108 return; 108 return;
109 } 109 }
110 {% endif %} 110 {% endif %}
111 if (info.This()->IsObject()) 111 if (info.This()->IsObject())
112 v8::Handle<v8::Object>::Cast(info.This())->ForceSet(name, v8Value); 112 v8::Local<v8::Object>::Cast(info.This())->ForceSet(name, v8Value);
113 } 113 }
114 114
115 static void {{cpp_class}}ForceSetAttributeOnThisCallback(v8::Local<v8::String> n ame, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 115 static void {{cpp_class}}ForceSetAttributeOnThisCallback(v8::Local<v8::String> n ame, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
116 { 116 {
117 {{cpp_class_or_partial}}V8Internal::{{cpp_class}}ForceSetAttributeOnThis(nam e, v8Value, info); 117 {{cpp_class_or_partial}}V8Internal::{{cpp_class}}ForceSetAttributeOnThis(nam e, v8Value, info);
118 } 118 }
119 119
120 {% endif %} 120 {% endif %}
121 {% endblock %} 121 {% endblock %}
122 {##############################################################################} 122 {##############################################################################}
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 {% endif %}{# is_do_not_check_security #} 409 {% endif %}{# is_do_not_check_security #}
410 {% endfilter %}{# runtime_enabled() #} 410 {% endfilter %}{# runtime_enabled() #}
411 {% endfilter %}{# exposed() #} 411 {% endfilter %}{# exposed() #}
412 {% endfilter %}{# per_context_enabled() #} 412 {% endfilter %}{# per_context_enabled() #}
413 {% endfilter %}{# conditional() #} 413 {% endfilter %}{# conditional() #}
414 {% endfor %} 414 {% endfor %}
415 {% for attribute in attributes if attribute.is_static %} 415 {% for attribute in attributes if attribute.is_static %}
416 {% set getter_callback = '%sV8Internal::%sAttributeGetterCallback' % 416 {% set getter_callback = '%sV8Internal::%sAttributeGetterCallback' %
417 (cpp_class, attribute.name) %} 417 (cpp_class, attribute.name) %}
418 {% filter conditional(attribute.conditional_string) %} 418 {% filter conditional(attribute.conditional_string) %}
419 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "{{attribute .name}}"), {{getter_callback}}, {{attribute.setter_callback}}, v8::External::New (isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::Acces sorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); 419 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "{{attribute .name}}"), {{getter_callback}}, {{attribute.setter_callback}}, v8::External::New (isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Local<v8::Access orSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT));
420 {% endfilter %} 420 {% endfilter %}
421 {% endfor %} 421 {% endfor %}
422 {# Special interfaces #} 422 {# Special interfaces #}
423 {% if not is_partial %} 423 {% if not is_partial %}
424 {% if interface_name == 'Window' %} 424 {% if interface_name == 'Window' %}
425 425
426 prototypeTemplate->SetInternalFieldCount(V8Window::internalFieldCount); 426 prototypeTemplate->SetInternalFieldCount(V8Window::internalFieldCount);
427 functionTemplate->SetHiddenPrototype(true); 427 functionTemplate->SetHiddenPrototype(true);
428 instanceTemplate->SetInternalFieldCount(V8Window::internalFieldCount); 428 instanceTemplate->SetInternalFieldCount(V8Window::internalFieldCount);
429 // Set access check callbacks, but turned off initially. 429 // Set access check callbacks, but turned off initially.
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 {% endfor %} 467 {% endfor %}
468 {% for attribute in attributes if attribute.is_implemented_in_private_script %} 468 {% for attribute in attributes if attribute.is_implemented_in_private_script %}
469 {{attribute_getter_implemented_in_private_script(attribute)}} 469 {{attribute_getter_implemented_in_private_script(attribute)}}
470 {% if not attribute.is_read_only or attribute.put_forwards %} 470 {% if not attribute.is_read_only or attribute.put_forwards %}
471 {{attribute_setter_implemented_in_private_script(attribute)}} 471 {{attribute_setter_implemented_in_private_script(attribute)}}
472 {% endif %} 472 {% endif %}
473 {% endfor %} 473 {% endfor %}
474 {% block partial_interface %}{% endblock %} 474 {% block partial_interface %}{% endblock %}
475 } // namespace blink 475 } // namespace blink
476 {% endfilter %} 476 {% endfilter %}
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/tests/results/core/V8TestInterface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698