OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This file has been auto-generated by {{code_generator}}. DO NOT MODIFY! | 5 // This file has been auto-generated by {{code_generator}}. DO NOT MODIFY! |
6 | 6 |
7 #include "config.h" | 7 #include "config.h" |
8 {% filter conditional(conditional_string) %} | 8 {% filter conditional(conditional_string) %} |
9 #include "{{v8_class}}.h" | 9 #include "{{v8_class}}.h" |
10 | 10 |
(...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::Handle<v8::Value> argv[] = { {{method.arguments | join(', ', 'handle')}}
}; | 58 v8::Handle<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::Handle<v8::Value> *argv = 0; | 61 v8::Handle<v8::Value> *argv = 0; |
62 {% endif %} | 62 {% endif %} |
63 | 63 |
64 {% set this_handle_parameter = 'thisHandle, ' if method.call_with_this_handl
e else '' %} | 64 {% set this_handle_parameter = 'thisHandle, ' if method.call_with_this_handl
e else 'm_scriptState->context()->Global(), ' %} |
65 {% if method.idl_type == 'boolean' %} | 65 {% if method.idl_type == 'boolean' %} |
66 return invokeCallback(m_scriptState.get(), m_callback.newLocal(isolate), {{t
his_handle_parameter}}{{method.arguments | length}}, argv); | 66 v8::TryCatch exceptionCatcher; |
| 67 exceptionCatcher.SetVerbose(true); |
| 68 ScriptController::callFunction(m_scriptState->executionContext(), m_callback
.newLocal(isolate), {{this_handle_parameter}}{{method.arguments | length}}, argv
, m_scriptState->isolate()); |
| 69 return !exceptionCatcher.HasCaught(); |
67 {% else %}{# void #} | 70 {% else %}{# void #} |
68 invokeCallback(m_scriptState.get(), m_callback.newLocal(isolate), {{this_han
dle_parameter}}{{method.arguments | length}}, argv); | 71 ScriptController::callFunction(m_scriptState->executionContext(), m_callback
.newLocal(isolate), {{this_handle_parameter}}{{method.arguments | length}}, argv
, m_scriptState->isolate()); |
69 {% endif %} | 72 {% endif %} |
70 } | 73 } |
71 | 74 |
72 {% endfor %} | 75 {% endfor %} |
73 } // namespace WebCore | 76 } // namespace WebCore |
74 {% endfilter %} | 77 {% endfilter %} |
OLD | NEW |