| OLD | NEW |
| 1 {% include 'copyright_block.txt' %} | 1 {% include 'copyright_block.txt' %} |
| 2 #include "config.h" | 2 #include "config.h" |
| 3 {% filter conditional(conditional_string) %} | 3 {% filter conditional(conditional_string) %} |
| 4 #include "{{v8_class}}.h" | 4 #include "{{v8_class}}.h" |
| 5 | 5 |
| 6 {% for filename in cpp_includes %} | 6 {% for filename in cpp_includes %} |
| 7 #include "{{filename}}" | 7 #include "{{filename}}" |
| 8 {% endfor %} | 8 {% endfor %} |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 {{return_default}}; | 54 {{return_default}}; |
| 55 } | 55 } |
| 56 {% endfor %} | 56 {% endfor %} |
| 57 {% if method.arguments %} | 57 {% if method.arguments %} |
| 58 v8::Local<v8::Value> argv[] = { {{method.arguments | join(', ', 'handle')}}
}; | 58 v8::Local<v8::Value> argv[] = { {{method.arguments | join(', ', 'handle')}}
}; |
| 59 {% else %} | 59 {% else %} |
| 60 {# Empty array initializers are illegal, and don't compile in MSVC. #} | 60 {# Empty array initializers are illegal, and don't compile in MSVC. #} |
| 61 v8::Local<v8::Value> *argv = 0; | 61 v8::Local<v8::Value> *argv = 0; |
| 62 {% endif %} | 62 {% endif %} |
| 63 | 63 |
| 64 {% set this_handle_parameter = 'thisHandle, ' if method.call_with_this_handl
e else 'm_scriptState->context()->Global(), ' %} | 64 {% set this_handle_parameter = 'thisHandle, ' if method.call_with_this_handl
e else 'v8::Undefined(m_scriptState->isolate()), ' %} |
| 65 {% if method.idl_type == 'boolean' %} | 65 {% if method.idl_type == 'boolean' %} |
| 66 v8::TryCatch exceptionCatcher; | 66 v8::TryCatch exceptionCatcher; |
| 67 exceptionCatcher.SetVerbose(true); | 67 exceptionCatcher.SetVerbose(true); |
| 68 ScriptController::callFunction(m_scriptState->executionContext(), m_callback
.newLocal(m_scriptState->isolate()), {{this_handle_parameter}}{{method.arguments
| length}}, argv, m_scriptState->isolate()); | 68 ScriptController::callFunction(m_scriptState->executionContext(), m_callback
.newLocal(m_scriptState->isolate()), {{this_handle_parameter}}{{method.arguments
| length}}, argv, m_scriptState->isolate()); |
| 69 return !exceptionCatcher.HasCaught(); | 69 return !exceptionCatcher.HasCaught(); |
| 70 {% else %}{# void #} | 70 {% else %}{# void #} |
| 71 ScriptController::callFunction(m_scriptState->executionContext(), m_callback
.newLocal(m_scriptState->isolate()), {{this_handle_parameter}}{{method.arguments
| length}}, argv, m_scriptState->isolate()); | 71 ScriptController::callFunction(m_scriptState->executionContext(), m_callback
.newLocal(m_scriptState->isolate()), {{this_handle_parameter}}{{method.arguments
| length}}, argv, m_scriptState->isolate()); |
| 72 {% endif %} | 72 {% endif %} |
| 73 } | 73 } |
| 74 | 74 |
| 75 {% endfor %} | 75 {% endfor %} |
| 76 } // namespace blink | 76 } // namespace blink |
| 77 {% endfilter %} | 77 {% endfilter %} |
| OLD | NEW |