| OLD | NEW |
| 1 {% include 'copyright_block.txt' %} | 1 {% include 'copyright_block.txt' %} |
| 2 #include "{{v8_class}}.h" | 2 #include "{{v8_class}}.h" |
| 3 | 3 |
| 4 {% for filename in cpp_includes %} | 4 {% for filename in cpp_includes %} |
| 5 #include "{{filename}}" | 5 #include "{{filename}}" |
| 6 {% endfor %} | 6 {% endfor %} |
| 7 | 7 |
| 8 namespace blink { | 8 namespace blink { |
| 9 | 9 |
| 10 {{v8_class}}::{{v8_class}}(v8::Local<v8::Function> callback, ScriptState* script
State) | 10 {{v8_class}}::{{v8_class}}(v8::Local<v8::Function> callback, ScriptState* script
State) |
| 11 : ActiveDOMCallback(scriptState->executionContext()) | 11 : ActiveDOMCallback(scriptState->getExecutionContext()) |
| 12 , m_scriptState(scriptState) | 12 , m_scriptState(scriptState) |
| 13 { | 13 { |
| 14 m_callback.set(scriptState->isolate(), callback); | 14 m_callback.set(scriptState->isolate(), callback); |
| 15 } | 15 } |
| 16 | 16 |
| 17 {{v8_class}}::~{{v8_class}}() | 17 {{v8_class}}::~{{v8_class}}() |
| 18 { | 18 { |
| 19 } | 19 } |
| 20 | 20 |
| 21 DEFINE_TRACE({{v8_class}}) | 21 DEFINE_TRACE({{v8_class}}) |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 v8::Local<v8::Value> argv[] = { {{method.arguments | join(', ', 'handle')}}
}; | 56 v8::Local<v8::Value> argv[] = { {{method.arguments | join(', ', 'handle')}}
}; |
| 57 {% else %} | 57 {% else %} |
| 58 {# Empty array initializers are illegal, and don't compile in MSVC. #} | 58 {# Empty array initializers are illegal, and don't compile in MSVC. #} |
| 59 v8::Local<v8::Value> *argv = 0; | 59 v8::Local<v8::Value> *argv = 0; |
| 60 {% endif %} | 60 {% endif %} |
| 61 | 61 |
| 62 {% set this_handle_parameter = 'thisHandle, ' if method.call_with_this_handl
e else 'v8::Undefined(m_scriptState->isolate()), ' %} | 62 {% set this_handle_parameter = 'thisHandle, ' if method.call_with_this_handl
e else 'v8::Undefined(m_scriptState->isolate()), ' %} |
| 63 {% if method.idl_type == 'boolean' %} | 63 {% if method.idl_type == 'boolean' %} |
| 64 v8::TryCatch exceptionCatcher(m_scriptState->isolate()); | 64 v8::TryCatch exceptionCatcher(m_scriptState->isolate()); |
| 65 exceptionCatcher.SetVerbose(true); | 65 exceptionCatcher.SetVerbose(true); |
| 66 ScriptController::callFunction(m_scriptState->executionContext(), m_callback
.newLocal(m_scriptState->isolate()), {{this_handle_parameter}}{{method.arguments
| length}}, argv, m_scriptState->isolate()); | 66 ScriptController::callFunction(m_scriptState->getExecutionContext(), m_callb
ack.newLocal(m_scriptState->isolate()), {{this_handle_parameter}}{{method.argume
nts | length}}, argv, m_scriptState->isolate()); |
| 67 return !exceptionCatcher.HasCaught(); | 67 return !exceptionCatcher.HasCaught(); |
| 68 {% else %}{# void #} | 68 {% else %}{# void #} |
| 69 ScriptController::callFunction(m_scriptState->executionContext(), m_callback
.newLocal(m_scriptState->isolate()), {{this_handle_parameter}}{{method.arguments
| length}}, argv, m_scriptState->isolate()); | 69 ScriptController::callFunction(m_scriptState->getExecutionContext(), m_callb
ack.newLocal(m_scriptState->isolate()), {{this_handle_parameter}}{{method.argume
nts | length}}, argv, m_scriptState->isolate()); |
| 70 {% endif %} | 70 {% endif %} |
| 71 } | 71 } |
| 72 | 72 |
| 73 {% endfor %} | 73 {% endfor %} |
| 74 } // namespace blink | 74 } // namespace blink |
| OLD | NEW |