| OLD | NEW |
| 1 {##############################################################################} | 1 {##############################################################################} |
| 2 {% macro attribute_getter(attribute, world_suffix) %} | 2 {% macro attribute_getter(attribute, world_suffix) %} |
| 3 {% filter conditional(attribute.conditional_string) %} | 3 {% filter conditional(attribute.conditional_string) %} |
| 4 static void {{attribute.name}}AttributeGetter{{world_suffix}}(v8::Local<v8::Stri
ng> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 4 static void {{attribute.name}}AttributeGetter{{world_suffix}}(v8::Local<v8::Stri
ng> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 5 { | 5 { |
| 6 {% if attribute.is_unforgeable %} | 6 {% if attribute.is_unforgeable %} |
| 7 v8::Handle<v8::Object> holder = info.This()->FindInstanceInPrototypeChain({{
v8_class_name}}::GetTemplate(info.GetIsolate(), worldType(info.GetIsolate()))); | 7 v8::Handle<v8::Object> holder = info.This()->FindInstanceInPrototypeChain({{
v8_class_name}}::GetTemplate(info.GetIsolate(), worldType(info.GetIsolate()))); |
| 8 if (holder.IsEmpty()) | 8 if (holder.IsEmpty()) |
| 9 return; | 9 return; |
| 10 {{cpp_class_name}}* imp = {{v8_class_name}}::toNative(holder); | 10 {{cpp_class_name}}* imp = {{v8_class_name}}::toNative(holder); |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 {{cpp_class_name}}V8Internal::{{attribute.name}}AttributeGetter{{world_suffi
x}}(name, info); | 97 {{cpp_class_name}}V8Internal::{{attribute.name}}AttributeGetter{{world_suffi
x}}(name, info); |
| 98 {% endif %} | 98 {% endif %} |
| 99 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 99 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 100 } | 100 } |
| 101 {% endfilter %} | 101 {% endfilter %} |
| 102 {% endmacro %} | 102 {% endmacro %} |
| 103 | 103 |
| 104 | 104 |
| 105 {##############################################################################} | 105 {##############################################################################} |
| 106 {% macro attribute_setter(attribute, world_suffix) %} | 106 {% macro attribute_setter(attribute, world_suffix) %} |
| 107 {% filter conditional(attribute.conditional_string) %} |
| 107 static void {{attribute.name}}AttributeSetter{{world_suffix}}(v8::Local<v8::Stri
ng> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& in
fo) | 108 static void {{attribute.name}}AttributeSetter{{world_suffix}}(v8::Local<v8::Stri
ng> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& in
fo) |
| 108 { | 109 { |
| 109 {{cpp_class_name}}* imp = {{v8_class_name}}::toNative(info.Holder()); | 110 {{cpp_class_name}}* imp = {{v8_class_name}}::toNative(info.Holder()); |
| 110 {{attribute.v8_value_to_local_cpp_value}}; | 111 {{attribute.v8_value_to_local_cpp_value}}; |
| 111 {% if attribute.is_call_with_script_execution_context %} | 112 {% if attribute.is_call_with_script_execution_context %} |
| 112 ExecutionContext* scriptContext = getExecutionContext(); | 113 ExecutionContext* scriptContext = getExecutionContext(); |
| 113 {% endif %} | 114 {% endif %} |
| 114 {{attribute.cpp_setter}}; | 115 {{attribute.cpp_setter}}; |
| 115 {% if attribute.cached_attribute_validation_method %} | 116 {% if attribute.cached_attribute_validation_method %} |
| 116 info.Holder()->DeleteHiddenValue(v8::String::NewSymbol("{{attribute.name}}")
); // Invalidate the cached value. | 117 info.Holder()->DeleteHiddenValue(v8::String::NewSymbol("{{attribute.name}}")
); // Invalidate the cached value. |
| 117 {% endif %} | 118 {% endif %} |
| 118 } | 119 } |
| 120 {% endfilter %} |
| 119 {% endmacro %} | 121 {% endmacro %} |
| 120 | 122 |
| 121 | 123 |
| 122 {##############################################################################} | 124 {##############################################################################} |
| 123 {% macro attribute_setter_callback(attribute, world_suffix) %} | 125 {% macro attribute_setter_callback(attribute, world_suffix) %} |
| 126 {% filter conditional(attribute.conditional_string) %} |
| 124 static void {{attribute.name}}AttributeSetterCallback{{world_suffix}}(v8::Local<
v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<v
oid>& info) | 127 static void {{attribute.name}}AttributeSetterCallback{{world_suffix}}(v8::Local<
v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<v
oid>& info) |
| 125 { | 128 { |
| 126 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 129 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 127 {{cpp_class_name}}V8Internal::{{attribute.name}}AttributeSetter{{world_suffi
x}}(name, jsValue, info); | 130 {{cpp_class_name}}V8Internal::{{attribute.name}}AttributeSetter{{world_suffi
x}}(name, jsValue, info); |
| 128 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 131 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 129 } | 132 } |
| 133 {% endfilter %} |
| 130 {% endmacro %} | 134 {% endmacro %} |
| OLD | NEW |