| OLD | NEW |
| 1 {% macro v8_value_to_local_cpp_value(thing) %} | 1 {% macro v8_value_to_local_cpp_value(thing) %} |
| 2 {# This indirection is just to avoid spurious white-space lines. #} | 2 {# This indirection is just to avoid spurious white-space lines. #} |
| 3 {{generate_v8_value_to_local_cpp_value(thing) | trim}} | 3 {{generate_v8_value_to_local_cpp_value(thing) | trim}} |
| 4 {%- endmacro %} | 4 {%- endmacro %} |
| 5 | 5 |
| 6 | 6 |
| 7 {% macro generate_v8_value_to_local_cpp_value(thing) %} | 7 {% macro generate_v8_value_to_local_cpp_value(thing) %} |
| 8 {% set item = thing.v8_value_to_local_cpp_value or thing %} | 8 {% set item = thing.v8_value_to_local_cpp_value or thing %} |
| 9 {% if item.error_message %} | 9 {% if item.error_message %} |
| 10 /* {{item.error_message}} */ | 10 /* {{item.error_message}} */ |
| 11 {% else %} | 11 {% else %} |
| 12 {% if item.declare_variable %} | 12 {% if item.declare_variable %} |
| 13 {% if item.assign_expression %} | 13 {% if item.assign_expression %} |
| 14 {{item.cpp_type}} {{item.cpp_name}} = {{item.assign_expression}}; | 14 {{item.cpp_type}} {{item.cpp_name}} = {{item.assign_expression}}; |
| 15 {% else %} | 15 {% else %} |
| 16 {{item.cpp_type}} {{item.cpp_name}}; | 16 {{item.cpp_type}} {{item.cpp_name}}; |
| 17 {% endif %} | 17 {% endif %} |
| 18 {% else %}{# item.declare_variable #} | 18 {% else %}{# item.declare_variable #} |
| 19 {% if item.assign_expression %} | 19 {% if item.assign_expression %} |
| 20 {{item.cpp_name}} = {{item.assign_expression}}; | 20 {{item.cpp_name}} = {{item.assign_expression}}; |
| 21 {% endif %} | 21 {% endif %} |
| 22 {% endif %}{# item.declare_variable #} | 22 {% endif %}{# item.declare_variable #} |
| 23 {% if item.set_expression %} | 23 {% if item.set_expression %} |
| 24 {{item.set_expression}}; | 24 {{item.set_expression}}; |
| 25 {% endif %} | 25 {% endif %} |
| 26 {% if item.check_expression %} | 26 {% if item.check_expression %} |
| 27 if ({{item.check_expression}}) | 27 if ({{item.check_expression}}) |
| 28 return{% if item.return_expression %} {{item.return_expression}}{% endif %}; | 28 return{% if item.return_expression %} {{item.return_expression}}{% endif %}; |
| 29 {% endif %}{# item.check_expression #} | 29 {% endif %}{# item.check_expression #} |
| 30 {% endif %}{# item.error_message #} | 30 {% endif %}{# item.error_message #} |
| 31 {% endmacro %} | 31 {% endmacro %} |
| 32 | 32 |
| 33 | 33 |
| 34 {% macro declare_enum_validation_variable(enum_values, enum_variable='validValue
s') %} | 34 {% macro declare_enum_validation_variable(enum_values, enum_variable='validValue
s') %} |
| 35 const char* {{enum_variable}}[] = { | 35 const char* {{enum_variable}}[] = { |
| 36 {% for enum_value in enum_values %} | 36 {% for enum_value in enum_values %} |
| 37 "{{enum_value}}", | 37 "{{enum_value}}", |
| 38 {% endfor %} | 38 {% endfor %} |
| (...skipping 13 matching lines...) Expand all Loading... |
| 52 {% set property_location_list = property_location_list + ['V8DOMConfiguration::O
nInterface'] %} | 52 {% set property_location_list = property_location_list + ['V8DOMConfiguration::O
nInterface'] %} |
| 53 {% endif %} | 53 {% endif %} |
| 54 {{property_location_list | join(' | ')}} | 54 {{property_location_list | join(' | ')}} |
| 55 {%- endmacro %} | 55 {%- endmacro %} |
| 56 | 56 |
| 57 | 57 |
| 58 {% macro check_origin_trial(member, isolate="info.GetIsolate()") -%} | 58 {% macro check_origin_trial(member, isolate="info.GetIsolate()") -%} |
| 59 ExecutionContext* executionContext = currentExecutionContext({{isolate}}); | 59 ExecutionContext* executionContext = currentExecutionContext({{isolate}}); |
| 60 String errorMessage; | 60 String errorMessage; |
| 61 if (!{{member.origin_trial_enabled_function}}(executionContext, errorMessage)) { | 61 if (!{{member.origin_trial_enabled_function}}(executionContext, errorMessage)) { |
| 62 v8SetReturnValue(info, v8::Undefined(info.GetIsolate())); | 62 v8SetReturnValue(info, v8::Undefined(info.GetIsolate())); |
| 63 if (!errorMessage.isEmpty()) { | 63 if (!errorMessage.isEmpty()) { |
| 64 executionContext->addConsoleMessage(ConsoleMessage::create(JSMessageSour
ce, ErrorMessageLevel, errorMessage)); | 64 executionContext->addConsoleMessage(ConsoleMessage::create(JSMessageSource,
ErrorMessageLevel, errorMessage)); |
| 65 } | 65 } |
| 66 return; | 66 return; |
| 67 } | 67 } |
| 68 {% endmacro %} | 68 {% endmacro %} |
| OLD | NEW |