| OLD | NEW |
| 1 {% extends 'interface_base.cpp' %} | 1 {% extends 'interface_base.cpp' %} |
| 2 | 2 |
| 3 | 3 |
| 4 {##############################################################################} | 4 {##############################################################################} |
| 5 {% block security_check_functions %} | 5 {% block security_check_functions %} |
| 6 {% if has_access_check_callbacks %} | 6 {% if has_access_check_callbacks %} |
| 7 bool indexedSecurityCheck(v8::Local<v8::Object> host, uint32_t index, v8::Access
Type type, v8::Local<v8::Value>) | 7 bool indexedSecurityCheck(v8::Local<v8::Object> host, uint32_t index, v8::Access
Type type, v8::Local<v8::Value>) |
| 8 { | 8 { |
| 9 {{cpp_class}}* impl = {{v8_class}}::toImpl(host); | 9 {{cpp_class}}* impl = {{v8_class}}::toImpl(host); |
| 10 return BindingSecurity::shouldAllowAccessToFrame(v8::Isolate::GetCurrent(),
impl->frame(), DoNotReportSecurityError); | 10 return BindingSecurity::shouldAllowAccessToFrame(v8::Isolate::GetCurrent(),
impl->frame(), DoNotReportSecurityError); |
| (...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 446 | 446 |
| 447 | 447 |
| 448 {##############################################################################} | 448 {##############################################################################} |
| 449 {% from 'methods.cpp' import generate_constructor with context %} | 449 {% from 'methods.cpp' import generate_constructor with context %} |
| 450 {% block named_constructor %} | 450 {% block named_constructor %} |
| 451 {% if named_constructor %} | 451 {% if named_constructor %} |
| 452 {% set to_active_dom_object = '%s::toActiveDOMObject' % v8_class | 452 {% set to_active_dom_object = '%s::toActiveDOMObject' % v8_class |
| 453 if is_active_dom_object else '0' %} | 453 if is_active_dom_object else '0' %} |
| 454 {% set to_event_target = '%s::toEventTarget' % v8_class | 454 {% set to_event_target = '%s::toEventTarget' % v8_class |
| 455 if is_event_target else '0' %} | 455 if is_event_target else '0' %} |
| 456 const WrapperTypeInfo {{v8_class}}Constructor::wrapperTypeInfo = { gin::kEmbedde
rBlink, {{v8_class}}Constructor::domTemplate, {{v8_class}}::refObject, {{v8_clas
s}}::derefObject, {{v8_class}}::createPersistentHandle, {{to_active_dom_object}}
, {{to_event_target}}, 0, {{v8_class}}::installConditionallyEnabledMethods, {{v8
_class}}::installConditionallyEnabledProperties, 0, WrapperTypeInfo::WrapperType
ObjectPrototype, WrapperTypeInfo::{{wrapper_class_id}}, WrapperTypeInfo::{{lifet
ime}}, WrapperTypeInfo::{{gc_type}} }; | 456 const WrapperTypeInfo {{v8_class}}Constructor::wrapperTypeInfo = { gin::kEmbedde
rBlink, {{v8_class}}Constructor::domTemplate, {{v8_class}}::refObject, {{v8_clas
s}}::derefObject, {{v8_class}}::trace, {{to_active_dom_object}}, {{to_event_targ
et}}, 0, {{v8_class}}::installConditionallyEnabledMethods, {{v8_class}}::install
ConditionallyEnabledProperties, 0, WrapperTypeInfo::WrapperTypeObjectPrototype,
WrapperTypeInfo::{{wrapper_class_id}}, WrapperTypeInfo::{{lifetime}}, WrapperTyp
eInfo::{{gc_type}} }; |
| 457 | 457 |
| 458 {{generate_constructor(named_constructor)}} | 458 {{generate_constructor(named_constructor)}} |
| 459 v8::Handle<v8::FunctionTemplate> {{v8_class}}Constructor::domTemplate(v8::Isolat
e* isolate) | 459 v8::Handle<v8::FunctionTemplate> {{v8_class}}Constructor::domTemplate(v8::Isolat
e* isolate) |
| 460 { | 460 { |
| 461 static int domTemplateKey; // This address is used for a key to look up the
dom template. | 461 static int domTemplateKey; // This address is used for a key to look up the
dom template. |
| 462 V8PerIsolateData* data = V8PerIsolateData::from(isolate); | 462 V8PerIsolateData* data = V8PerIsolateData::from(isolate); |
| 463 v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(&domTempl
ateKey); | 463 v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(&domTempl
ateKey); |
| 464 if (!result.IsEmpty()) | 464 if (!result.IsEmpty()) |
| 465 return result; | 465 return result; |
| 466 | 466 |
| (...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 936 { | 936 { |
| 937 {% if gc_type == 'WillBeGarbageCollectedObject' %} | 937 {% if gc_type == 'WillBeGarbageCollectedObject' %} |
| 938 #if !ENABLE(OILPAN) | 938 #if !ENABLE(OILPAN) |
| 939 internalPointer->toImpl<{{cpp_class}}>()->deref(); | 939 internalPointer->toImpl<{{cpp_class}}>()->deref(); |
| 940 #endif | 940 #endif |
| 941 {% elif gc_type == 'RefCountedObject' %} | 941 {% elif gc_type == 'RefCountedObject' %} |
| 942 internalPointer->toImpl<{{cpp_class}}>()->deref(); | 942 internalPointer->toImpl<{{cpp_class}}>()->deref(); |
| 943 {% endif %} | 943 {% endif %} |
| 944 } | 944 } |
| 945 | 945 |
| 946 WrapperPersistentNode* {{v8_class}}::createPersistentHandle(ScriptWrappableBase*
internalPointer) | |
| 947 { | |
| 948 {% if gc_type == 'GarbageCollectedObject' %} | |
| 949 return WrapperPersistent<{{cpp_class}}>::create(internalPointer->toImpl<{{cp
p_class}}>()); | |
| 950 {% elif gc_type == 'WillBeGarbageCollectedObject' %} | |
| 951 #if ENABLE(OILPAN) | |
| 952 return WrapperPersistent<{{cpp_class}}>::create(internalPointer->toImpl<{{cp
p_class}}>()); | |
| 953 #else | |
| 954 ASSERT_NOT_REACHED(); | |
| 955 return 0; | |
| 956 #endif | |
| 957 {% elif gc_type == 'RefCountedObject' %} | |
| 958 ASSERT_NOT_REACHED(); | |
| 959 return 0; | |
| 960 {% endif %} | |
| 961 } | |
| 962 | |
| 963 template<> | 946 template<> |
| 964 v8::Handle<v8::Value> toV8NoInline({{cpp_class}}* impl, v8::Handle<v8::Object> c
reationContext, v8::Isolate* isolate) | 947 v8::Handle<v8::Value> toV8NoInline({{cpp_class}}* impl, v8::Handle<v8::Object> c
reationContext, v8::Isolate* isolate) |
| 965 { | 948 { |
| 966 return toV8(impl, creationContext, isolate); | 949 return toV8(impl, creationContext, isolate); |
| 967 } | 950 } |
| 968 | 951 |
| 969 {% endblock %} | 952 {% endblock %} |
| OLD | NEW |