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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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}}; |
50 } | 50 } |
51 ASSERT(thisHandle->IsObject()); | 51 ASSERT(thisHandle->IsObject()); |
52 {% endif %} | 52 {% endif %} |
53 {% for argument in method.arguments %} | 53 {% for argument in method.arguments %} |
54 {{argument.cpp_to_v8_conversion | indent}} | 54 v8::Handle<v8::Value> {{argument.handle}} = {{argument.cpp_value_to_v8_value
}}; |
55 if ({{argument.name}}Handle.IsEmpty()) { | 55 if ({{argument.handle}}.IsEmpty()) { |
56 if (!isScriptControllerTerminating()) | 56 if (!isScriptControllerTerminating()) |
57 CRASH(); | 57 CRASH(); |
58 {{return_default}}; | 58 {{return_default}}; |
59 } | 59 } |
60 {% endfor %} | 60 {% endfor %} |
61 {% if method.arguments %} | 61 {% if method.arguments %} |
62 v8::Handle<v8::Value> argv[] = { {{method.handles | join(', ')}} }; | 62 v8::Handle<v8::Value> argv[] = { {{method.arguments | join(', ', attribute='
handle')}} }; |
63 {% else %} | 63 {% else %} |
64 v8::Handle<v8::Value> *argv = 0; | 64 v8::Handle<v8::Value> *argv = 0; |
65 {% endif %} | 65 {% endif %} |
66 | 66 |
67 {% set this_handle_parameter = 'v8::Handle<v8::Object>::Cast(thisHandle), '
if method.call_with_this_handle else '' %} | 67 {% set this_handle_parameter = 'v8::Handle<v8::Object>::Cast(thisHandle), '
if method.call_with_this_handle else '' %} |
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 |