| OLD | NEW |
| 1 {% extends 'interface_base.cpp' %} | 1 {% extends 'interface_base.cpp' %} |
| 2 | 2 |
| 3 | 3 |
| 4 {##############################################################################} | 4 {##############################################################################} |
| 5 {% macro attribute_configuration(attribute) %} | 5 {% macro attribute_configuration(attribute) %} |
| 6 {% set getter_callback = | 6 {% set getter_callback = |
| 7 '%sV8Internal::%sAttributeGetterCallback' % | 7 '%sV8Internal::%sAttributeGetterCallback' % |
| 8 (interface_name, attribute.name) | 8 (interface_name, attribute.name) |
| 9 if not attribute.constructor_type else | 9 if not attribute.constructor_type else |
| 10 '{0}V8Internal::{0}ConstructorGetter'.format(interface_name) %} | 10 '{0}V8Internal::{0}ConstructorGetter'.format(interface_name) %} |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 {% endif %} | 151 {% endif %} |
| 152 {% endblock %} | 152 {% endblock %} |
| 153 | 153 |
| 154 | 154 |
| 155 {##############################################################################} | 155 {##############################################################################} |
| 156 {% block constructor_callback %} | 156 {% block constructor_callback %} |
| 157 {% if has_constructor %} | 157 {% if has_constructor %} |
| 158 void {{v8_class}}::constructorCallback(const v8::FunctionCallbackInfo<v8::Value>
& info) | 158 void {{v8_class}}::constructorCallback(const v8::FunctionCallbackInfo<v8::Value>
& info) |
| 159 { | 159 { |
| 160 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "DOMConstructor"); | 160 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "DOMConstructor"); |
| 161 {% if measure_as %} |
| 162 UseCounter::count(activeDOMWindow(), UseCounter::{{measure_as}}); |
| 163 {% endif %} |
| 161 if (!info.IsConstructCall()) { | 164 if (!info.IsConstructCall()) { |
| 162 throwTypeError(ExceptionMessages::failedToConstruct("{{interface_name}}"
, "Please use the 'new' operator, this DOM object constructor cannot be called a
s a function."), info.GetIsolate()); | 165 throwTypeError(ExceptionMessages::failedToConstruct("{{interface_name}}"
, "Please use the 'new' operator, this DOM object constructor cannot be called a
s a function."), info.GetIsolate()); |
| 163 return; | 166 return; |
| 164 } | 167 } |
| 165 | 168 |
| 166 if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) { | 169 if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) { |
| 167 v8SetReturnValue(info, info.Holder()); | 170 v8SetReturnValue(info, info.Holder()); |
| 168 return; | 171 return; |
| 169 } | 172 } |
| 170 | 173 |
| (...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 571 fromInternalPointer(object)->deref(); | 574 fromInternalPointer(object)->deref(); |
| 572 } | 575 } |
| 573 | 576 |
| 574 template<> | 577 template<> |
| 575 v8::Handle<v8::Value> toV8NoInline({{cpp_class}}* impl, v8::Handle<v8::Object> c
reationContext, v8::Isolate* isolate) | 578 v8::Handle<v8::Value> toV8NoInline({{cpp_class}}* impl, v8::Handle<v8::Object> c
reationContext, v8::Isolate* isolate) |
| 576 { | 579 { |
| 577 return toV8(impl, creationContext, isolate); | 580 return toV8(impl, creationContext, isolate); |
| 578 } | 581 } |
| 579 | 582 |
| 580 {% endblock %} | 583 {% endblock %} |
| OLD | NEW |