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_v8.py. DO NOT MODIFY! | 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! |
6 | 6 |
7 #include "config.h" | 7 #include "config.h" |
8 #include "V8TestCallbackInterface.h" | 8 #include "V8TestCallbackInterface.h" |
9 | 9 |
10 #include "V8TestInterfaceEmpty.h" | 10 #include "V8TestInterfaceEmpty.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 { | 30 { |
31 } | 31 } |
32 | 32 |
33 void V8TestCallbackInterface::voidMethod() | 33 void V8TestCallbackInterface::voidMethod() |
34 { | 34 { |
35 if (!canInvokeCallback()) | 35 if (!canInvokeCallback()) |
36 return; | 36 return; |
37 | 37 |
38 v8::HandleScope handleScope(m_isolate); | 38 v8::HandleScope handleScope(m_isolate); |
39 | 39 |
40 v8::Handle<v8::Context> v8Context = toV8Context(executionContext(), m_world.
get()); | 40 v8::Handle<v8::Context> v8Context = toV8Context(executionContext(), *m_world
); |
41 if (v8Context.IsEmpty()) | 41 if (v8Context.IsEmpty()) |
42 return; | 42 return; |
43 | 43 |
44 v8::Context::Scope scope(v8Context); | 44 v8::Context::Scope scope(v8Context); |
45 v8::Handle<v8::Value> *argv = 0; | 45 v8::Handle<v8::Value> *argv = 0; |
46 | 46 |
47 invokeCallback(m_callback.newLocal(m_isolate), 0, argv, executionContext(),
m_isolate); | 47 invokeCallback(m_callback.newLocal(m_isolate), 0, argv, executionContext(),
m_isolate); |
48 } | 48 } |
49 | 49 |
50 bool V8TestCallbackInterface::booleanMethod() | 50 bool V8TestCallbackInterface::booleanMethod() |
51 { | 51 { |
52 if (!canInvokeCallback()) | 52 if (!canInvokeCallback()) |
53 return true; | 53 return true; |
54 | 54 |
55 v8::HandleScope handleScope(m_isolate); | 55 v8::HandleScope handleScope(m_isolate); |
56 | 56 |
57 v8::Handle<v8::Context> v8Context = toV8Context(executionContext(), m_world.
get()); | 57 v8::Handle<v8::Context> v8Context = toV8Context(executionContext(), *m_world
); |
58 if (v8Context.IsEmpty()) | 58 if (v8Context.IsEmpty()) |
59 return true; | 59 return true; |
60 | 60 |
61 v8::Context::Scope scope(v8Context); | 61 v8::Context::Scope scope(v8Context); |
62 v8::Handle<v8::Value> *argv = 0; | 62 v8::Handle<v8::Value> *argv = 0; |
63 | 63 |
64 return invokeCallback(m_callback.newLocal(m_isolate), 0, argv, executionCont
ext(), m_isolate); | 64 return invokeCallback(m_callback.newLocal(m_isolate), 0, argv, executionCont
ext(), m_isolate); |
65 } | 65 } |
66 | 66 |
67 void V8TestCallbackInterface::voidMethodBooleanArg(bool boolArg) | 67 void V8TestCallbackInterface::voidMethodBooleanArg(bool boolArg) |
68 { | 68 { |
69 if (!canInvokeCallback()) | 69 if (!canInvokeCallback()) |
70 return; | 70 return; |
71 | 71 |
72 v8::HandleScope handleScope(m_isolate); | 72 v8::HandleScope handleScope(m_isolate); |
73 | 73 |
74 v8::Handle<v8::Context> v8Context = toV8Context(executionContext(), m_world.
get()); | 74 v8::Handle<v8::Context> v8Context = toV8Context(executionContext(), *m_world
); |
75 if (v8Context.IsEmpty()) | 75 if (v8Context.IsEmpty()) |
76 return; | 76 return; |
77 | 77 |
78 v8::Context::Scope scope(v8Context); | 78 v8::Context::Scope scope(v8Context); |
79 v8::Handle<v8::Value> boolArgHandle = v8Boolean(boolArg, m_isolate); | 79 v8::Handle<v8::Value> boolArgHandle = v8Boolean(boolArg, m_isolate); |
80 if (boolArgHandle.IsEmpty()) { | 80 if (boolArgHandle.IsEmpty()) { |
81 if (!isScriptControllerTerminating()) | 81 if (!isScriptControllerTerminating()) |
82 CRASH(); | 82 CRASH(); |
83 return; | 83 return; |
84 } | 84 } |
85 v8::Handle<v8::Value> argv[] = { boolArgHandle }; | 85 v8::Handle<v8::Value> argv[] = { boolArgHandle }; |
86 | 86 |
87 invokeCallback(m_callback.newLocal(m_isolate), 1, argv, executionContext(),
m_isolate); | 87 invokeCallback(m_callback.newLocal(m_isolate), 1, argv, executionContext(),
m_isolate); |
88 } | 88 } |
89 | 89 |
90 void V8TestCallbackInterface::voidMethodSequenceArg(const Vector<RefPtr<TestInte
rfaceEmpty> >& sequenceArg) | 90 void V8TestCallbackInterface::voidMethodSequenceArg(const Vector<RefPtr<TestInte
rfaceEmpty> >& sequenceArg) |
91 { | 91 { |
92 if (!canInvokeCallback()) | 92 if (!canInvokeCallback()) |
93 return; | 93 return; |
94 | 94 |
95 v8::HandleScope handleScope(m_isolate); | 95 v8::HandleScope handleScope(m_isolate); |
96 | 96 |
97 v8::Handle<v8::Context> v8Context = toV8Context(executionContext(), m_world.
get()); | 97 v8::Handle<v8::Context> v8Context = toV8Context(executionContext(), *m_world
); |
98 if (v8Context.IsEmpty()) | 98 if (v8Context.IsEmpty()) |
99 return; | 99 return; |
100 | 100 |
101 v8::Context::Scope scope(v8Context); | 101 v8::Context::Scope scope(v8Context); |
102 v8::Handle<v8::Value> sequenceArgHandle = v8Array(sequenceArg, m_isolate); | 102 v8::Handle<v8::Value> sequenceArgHandle = v8Array(sequenceArg, m_isolate); |
103 if (sequenceArgHandle.IsEmpty()) { | 103 if (sequenceArgHandle.IsEmpty()) { |
104 if (!isScriptControllerTerminating()) | 104 if (!isScriptControllerTerminating()) |
105 CRASH(); | 105 CRASH(); |
106 return; | 106 return; |
107 } | 107 } |
108 v8::Handle<v8::Value> argv[] = { sequenceArgHandle }; | 108 v8::Handle<v8::Value> argv[] = { sequenceArgHandle }; |
109 | 109 |
110 invokeCallback(m_callback.newLocal(m_isolate), 1, argv, executionContext(),
m_isolate); | 110 invokeCallback(m_callback.newLocal(m_isolate), 1, argv, executionContext(),
m_isolate); |
111 } | 111 } |
112 | 112 |
113 void V8TestCallbackInterface::voidMethodFloatArg(float floatArg) | 113 void V8TestCallbackInterface::voidMethodFloatArg(float floatArg) |
114 { | 114 { |
115 if (!canInvokeCallback()) | 115 if (!canInvokeCallback()) |
116 return; | 116 return; |
117 | 117 |
118 v8::HandleScope handleScope(m_isolate); | 118 v8::HandleScope handleScope(m_isolate); |
119 | 119 |
120 v8::Handle<v8::Context> v8Context = toV8Context(executionContext(), m_world.
get()); | 120 v8::Handle<v8::Context> v8Context = toV8Context(executionContext(), *m_world
); |
121 if (v8Context.IsEmpty()) | 121 if (v8Context.IsEmpty()) |
122 return; | 122 return; |
123 | 123 |
124 v8::Context::Scope scope(v8Context); | 124 v8::Context::Scope scope(v8Context); |
125 v8::Handle<v8::Value> floatArgHandle = v8::Number::New(m_isolate, floatArg); | 125 v8::Handle<v8::Value> floatArgHandle = v8::Number::New(m_isolate, floatArg); |
126 if (floatArgHandle.IsEmpty()) { | 126 if (floatArgHandle.IsEmpty()) { |
127 if (!isScriptControllerTerminating()) | 127 if (!isScriptControllerTerminating()) |
128 CRASH(); | 128 CRASH(); |
129 return; | 129 return; |
130 } | 130 } |
131 v8::Handle<v8::Value> argv[] = { floatArgHandle }; | 131 v8::Handle<v8::Value> argv[] = { floatArgHandle }; |
132 | 132 |
133 invokeCallback(m_callback.newLocal(m_isolate), 1, argv, executionContext(),
m_isolate); | 133 invokeCallback(m_callback.newLocal(m_isolate), 1, argv, executionContext(),
m_isolate); |
134 } | 134 } |
135 | 135 |
136 void V8TestCallbackInterface::voidMethodTestInterfaceEmptyArg(TestInterfaceEmpty
* testInterfaceEmptyArg) | 136 void V8TestCallbackInterface::voidMethodTestInterfaceEmptyArg(TestInterfaceEmpty
* testInterfaceEmptyArg) |
137 { | 137 { |
138 if (!canInvokeCallback()) | 138 if (!canInvokeCallback()) |
139 return; | 139 return; |
140 | 140 |
141 v8::HandleScope handleScope(m_isolate); | 141 v8::HandleScope handleScope(m_isolate); |
142 | 142 |
143 v8::Handle<v8::Context> v8Context = toV8Context(executionContext(), m_world.
get()); | 143 v8::Handle<v8::Context> v8Context = toV8Context(executionContext(), *m_world
); |
144 if (v8Context.IsEmpty()) | 144 if (v8Context.IsEmpty()) |
145 return; | 145 return; |
146 | 146 |
147 v8::Context::Scope scope(v8Context); | 147 v8::Context::Scope scope(v8Context); |
148 v8::Handle<v8::Value> testInterfaceEmptyArgHandle = toV8(testInterfaceEmptyA
rg, v8::Handle<v8::Object>(), m_isolate); | 148 v8::Handle<v8::Value> testInterfaceEmptyArgHandle = toV8(testInterfaceEmptyA
rg, v8::Handle<v8::Object>(), m_isolate); |
149 if (testInterfaceEmptyArgHandle.IsEmpty()) { | 149 if (testInterfaceEmptyArgHandle.IsEmpty()) { |
150 if (!isScriptControllerTerminating()) | 150 if (!isScriptControllerTerminating()) |
151 CRASH(); | 151 CRASH(); |
152 return; | 152 return; |
153 } | 153 } |
154 v8::Handle<v8::Value> argv[] = { testInterfaceEmptyArgHandle }; | 154 v8::Handle<v8::Value> argv[] = { testInterfaceEmptyArgHandle }; |
155 | 155 |
156 invokeCallback(m_callback.newLocal(m_isolate), 1, argv, executionContext(),
m_isolate); | 156 invokeCallback(m_callback.newLocal(m_isolate), 1, argv, executionContext(),
m_isolate); |
157 } | 157 } |
158 | 158 |
159 void V8TestCallbackInterface::voidMethodTestInterfaceEmptyStringArg(TestInterfac
eEmpty* testInterfaceEmptyArg, const String& stringArg) | 159 void V8TestCallbackInterface::voidMethodTestInterfaceEmptyStringArg(TestInterfac
eEmpty* testInterfaceEmptyArg, const String& stringArg) |
160 { | 160 { |
161 if (!canInvokeCallback()) | 161 if (!canInvokeCallback()) |
162 return; | 162 return; |
163 | 163 |
164 v8::HandleScope handleScope(m_isolate); | 164 v8::HandleScope handleScope(m_isolate); |
165 | 165 |
166 v8::Handle<v8::Context> v8Context = toV8Context(executionContext(), m_world.
get()); | 166 v8::Handle<v8::Context> v8Context = toV8Context(executionContext(), *m_world
); |
167 if (v8Context.IsEmpty()) | 167 if (v8Context.IsEmpty()) |
168 return; | 168 return; |
169 | 169 |
170 v8::Context::Scope scope(v8Context); | 170 v8::Context::Scope scope(v8Context); |
171 v8::Handle<v8::Value> testInterfaceEmptyArgHandle = toV8(testInterfaceEmptyA
rg, v8::Handle<v8::Object>(), m_isolate); | 171 v8::Handle<v8::Value> testInterfaceEmptyArgHandle = toV8(testInterfaceEmptyA
rg, v8::Handle<v8::Object>(), m_isolate); |
172 if (testInterfaceEmptyArgHandle.IsEmpty()) { | 172 if (testInterfaceEmptyArgHandle.IsEmpty()) { |
173 if (!isScriptControllerTerminating()) | 173 if (!isScriptControllerTerminating()) |
174 CRASH(); | 174 CRASH(); |
175 return; | 175 return; |
176 } | 176 } |
177 v8::Handle<v8::Value> stringArgHandle = v8String(m_isolate, stringArg); | 177 v8::Handle<v8::Value> stringArgHandle = v8String(m_isolate, stringArg); |
178 if (stringArgHandle.IsEmpty()) { | 178 if (stringArgHandle.IsEmpty()) { |
179 if (!isScriptControllerTerminating()) | 179 if (!isScriptControllerTerminating()) |
180 CRASH(); | 180 CRASH(); |
181 return; | 181 return; |
182 } | 182 } |
183 v8::Handle<v8::Value> argv[] = { testInterfaceEmptyArgHandle, stringArgHandl
e }; | 183 v8::Handle<v8::Value> argv[] = { testInterfaceEmptyArgHandle, stringArgHandl
e }; |
184 | 184 |
185 invokeCallback(m_callback.newLocal(m_isolate), 2, argv, executionContext(),
m_isolate); | 185 invokeCallback(m_callback.newLocal(m_isolate), 2, argv, executionContext(),
m_isolate); |
186 } | 186 } |
187 | 187 |
188 void V8TestCallbackInterface::callbackWithThisValueVoidMethodStringArg(ScriptVal
ue thisValue, const String& stringArg) | 188 void V8TestCallbackInterface::callbackWithThisValueVoidMethodStringArg(ScriptVal
ue thisValue, const String& stringArg) |
189 { | 189 { |
190 if (!canInvokeCallback()) | 190 if (!canInvokeCallback()) |
191 return; | 191 return; |
192 | 192 |
193 v8::HandleScope handleScope(m_isolate); | 193 v8::HandleScope handleScope(m_isolate); |
194 | 194 |
195 v8::Handle<v8::Context> v8Context = toV8Context(executionContext(), m_world.
get()); | 195 v8::Handle<v8::Context> v8Context = toV8Context(executionContext(), *m_world
); |
196 if (v8Context.IsEmpty()) | 196 if (v8Context.IsEmpty()) |
197 return; | 197 return; |
198 | 198 |
199 v8::Context::Scope scope(v8Context); | 199 v8::Context::Scope scope(v8Context); |
200 v8::Handle<v8::Value> thisHandle = thisValue.v8Value(); | 200 v8::Handle<v8::Value> thisHandle = thisValue.v8Value(); |
201 if (thisHandle.IsEmpty()) { | 201 if (thisHandle.IsEmpty()) { |
202 if (!isScriptControllerTerminating()) | 202 if (!isScriptControllerTerminating()) |
203 CRASH(); | 203 CRASH(); |
204 return; | 204 return; |
205 } | 205 } |
206 ASSERT(thisHandle->IsObject()); | 206 ASSERT(thisHandle->IsObject()); |
207 v8::Handle<v8::Value> stringArgHandle = v8String(m_isolate, stringArg); | 207 v8::Handle<v8::Value> stringArgHandle = v8String(m_isolate, stringArg); |
208 if (stringArgHandle.IsEmpty()) { | 208 if (stringArgHandle.IsEmpty()) { |
209 if (!isScriptControllerTerminating()) | 209 if (!isScriptControllerTerminating()) |
210 CRASH(); | 210 CRASH(); |
211 return; | 211 return; |
212 } | 212 } |
213 v8::Handle<v8::Value> argv[] = { stringArgHandle }; | 213 v8::Handle<v8::Value> argv[] = { stringArgHandle }; |
214 | 214 |
215 invokeCallback(m_callback.newLocal(m_isolate), v8::Handle<v8::Object>::Cast(
thisHandle), 1, argv, executionContext(), m_isolate); | 215 invokeCallback(m_callback.newLocal(m_isolate), v8::Handle<v8::Object>::Cast(
thisHandle), 1, argv, executionContext(), m_isolate); |
216 } | 216 } |
217 | 217 |
218 void V8TestCallbackInterface::voidMethodWillBeGarbageCollectedSequenceArg(const
WillBeHeapVector<RefPtrWillBeMember<TestInterfaceWillBeGarbageCollected> >& sequ
enceArg) | 218 void V8TestCallbackInterface::voidMethodWillBeGarbageCollectedSequenceArg(const
WillBeHeapVector<RefPtrWillBeMember<TestInterfaceWillBeGarbageCollected> >& sequ
enceArg) |
219 { | 219 { |
220 if (!canInvokeCallback()) | 220 if (!canInvokeCallback()) |
221 return; | 221 return; |
222 | 222 |
223 v8::HandleScope handleScope(m_isolate); | 223 v8::HandleScope handleScope(m_isolate); |
224 | 224 |
225 v8::Handle<v8::Context> v8Context = toV8Context(executionContext(), m_world.
get()); | 225 v8::Handle<v8::Context> v8Context = toV8Context(executionContext(), *m_world
); |
226 if (v8Context.IsEmpty()) | 226 if (v8Context.IsEmpty()) |
227 return; | 227 return; |
228 | 228 |
229 v8::Context::Scope scope(v8Context); | 229 v8::Context::Scope scope(v8Context); |
230 v8::Handle<v8::Value> sequenceArgHandle = v8Array(sequenceArg, m_isolate); | 230 v8::Handle<v8::Value> sequenceArgHandle = v8Array(sequenceArg, m_isolate); |
231 if (sequenceArgHandle.IsEmpty()) { | 231 if (sequenceArgHandle.IsEmpty()) { |
232 if (!isScriptControllerTerminating()) | 232 if (!isScriptControllerTerminating()) |
233 CRASH(); | 233 CRASH(); |
234 return; | 234 return; |
235 } | 235 } |
236 v8::Handle<v8::Value> argv[] = { sequenceArgHandle }; | 236 v8::Handle<v8::Value> argv[] = { sequenceArgHandle }; |
237 | 237 |
238 invokeCallback(m_callback.newLocal(m_isolate), 1, argv, executionContext(),
m_isolate); | 238 invokeCallback(m_callback.newLocal(m_isolate), 1, argv, executionContext(),
m_isolate); |
239 } | 239 } |
240 | 240 |
241 void V8TestCallbackInterface::voidMethodWillBeGarbageCollectedArrayArg(const Wil
lBeHeapVector<RefPtrWillBeMember<TestInterfaceWillBeGarbageCollected> >& arrayAr
g) | 241 void V8TestCallbackInterface::voidMethodWillBeGarbageCollectedArrayArg(const Wil
lBeHeapVector<RefPtrWillBeMember<TestInterfaceWillBeGarbageCollected> >& arrayAr
g) |
242 { | 242 { |
243 if (!canInvokeCallback()) | 243 if (!canInvokeCallback()) |
244 return; | 244 return; |
245 | 245 |
246 v8::HandleScope handleScope(m_isolate); | 246 v8::HandleScope handleScope(m_isolate); |
247 | 247 |
248 v8::Handle<v8::Context> v8Context = toV8Context(executionContext(), m_world.
get()); | 248 v8::Handle<v8::Context> v8Context = toV8Context(executionContext(), *m_world
); |
249 if (v8Context.IsEmpty()) | 249 if (v8Context.IsEmpty()) |
250 return; | 250 return; |
251 | 251 |
252 v8::Context::Scope scope(v8Context); | 252 v8::Context::Scope scope(v8Context); |
253 v8::Handle<v8::Value> arrayArgHandle = v8Array(arrayArg, m_isolate); | 253 v8::Handle<v8::Value> arrayArgHandle = v8Array(arrayArg, m_isolate); |
254 if (arrayArgHandle.IsEmpty()) { | 254 if (arrayArgHandle.IsEmpty()) { |
255 if (!isScriptControllerTerminating()) | 255 if (!isScriptControllerTerminating()) |
256 CRASH(); | 256 CRASH(); |
257 return; | 257 return; |
258 } | 258 } |
259 v8::Handle<v8::Value> argv[] = { arrayArgHandle }; | 259 v8::Handle<v8::Value> argv[] = { arrayArgHandle }; |
260 | 260 |
261 invokeCallback(m_callback.newLocal(m_isolate), 1, argv, executionContext(),
m_isolate); | 261 invokeCallback(m_callback.newLocal(m_isolate), 1, argv, executionContext(),
m_isolate); |
262 } | 262 } |
263 | 263 |
264 } // namespace WebCore | 264 } // namespace WebCore |
OLD | NEW |