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 18 matching lines...) Expand all Loading... |
29 {% for method in methods if not method.custom %} | 29 {% for method in methods if not method.custom %} |
30 {{method.cpp_type}} {{v8_class}}::{{method.name}}({{method.argument_declarations
| join(', ')}}) | 30 {{method.cpp_type}} {{v8_class}}::{{method.name}}({{method.argument_declarations
| join(', ')}}) |
31 { | 31 { |
32 {% set return_default = 'return true' | 32 {% set return_default = 'return true' |
33 if method.idl_type == 'boolean' else 'return' %}{# void #} | 33 if method.idl_type == 'boolean' else 'return' %}{# void #} |
34 if (!canInvokeCallback()) | 34 if (!canInvokeCallback()) |
35 {{return_default}}; | 35 {{return_default}}; |
36 | 36 |
37 v8::HandleScope handleScope(m_isolate); | 37 v8::HandleScope handleScope(m_isolate); |
38 | 38 |
39 v8::Handle<v8::Context> v8Context = toV8Context(executionContext(), m_world.
get()); | 39 v8::Handle<v8::Context> v8Context = toV8Context(executionContext(), *m_world
); |
40 if (v8Context.IsEmpty()) | 40 if (v8Context.IsEmpty()) |
41 {{return_default}}; | 41 {{return_default}}; |
42 | 42 |
43 v8::Context::Scope scope(v8Context); | 43 v8::Context::Scope scope(v8Context); |
44 {% if method.call_with_this_handle %} | 44 {% if method.call_with_this_handle %} |
45 v8::Handle<v8::Value> thisHandle = thisValue.v8Value(); | 45 v8::Handle<v8::Value> thisHandle = thisValue.v8Value(); |
46 if (thisHandle.IsEmpty()) { | 46 if (thisHandle.IsEmpty()) { |
47 if (!isScriptControllerTerminating()) | 47 if (!isScriptControllerTerminating()) |
48 CRASH(); | 48 CRASH(); |
49 {{return_default}}; | 49 {{return_default}}; |
(...skipping 18 matching lines...) Expand all Loading... |
68 {% if method.idl_type == 'boolean' %} | 68 {% if method.idl_type == 'boolean' %} |
69 return invokeCallback(m_callback.newLocal(m_isolate), {{this_handle_paramete
r}}{{method.arguments | length}}, argv, executionContext(), m_isolate); | 69 return invokeCallback(m_callback.newLocal(m_isolate), {{this_handle_paramete
r}}{{method.arguments | length}}, argv, executionContext(), m_isolate); |
70 {% else %}{# void #} | 70 {% else %}{# void #} |
71 invokeCallback(m_callback.newLocal(m_isolate), {{this_handle_parameter}}{{me
thod.arguments | length}}, argv, executionContext(), m_isolate); | 71 invokeCallback(m_callback.newLocal(m_isolate), {{this_handle_parameter}}{{me
thod.arguments | length}}, argv, executionContext(), m_isolate); |
72 {% endif %} | 72 {% endif %} |
73 } | 73 } |
74 | 74 |
75 {% endfor %} | 75 {% endfor %} |
76 } // namespace WebCore | 76 } // namespace WebCore |
77 {% endfilter %} | 77 {% endfilter %} |
OLD | NEW |