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 "V8TestInterface5.h" | 7 #include "V8TestInterface5.h" |
8 | 8 |
9 #include "bindings/core/v8/ExceptionState.h" | 9 #include "bindings/core/v8/ExceptionState.h" |
10 #include "bindings/core/v8/ScriptState.h" | 10 #include "bindings/core/v8/ScriptState.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 } | 67 } |
68 | 68 |
69 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) | 69 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) |
70 { | 70 { |
71 v8::Local<v8::Object> holder = info.Holder(); | 71 v8::Local<v8::Object> holder = info.Holder(); |
72 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceA
ttribute", "TestInterface5", holder, info.GetIsolate()); | 72 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceA
ttribute", "TestInterface5", holder, info.GetIsolate()); |
73 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 73 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
74 TestInterface5Implementation* cppValue = V8TestInterface5::toImplWithTypeChe
ck(info.GetIsolate(), v8Value); | 74 TestInterface5Implementation* cppValue = V8TestInterface5::toImplWithTypeChe
ck(info.GetIsolate(), v8Value); |
75 if (!cppValue) { | 75 if (!cppValue) { |
76 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface5'."); | 76 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface5'."); |
77 exceptionState.throwIfNeeded(); | |
78 return; | 77 return; |
79 } | 78 } |
80 impl->setTestInterfaceAttribute(cppValue); | 79 impl->setTestInterfaceAttribute(cppValue); |
81 } | 80 } |
82 | 81 |
83 static void testInterfaceAttributeAttributeSetterCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 82 static void testInterfaceAttributeAttributeSetterCallback(const v8::FunctionCall
backInfo<v8::Value>& info) |
84 { | 83 { |
85 v8::Local<v8::Value> v8Value = info[0]; | 84 v8::Local<v8::Value> v8Value = info[0]; |
86 TestInterface5ImplementationV8Internal::testInterfaceAttributeAttributeSette
r(v8Value, info); | 85 TestInterface5ImplementationV8Internal::testInterfaceAttributeAttributeSette
r(v8Value, info); |
87 } | 86 } |
88 | 87 |
89 static void doubleAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | 88 static void doubleAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Va
lue>& info) |
90 { | 89 { |
91 v8::Local<v8::Object> holder = info.Holder(); | 90 v8::Local<v8::Object> holder = info.Holder(); |
92 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 91 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
93 v8SetReturnValue(info, impl->doubleAttribute()); | 92 v8SetReturnValue(info, impl->doubleAttribute()); |
94 } | 93 } |
95 | 94 |
96 static void doubleAttributeAttributeGetterCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) | 95 static void doubleAttributeAttributeGetterCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) |
97 { | 96 { |
98 TestInterface5ImplementationV8Internal::doubleAttributeAttributeGetter(info)
; | 97 TestInterface5ImplementationV8Internal::doubleAttributeAttributeGetter(info)
; |
99 } | 98 } |
100 | 99 |
101 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::FunctionCallbackInfo<v8::Value>& info) | 100 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::FunctionCallbackInfo<v8::Value>& info) |
102 { | 101 { |
103 v8::Local<v8::Object> holder = info.Holder(); | 102 v8::Local<v8::Object> holder = info.Holder(); |
104 ExceptionState exceptionState(ExceptionState::SetterContext, "doubleAttribut
e", "TestInterface5", holder, info.GetIsolate()); | 103 ExceptionState exceptionState(ExceptionState::SetterContext, "doubleAttribut
e", "TestInterface5", holder, info.GetIsolate()); |
105 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 104 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
106 double cppValue = toRestrictedDouble(info.GetIsolate(), v8Value, exceptionSt
ate); | 105 double cppValue = toRestrictedDouble(info.GetIsolate(), v8Value, exceptionSt
ate); |
107 if (exceptionState.throwIfNeeded()) | 106 if (exceptionState.hadException()) |
108 return; | 107 return; |
109 impl->setDoubleAttribute(cppValue); | 108 impl->setDoubleAttribute(cppValue); |
110 } | 109 } |
111 | 110 |
112 static void doubleAttributeAttributeSetterCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) | 111 static void doubleAttributeAttributeSetterCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) |
113 { | 112 { |
114 v8::Local<v8::Value> v8Value = info[0]; | 113 v8::Local<v8::Value> v8Value = info[0]; |
115 TestInterface5ImplementationV8Internal::doubleAttributeAttributeSetter(v8Val
ue, info); | 114 TestInterface5ImplementationV8Internal::doubleAttributeAttributeSetter(v8Val
ue, info); |
116 } | 115 } |
117 | 116 |
118 static void floatAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | 117 static void floatAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Val
ue>& info) |
119 { | 118 { |
120 v8::Local<v8::Object> holder = info.Holder(); | 119 v8::Local<v8::Object> holder = info.Holder(); |
121 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 120 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
122 v8SetReturnValue(info, impl->floatAttribute()); | 121 v8SetReturnValue(info, impl->floatAttribute()); |
123 } | 122 } |
124 | 123 |
125 static void floatAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | 124 static void floatAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) |
126 { | 125 { |
127 TestInterface5ImplementationV8Internal::floatAttributeAttributeGetter(info); | 126 TestInterface5ImplementationV8Internal::floatAttributeAttributeGetter(info); |
128 } | 127 } |
129 | 128 |
130 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::FunctionCallbackInfo<v8::Value>& info) | 129 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::FunctionCallbackInfo<v8::Value>& info) |
131 { | 130 { |
132 v8::Local<v8::Object> holder = info.Holder(); | 131 v8::Local<v8::Object> holder = info.Holder(); |
133 ExceptionState exceptionState(ExceptionState::SetterContext, "floatAttribute
", "TestInterface5", holder, info.GetIsolate()); | 132 ExceptionState exceptionState(ExceptionState::SetterContext, "floatAttribute
", "TestInterface5", holder, info.GetIsolate()); |
134 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 133 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
135 float cppValue = toRestrictedFloat(info.GetIsolate(), v8Value, exceptionStat
e); | 134 float cppValue = toRestrictedFloat(info.GetIsolate(), v8Value, exceptionStat
e); |
136 if (exceptionState.throwIfNeeded()) | 135 if (exceptionState.hadException()) |
137 return; | 136 return; |
138 impl->setFloatAttribute(cppValue); | 137 impl->setFloatAttribute(cppValue); |
139 } | 138 } |
140 | 139 |
141 static void floatAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | 140 static void floatAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) |
142 { | 141 { |
143 v8::Local<v8::Value> v8Value = info[0]; | 142 v8::Local<v8::Value> v8Value = info[0]; |
144 TestInterface5ImplementationV8Internal::floatAttributeAttributeSetter(v8Valu
e, info); | 143 TestInterface5ImplementationV8Internal::floatAttributeAttributeSetter(v8Valu
e, info); |
145 } | 144 } |
146 | 145 |
147 static void unrestrictedDoubleAttributeAttributeGetter(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 146 static void unrestrictedDoubleAttributeAttributeGetter(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
148 { | 147 { |
149 v8::Local<v8::Object> holder = info.Holder(); | 148 v8::Local<v8::Object> holder = info.Holder(); |
150 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 149 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
151 v8SetReturnValue(info, impl->unrestrictedDoubleAttribute()); | 150 v8SetReturnValue(info, impl->unrestrictedDoubleAttribute()); |
152 } | 151 } |
153 | 152 |
154 static void unrestrictedDoubleAttributeAttributeGetterCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) | 153 static void unrestrictedDoubleAttributeAttributeGetterCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) |
155 { | 154 { |
156 TestInterface5ImplementationV8Internal::unrestrictedDoubleAttributeAttribute
Getter(info); | 155 TestInterface5ImplementationV8Internal::unrestrictedDoubleAttributeAttribute
Getter(info); |
157 } | 156 } |
158 | 157 |
159 static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::FunctionCallbackInfo<v8::Value>& info) | 158 static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::FunctionCallbackInfo<v8::Value>& info) |
160 { | 159 { |
161 v8::Local<v8::Object> holder = info.Holder(); | 160 v8::Local<v8::Object> holder = info.Holder(); |
162 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedDo
ubleAttribute", "TestInterface5", holder, info.GetIsolate()); | 161 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedDo
ubleAttribute", "TestInterface5", holder, info.GetIsolate()); |
163 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 162 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
164 double cppValue = toDouble(info.GetIsolate(), v8Value, exceptionState); | 163 double cppValue = toDouble(info.GetIsolate(), v8Value, exceptionState); |
165 if (exceptionState.throwIfNeeded()) | 164 if (exceptionState.hadException()) |
166 return; | 165 return; |
167 impl->setUnrestrictedDoubleAttribute(cppValue); | 166 impl->setUnrestrictedDoubleAttribute(cppValue); |
168 } | 167 } |
169 | 168 |
170 static void unrestrictedDoubleAttributeAttributeSetterCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) | 169 static void unrestrictedDoubleAttributeAttributeSetterCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) |
171 { | 170 { |
172 v8::Local<v8::Value> v8Value = info[0]; | 171 v8::Local<v8::Value> v8Value = info[0]; |
173 TestInterface5ImplementationV8Internal::unrestrictedDoubleAttributeAttribute
Setter(v8Value, info); | 172 TestInterface5ImplementationV8Internal::unrestrictedDoubleAttributeAttribute
Setter(v8Value, info); |
174 } | 173 } |
175 | 174 |
176 static void unrestrictedFloatAttributeAttributeGetter(const v8::FunctionCallback
Info<v8::Value>& info) | 175 static void unrestrictedFloatAttributeAttributeGetter(const v8::FunctionCallback
Info<v8::Value>& info) |
177 { | 176 { |
178 v8::Local<v8::Object> holder = info.Holder(); | 177 v8::Local<v8::Object> holder = info.Holder(); |
179 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 178 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
180 v8SetReturnValue(info, impl->unrestrictedFloatAttribute()); | 179 v8SetReturnValue(info, impl->unrestrictedFloatAttribute()); |
181 } | 180 } |
182 | 181 |
183 static void unrestrictedFloatAttributeAttributeGetterCallback(const v8::Function
CallbackInfo<v8::Value>& info) | 182 static void unrestrictedFloatAttributeAttributeGetterCallback(const v8::Function
CallbackInfo<v8::Value>& info) |
184 { | 183 { |
185 TestInterface5ImplementationV8Internal::unrestrictedFloatAttributeAttributeG
etter(info); | 184 TestInterface5ImplementationV8Internal::unrestrictedFloatAttributeAttributeG
etter(info); |
186 } | 185 } |
187 | 186 |
188 static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::FunctionCallbackInfo<v8::Value>& info) | 187 static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::FunctionCallbackInfo<v8::Value>& info) |
189 { | 188 { |
190 v8::Local<v8::Object> holder = info.Holder(); | 189 v8::Local<v8::Object> holder = info.Holder(); |
191 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedFl
oatAttribute", "TestInterface5", holder, info.GetIsolate()); | 190 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedFl
oatAttribute", "TestInterface5", holder, info.GetIsolate()); |
192 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 191 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
193 float cppValue = toFloat(info.GetIsolate(), v8Value, exceptionState); | 192 float cppValue = toFloat(info.GetIsolate(), v8Value, exceptionState); |
194 if (exceptionState.throwIfNeeded()) | 193 if (exceptionState.hadException()) |
195 return; | 194 return; |
196 impl->setUnrestrictedFloatAttribute(cppValue); | 195 impl->setUnrestrictedFloatAttribute(cppValue); |
197 } | 196 } |
198 | 197 |
199 static void unrestrictedFloatAttributeAttributeSetterCallback(const v8::Function
CallbackInfo<v8::Value>& info) | 198 static void unrestrictedFloatAttributeAttributeSetterCallback(const v8::Function
CallbackInfo<v8::Value>& info) |
200 { | 199 { |
201 v8::Local<v8::Value> v8Value = info[0]; | 200 v8::Local<v8::Value> v8Value = info[0]; |
202 TestInterface5ImplementationV8Internal::unrestrictedFloatAttributeAttributeS
etter(v8Value, info); | 201 TestInterface5ImplementationV8Internal::unrestrictedFloatAttributeAttributeS
etter(v8Value, info); |
203 } | 202 } |
204 | 203 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 { | 236 { |
238 TestInterface5ImplementationV8Internal::alwaysExposedAttributeAttributeGette
r(info); | 237 TestInterface5ImplementationV8Internal::alwaysExposedAttributeAttributeGette
r(info); |
239 } | 238 } |
240 | 239 |
241 static void alwaysExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) | 240 static void alwaysExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) |
242 { | 241 { |
243 v8::Local<v8::Object> holder = info.Holder(); | 242 v8::Local<v8::Object> holder = info.Holder(); |
244 ExceptionState exceptionState(ExceptionState::SetterContext, "alwaysExposedA
ttribute", "TestInterface5", holder, info.GetIsolate()); | 243 ExceptionState exceptionState(ExceptionState::SetterContext, "alwaysExposedA
ttribute", "TestInterface5", holder, info.GetIsolate()); |
245 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 244 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
246 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 245 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
247 if (exceptionState.throwIfNeeded()) | 246 if (exceptionState.hadException()) |
248 return; | 247 return; |
249 impl->setAlwaysExposedAttribute(cppValue); | 248 impl->setAlwaysExposedAttribute(cppValue); |
250 } | 249 } |
251 | 250 |
252 static void alwaysExposedAttributeAttributeSetterCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 251 static void alwaysExposedAttributeAttributeSetterCallback(const v8::FunctionCall
backInfo<v8::Value>& info) |
253 { | 252 { |
254 v8::Local<v8::Value> v8Value = info[0]; | 253 v8::Local<v8::Value> v8Value = info[0]; |
255 TestInterface5ImplementationV8Internal::alwaysExposedAttributeAttributeSette
r(v8Value, info); | 254 TestInterface5ImplementationV8Internal::alwaysExposedAttributeAttributeSette
r(v8Value, info); |
256 } | 255 } |
257 | 256 |
258 static void workerExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo
<v8::Value>& info) | 257 static void workerExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo
<v8::Value>& info) |
259 { | 258 { |
260 v8::Local<v8::Object> holder = info.Holder(); | 259 v8::Local<v8::Object> holder = info.Holder(); |
261 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 260 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
262 v8SetReturnValueInt(info, impl->workerExposedAttribute()); | 261 v8SetReturnValueInt(info, impl->workerExposedAttribute()); |
263 } | 262 } |
264 | 263 |
265 static void workerExposedAttributeAttributeGetterCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 264 static void workerExposedAttributeAttributeGetterCallback(const v8::FunctionCall
backInfo<v8::Value>& info) |
266 { | 265 { |
267 TestInterface5ImplementationV8Internal::workerExposedAttributeAttributeGette
r(info); | 266 TestInterface5ImplementationV8Internal::workerExposedAttributeAttributeGette
r(info); |
268 } | 267 } |
269 | 268 |
270 static void workerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) | 269 static void workerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) |
271 { | 270 { |
272 v8::Local<v8::Object> holder = info.Holder(); | 271 v8::Local<v8::Object> holder = info.Holder(); |
273 ExceptionState exceptionState(ExceptionState::SetterContext, "workerExposedA
ttribute", "TestInterface5", holder, info.GetIsolate()); | 272 ExceptionState exceptionState(ExceptionState::SetterContext, "workerExposedA
ttribute", "TestInterface5", holder, info.GetIsolate()); |
274 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 273 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
275 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 274 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
276 if (exceptionState.throwIfNeeded()) | 275 if (exceptionState.hadException()) |
277 return; | 276 return; |
278 impl->setWorkerExposedAttribute(cppValue); | 277 impl->setWorkerExposedAttribute(cppValue); |
279 } | 278 } |
280 | 279 |
281 static void workerExposedAttributeAttributeSetterCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 280 static void workerExposedAttributeAttributeSetterCallback(const v8::FunctionCall
backInfo<v8::Value>& info) |
282 { | 281 { |
283 v8::Local<v8::Value> v8Value = info[0]; | 282 v8::Local<v8::Value> v8Value = info[0]; |
284 TestInterface5ImplementationV8Internal::workerExposedAttributeAttributeSette
r(v8Value, info); | 283 TestInterface5ImplementationV8Internal::workerExposedAttributeAttributeSette
r(v8Value, info); |
285 } | 284 } |
286 | 285 |
287 static void windowExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo
<v8::Value>& info) | 286 static void windowExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo
<v8::Value>& info) |
288 { | 287 { |
289 v8::Local<v8::Object> holder = info.Holder(); | 288 v8::Local<v8::Object> holder = info.Holder(); |
290 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 289 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
291 v8SetReturnValueInt(info, impl->windowExposedAttribute()); | 290 v8SetReturnValueInt(info, impl->windowExposedAttribute()); |
292 } | 291 } |
293 | 292 |
294 static void windowExposedAttributeAttributeGetterCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 293 static void windowExposedAttributeAttributeGetterCallback(const v8::FunctionCall
backInfo<v8::Value>& info) |
295 { | 294 { |
296 TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeGette
r(info); | 295 TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeGette
r(info); |
297 } | 296 } |
298 | 297 |
299 static void windowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) | 298 static void windowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) |
300 { | 299 { |
301 v8::Local<v8::Object> holder = info.Holder(); | 300 v8::Local<v8::Object> holder = info.Holder(); |
302 ExceptionState exceptionState(ExceptionState::SetterContext, "windowExposedA
ttribute", "TestInterface5", holder, info.GetIsolate()); | 301 ExceptionState exceptionState(ExceptionState::SetterContext, "windowExposedA
ttribute", "TestInterface5", holder, info.GetIsolate()); |
303 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 302 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
304 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 303 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
305 if (exceptionState.throwIfNeeded()) | 304 if (exceptionState.hadException()) |
306 return; | 305 return; |
307 impl->setWindowExposedAttribute(cppValue); | 306 impl->setWindowExposedAttribute(cppValue); |
308 } | 307 } |
309 | 308 |
310 static void windowExposedAttributeAttributeSetterCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 309 static void windowExposedAttributeAttributeSetterCallback(const v8::FunctionCall
backInfo<v8::Value>& info) |
311 { | 310 { |
312 v8::Local<v8::Value> v8Value = info[0]; | 311 v8::Local<v8::Value> v8Value = info[0]; |
313 TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeSette
r(v8Value, info); | 312 TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeSette
r(v8Value, info); |
314 } | 313 } |
315 | 314 |
(...skipping 18 matching lines...) Expand all Loading... |
334 static void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 333 static void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) |
335 { | 334 { |
336 TestInterface5ImplementationV8Internal::voidMethodTestInterfaceEmptyArgMetho
d(info); | 335 TestInterface5ImplementationV8Internal::voidMethodTestInterfaceEmptyArgMetho
d(info); |
337 } | 336 } |
338 | 337 |
339 static void voidMethodDoubleArgFloatArgMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 338 static void voidMethodDoubleArgFloatArgMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
340 { | 339 { |
341 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
oubleArgFloatArg", "TestInterface5", info.Holder(), info.GetIsolate()); | 340 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
oubleArgFloatArg", "TestInterface5", info.Holder(), info.GetIsolate()); |
342 if (UNLIKELY(info.Length() < 2)) { | 341 if (UNLIKELY(info.Length() < 2)) { |
343 setMinimumArityTypeError(exceptionState, 2, info.Length()); | 342 setMinimumArityTypeError(exceptionState, 2, info.Length()); |
344 exceptionState.throwIfNeeded(); | |
345 return; | 343 return; |
346 } | 344 } |
347 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 345 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
348 double doubleArg; | 346 double doubleArg; |
349 float floatArg; | 347 float floatArg; |
350 { | 348 { |
351 doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionStat
e); | 349 doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionStat
e); |
352 if (exceptionState.throwIfNeeded()) | 350 if (exceptionState.hadException()) |
353 return; | 351 return; |
354 floatArg = toRestrictedFloat(info.GetIsolate(), info[1], exceptionState)
; | 352 floatArg = toRestrictedFloat(info.GetIsolate(), info[1], exceptionState)
; |
355 if (exceptionState.throwIfNeeded()) | 353 if (exceptionState.hadException()) |
356 return; | 354 return; |
357 } | 355 } |
358 impl->voidMethodDoubleArgFloatArg(doubleArg, floatArg); | 356 impl->voidMethodDoubleArgFloatArg(doubleArg, floatArg); |
359 } | 357 } |
360 | 358 |
361 static void voidMethodDoubleArgFloatArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | 359 static void voidMethodDoubleArgFloatArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
362 { | 360 { |
363 TestInterface5ImplementationV8Internal::voidMethodDoubleArgFloatArgMethod(in
fo); | 361 TestInterface5ImplementationV8Internal::voidMethodDoubleArgFloatArgMethod(in
fo); |
364 } | 362 } |
365 | 363 |
366 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethod(const v8::
FunctionCallbackInfo<v8::Value>& info) | 364 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethod(const v8::
FunctionCallbackInfo<v8::Value>& info) |
367 { | 365 { |
368 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU
nrestrictedDoubleArgUnrestrictedFloatArg", "TestInterface5", info.Holder(), info
.GetIsolate()); | 366 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU
nrestrictedDoubleArgUnrestrictedFloatArg", "TestInterface5", info.Holder(), info
.GetIsolate()); |
369 if (UNLIKELY(info.Length() < 2)) { | 367 if (UNLIKELY(info.Length() < 2)) { |
370 setMinimumArityTypeError(exceptionState, 2, info.Length()); | 368 setMinimumArityTypeError(exceptionState, 2, info.Length()); |
371 exceptionState.throwIfNeeded(); | |
372 return; | 369 return; |
373 } | 370 } |
374 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 371 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
375 double unrestrictedDoubleArg; | 372 double unrestrictedDoubleArg; |
376 float unrestrictedFloatArg; | 373 float unrestrictedFloatArg; |
377 { | 374 { |
378 unrestrictedDoubleArg = toDouble(info.GetIsolate(), info[0], exceptionSt
ate); | 375 unrestrictedDoubleArg = toDouble(info.GetIsolate(), info[0], exceptionSt
ate); |
379 if (exceptionState.throwIfNeeded()) | 376 if (exceptionState.hadException()) |
380 return; | 377 return; |
381 unrestrictedFloatArg = toFloat(info.GetIsolate(), info[1], exceptionStat
e); | 378 unrestrictedFloatArg = toFloat(info.GetIsolate(), info[1], exceptionStat
e); |
382 if (exceptionState.throwIfNeeded()) | 379 if (exceptionState.hadException()) |
383 return; | 380 return; |
384 } | 381 } |
385 impl->voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg(unrestrictedDouble
Arg, unrestrictedFloatArg); | 382 impl->voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg(unrestrictedDouble
Arg, unrestrictedFloatArg); |
386 } | 383 } |
387 | 384 |
388 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCallback(co
nst v8::FunctionCallbackInfo<v8::Value>& info) | 385 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCallback(co
nst v8::FunctionCallbackInfo<v8::Value>& info) |
389 { | 386 { |
390 TestInterface5ImplementationV8Internal::voidMethodUnrestrictedDoubleArgUnres
trictedFloatArgMethod(info); | 387 TestInterface5ImplementationV8Internal::voidMethodUnrestrictedDoubleArgUnres
trictedFloatArgMethod(info); |
391 } | 388 } |
392 | 389 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
484 static void windowAndServiceWorkerExposedMethodMethodCallback(const v8::Function
CallbackInfo<v8::Value>& info) | 481 static void windowAndServiceWorkerExposedMethodMethodCallback(const v8::Function
CallbackInfo<v8::Value>& info) |
485 { | 482 { |
486 TestInterface5ImplementationV8Internal::windowAndServiceWorkerExposedMethodM
ethod(info); | 483 TestInterface5ImplementationV8Internal::windowAndServiceWorkerExposedMethodM
ethod(info); |
487 } | 484 } |
488 | 485 |
489 static void voidMethodBooleanOrDOMStringArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) | 486 static void voidMethodBooleanOrDOMStringArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) |
490 { | 487 { |
491 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodB
ooleanOrDOMStringArg", "TestInterface5", info.Holder(), info.GetIsolate()); | 488 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodB
ooleanOrDOMStringArg", "TestInterface5", info.Holder(), info.GetIsolate()); |
492 if (UNLIKELY(info.Length() < 1)) { | 489 if (UNLIKELY(info.Length() < 1)) { |
493 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 490 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
494 exceptionState.throwIfNeeded(); | |
495 return; | 491 return; |
496 } | 492 } |
497 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 493 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
498 BooleanOrString arg; | 494 BooleanOrString arg; |
499 { | 495 { |
500 V8BooleanOrString::toImpl(info.GetIsolate(), info[0], arg, UnionTypeConv
ersionMode::NotNullable, exceptionState); | 496 V8BooleanOrString::toImpl(info.GetIsolate(), info[0], arg, UnionTypeConv
ersionMode::NotNullable, exceptionState); |
501 if (exceptionState.throwIfNeeded()) | 497 if (exceptionState.hadException()) |
502 return; | 498 return; |
503 } | 499 } |
504 impl->voidMethodBooleanOrDOMStringArg(arg); | 500 impl->voidMethodBooleanOrDOMStringArg(arg); |
505 } | 501 } |
506 | 502 |
507 static void voidMethodBooleanOrDOMStringArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 503 static void voidMethodBooleanOrDOMStringArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) |
508 { | 504 { |
509 TestInterface5ImplementationV8Internal::voidMethodBooleanOrDOMStringArgMetho
d(info); | 505 TestInterface5ImplementationV8Internal::voidMethodBooleanOrDOMStringArgMetho
d(info); |
510 } | 506 } |
511 | 507 |
512 static void voidMethodDoubleOrDOMStringArgMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) | 508 static void voidMethodDoubleOrDOMStringArgMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) |
513 { | 509 { |
514 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
oubleOrDOMStringArg", "TestInterface5", info.Holder(), info.GetIsolate()); | 510 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
oubleOrDOMStringArg", "TestInterface5", info.Holder(), info.GetIsolate()); |
515 if (UNLIKELY(info.Length() < 1)) { | 511 if (UNLIKELY(info.Length() < 1)) { |
516 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 512 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
517 exceptionState.throwIfNeeded(); | |
518 return; | 513 return; |
519 } | 514 } |
520 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 515 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
521 DoubleOrString arg; | 516 DoubleOrString arg; |
522 { | 517 { |
523 V8DoubleOrString::toImpl(info.GetIsolate(), info[0], arg, UnionTypeConve
rsionMode::NotNullable, exceptionState); | 518 V8DoubleOrString::toImpl(info.GetIsolate(), info[0], arg, UnionTypeConve
rsionMode::NotNullable, exceptionState); |
524 if (exceptionState.throwIfNeeded()) | 519 if (exceptionState.hadException()) |
525 return; | 520 return; |
526 } | 521 } |
527 impl->voidMethodDoubleOrDOMStringArg(arg); | 522 impl->voidMethodDoubleOrDOMStringArg(arg); |
528 } | 523 } |
529 | 524 |
530 static void voidMethodDoubleOrDOMStringArgMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 525 static void voidMethodDoubleOrDOMStringArgMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
531 { | 526 { |
532 TestInterface5ImplementationV8Internal::voidMethodDoubleOrDOMStringArgMethod
(info); | 527 TestInterface5ImplementationV8Internal::voidMethodDoubleOrDOMStringArgMethod
(info); |
533 } | 528 } |
534 | 529 |
535 static void keysMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 530 static void keysMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
536 { | 531 { |
537 ExceptionState exceptionState(ExceptionState::ExecutionContext, "keys", "Tes
tInterface5", info.Holder(), info.GetIsolate()); | 532 ExceptionState exceptionState(ExceptionState::ExecutionContext, "keys", "Tes
tInterface5", info.Holder(), info.GetIsolate()); |
538 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 533 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
539 ScriptState* scriptState = ScriptState::forReceiverObject(info); | 534 ScriptState* scriptState = ScriptState::forReceiverObject(info); |
540 Iterator* result = impl->keysForBinding(scriptState, exceptionState); | 535 Iterator* result = impl->keysForBinding(scriptState, exceptionState); |
541 if (exceptionState.hadException()) { | 536 if (exceptionState.hadException()) { |
542 exceptionState.throwIfNeeded(); | |
543 return; | 537 return; |
544 } | 538 } |
545 v8SetReturnValue(info, result); | 539 v8SetReturnValue(info, result); |
546 } | 540 } |
547 | 541 |
548 static void keysMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) | 542 static void keysMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
549 { | 543 { |
550 TestInterface5ImplementationV8Internal::keysMethod(info); | 544 TestInterface5ImplementationV8Internal::keysMethod(info); |
551 } | 545 } |
552 | 546 |
553 static void valuesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 547 static void valuesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
554 { | 548 { |
555 ExceptionState exceptionState(ExceptionState::ExecutionContext, "values", "T
estInterface5", info.Holder(), info.GetIsolate()); | 549 ExceptionState exceptionState(ExceptionState::ExecutionContext, "values", "T
estInterface5", info.Holder(), info.GetIsolate()); |
556 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 550 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
557 ScriptState* scriptState = ScriptState::forReceiverObject(info); | 551 ScriptState* scriptState = ScriptState::forReceiverObject(info); |
558 Iterator* result = impl->valuesForBinding(scriptState, exceptionState); | 552 Iterator* result = impl->valuesForBinding(scriptState, exceptionState); |
559 if (exceptionState.hadException()) { | 553 if (exceptionState.hadException()) { |
560 exceptionState.throwIfNeeded(); | |
561 return; | 554 return; |
562 } | 555 } |
563 v8SetReturnValue(info, result); | 556 v8SetReturnValue(info, result); |
564 } | 557 } |
565 | 558 |
566 static void valuesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info
) | 559 static void valuesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info
) |
567 { | 560 { |
568 TestInterface5ImplementationV8Internal::valuesMethod(info); | 561 TestInterface5ImplementationV8Internal::valuesMethod(info); |
569 } | 562 } |
570 | 563 |
571 static void entriesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 564 static void entriesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
572 { | 565 { |
573 ExceptionState exceptionState(ExceptionState::ExecutionContext, "entries", "
TestInterface5", info.Holder(), info.GetIsolate()); | 566 ExceptionState exceptionState(ExceptionState::ExecutionContext, "entries", "
TestInterface5", info.Holder(), info.GetIsolate()); |
574 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 567 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
575 ScriptState* scriptState = ScriptState::forReceiverObject(info); | 568 ScriptState* scriptState = ScriptState::forReceiverObject(info); |
576 Iterator* result = impl->entriesForBinding(scriptState, exceptionState); | 569 Iterator* result = impl->entriesForBinding(scriptState, exceptionState); |
577 if (exceptionState.hadException()) { | 570 if (exceptionState.hadException()) { |
578 exceptionState.throwIfNeeded(); | |
579 return; | 571 return; |
580 } | 572 } |
581 v8SetReturnValue(info, result); | 573 v8SetReturnValue(info, result); |
582 } | 574 } |
583 | 575 |
584 static void entriesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) | 576 static void entriesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) |
585 { | 577 { |
586 TestInterface5ImplementationV8Internal::entriesMethod(info); | 578 TestInterface5ImplementationV8Internal::entriesMethod(info); |
587 } | 579 } |
588 | 580 |
589 static void forEachMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 581 static void forEachMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
590 { | 582 { |
591 ExceptionState exceptionState(ExceptionState::ExecutionContext, "forEach", "
TestInterface5", info.Holder(), info.GetIsolate()); | 583 ExceptionState exceptionState(ExceptionState::ExecutionContext, "forEach", "
TestInterface5", info.Holder(), info.GetIsolate()); |
592 if (UNLIKELY(info.Length() < 1)) { | 584 if (UNLIKELY(info.Length() < 1)) { |
593 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 585 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
594 exceptionState.throwIfNeeded(); | |
595 return; | 586 return; |
596 } | 587 } |
597 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 588 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
598 ScriptValue callback; | 589 ScriptValue callback; |
599 ScriptValue thisArg; | 590 ScriptValue thisArg; |
600 { | 591 { |
601 if (!info[0]->IsFunction()) { | 592 if (!info[0]->IsFunction()) { |
602 exceptionState.throwTypeError("The callback provided as parameter 1
is not a function."); | 593 exceptionState.throwTypeError("The callback provided as parameter 1
is not a function."); |
603 exceptionState.throwIfNeeded(); | |
604 return; | 594 return; |
605 } | 595 } |
606 callback = ScriptValue(ScriptState::current(info.GetIsolate()), info[0])
; | 596 callback = ScriptValue(ScriptState::current(info.GetIsolate()), info[0])
; |
607 thisArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[1]); | 597 thisArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[1]); |
608 } | 598 } |
609 ScriptState* scriptState = ScriptState::forReceiverObject(info); | 599 ScriptState* scriptState = ScriptState::forReceiverObject(info); |
610 impl->forEachForBinding(scriptState, ScriptValue(scriptState, info.Holder())
, callback, thisArg, exceptionState); | 600 impl->forEachForBinding(scriptState, ScriptValue(scriptState, info.Holder())
, callback, thisArg, exceptionState); |
611 if (exceptionState.hadException()) { | 601 if (exceptionState.hadException()) { |
612 exceptionState.throwIfNeeded(); | |
613 return; | 602 return; |
614 } | 603 } |
615 } | 604 } |
616 | 605 |
617 static void forEachMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) | 606 static void forEachMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) |
618 { | 607 { |
619 TestInterface5ImplementationV8Internal::forEachMethod(info); | 608 TestInterface5ImplementationV8Internal::forEachMethod(info); |
620 } | 609 } |
621 | 610 |
622 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 611 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
623 { | 612 { |
624 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 613 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
625 v8SetReturnValueString(info, impl->toString(), info.GetIsolate()); | 614 v8SetReturnValueString(info, impl->toString(), info.GetIsolate()); |
626 } | 615 } |
627 | 616 |
628 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | 617 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) |
629 { | 618 { |
630 TestInterface5ImplementationV8Internal::toStringMethod(info); | 619 TestInterface5ImplementationV8Internal::toStringMethod(info); |
631 } | 620 } |
632 | 621 |
633 static void iteratorMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 622 static void iteratorMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
634 { | 623 { |
635 ExceptionState exceptionState(ExceptionState::ExecutionContext, "iterator",
"TestInterface5", info.Holder(), info.GetIsolate()); | 624 ExceptionState exceptionState(ExceptionState::ExecutionContext, "iterator",
"TestInterface5", info.Holder(), info.GetIsolate()); |
636 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 625 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
637 ScriptState* scriptState = ScriptState::forReceiverObject(info); | 626 ScriptState* scriptState = ScriptState::forReceiverObject(info); |
638 Iterator* result = impl->iterator(scriptState, exceptionState); | 627 Iterator* result = impl->iterator(scriptState, exceptionState); |
639 if (exceptionState.hadException()) { | 628 if (exceptionState.hadException()) { |
640 exceptionState.throwIfNeeded(); | |
641 return; | 629 return; |
642 } | 630 } |
643 v8SetReturnValue(info, result); | 631 v8SetReturnValue(info, result); |
644 } | 632 } |
645 | 633 |
646 static void iteratorMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | 634 static void iteratorMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) |
647 { | 635 { |
648 TestInterface5ImplementationV8Internal::iteratorMethod(info); | 636 TestInterface5ImplementationV8Internal::iteratorMethod(info); |
649 } | 637 } |
650 | 638 |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
733 TestInterface5ImplementationV8Internal::namedPropertySetter(name, v8Value, i
nfo); | 721 TestInterface5ImplementationV8Internal::namedPropertySetter(name, v8Value, i
nfo); |
734 } | 722 } |
735 | 723 |
736 static void namedPropertyQuery(v8::Local<v8::Name> name, const v8::PropertyCallb
ackInfo<v8::Integer>& info) | 724 static void namedPropertyQuery(v8::Local<v8::Name> name, const v8::PropertyCallb
ackInfo<v8::Integer>& info) |
737 { | 725 { |
738 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 726 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
739 AtomicString propertyName = toCoreAtomicString(name.As<v8::String>()); | 727 AtomicString propertyName = toCoreAtomicString(name.As<v8::String>()); |
740 v8::String::Utf8Value namedProperty(name); | 728 v8::String::Utf8Value namedProperty(name); |
741 ExceptionState exceptionState(ExceptionState::GetterContext, *namedProperty,
"TestInterface5", info.Holder(), info.GetIsolate()); | 729 ExceptionState exceptionState(ExceptionState::GetterContext, *namedProperty,
"TestInterface5", info.Holder(), info.GetIsolate()); |
742 bool result = impl->namedPropertyQuery(propertyName, exceptionState); | 730 bool result = impl->namedPropertyQuery(propertyName, exceptionState); |
743 if (exceptionState.throwIfNeeded()) | 731 if (exceptionState.hadException()) |
744 return; | 732 return; |
745 if (!result) | 733 if (!result) |
746 return; | 734 return; |
747 v8SetReturnValueInt(info, v8::None); | 735 v8SetReturnValueInt(info, v8::None); |
748 } | 736 } |
749 | 737 |
750 static void namedPropertyQueryCallback(v8::Local<v8::Name> name, const v8::Prope
rtyCallbackInfo<v8::Integer>& info) | 738 static void namedPropertyQueryCallback(v8::Local<v8::Name> name, const v8::Prope
rtyCallbackInfo<v8::Integer>& info) |
751 { | 739 { |
752 if (!name->IsString()) | 740 if (!name->IsString()) |
753 return; | 741 return; |
(...skipping 15 matching lines...) Expand all Loading... |
769 return; | 757 return; |
770 TestInterface5ImplementationV8Internal::namedPropertyDeleter(name, info); | 758 TestInterface5ImplementationV8Internal::namedPropertyDeleter(name, info); |
771 } | 759 } |
772 | 760 |
773 static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& i
nfo) | 761 static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& i
nfo) |
774 { | 762 { |
775 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 763 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
776 Vector<String> names; | 764 Vector<String> names; |
777 ExceptionState exceptionState(ExceptionState::EnumerationContext, "TestInter
face5", info.Holder(), info.GetIsolate()); | 765 ExceptionState exceptionState(ExceptionState::EnumerationContext, "TestInter
face5", info.Holder(), info.GetIsolate()); |
778 impl->namedPropertyEnumerator(names, exceptionState); | 766 impl->namedPropertyEnumerator(names, exceptionState); |
779 if (exceptionState.throwIfNeeded()) | 767 if (exceptionState.hadException()) |
780 return; | 768 return; |
781 v8::Local<v8::Array> v8names = v8::Array::New(info.GetIsolate(), names.size(
)); | 769 v8::Local<v8::Array> v8names = v8::Array::New(info.GetIsolate(), names.size(
)); |
782 for (size_t i = 0; i < names.size(); ++i) { | 770 for (size_t i = 0; i < names.size(); ++i) { |
783 if (!v8CallBoolean(v8names->CreateDataProperty(info.GetIsolate()->GetCur
rentContext(), i, v8String(info.GetIsolate(), names[i])))) | 771 if (!v8CallBoolean(v8names->CreateDataProperty(info.GetIsolate()->GetCur
rentContext(), i, v8String(info.GetIsolate(), names[i])))) |
784 return; | 772 return; |
785 } | 773 } |
786 v8SetReturnValue(info, v8names); | 774 v8SetReturnValue(info, v8names); |
787 } | 775 } |
788 | 776 |
789 static void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::A
rray>& info) | 777 static void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::A
rray>& info) |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
929 const V8DOMConfiguration::MethodConfiguration windowExposedStaticMethodM
ethodConfiguration = {"windowExposedStaticMethod", TestInterface5ImplementationV
8Internal::windowExposedStaticMethodMethodCallback, 0, 0, v8::None, V8DOMConfigu
ration::ExposedToAllScripts, V8DOMConfiguration::OnInterface}; | 917 const V8DOMConfiguration::MethodConfiguration windowExposedStaticMethodM
ethodConfiguration = {"windowExposedStaticMethod", TestInterface5ImplementationV
8Internal::windowExposedStaticMethodMethodCallback, 0, 0, v8::None, V8DOMConfigu
ration::ExposedToAllScripts, V8DOMConfiguration::OnInterface}; |
930 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(
), prototypeObject, interfaceObject, signature, windowExposedStaticMethodMethodC
onfiguration); | 918 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(
), prototypeObject, interfaceObject, signature, windowExposedStaticMethodMethodC
onfiguration); |
931 } | 919 } |
932 if (executionContext && (executionContext->isDocument() || executionContext-
>isServiceWorkerGlobalScope())) { | 920 if (executionContext && (executionContext->isDocument() || executionContext-
>isServiceWorkerGlobalScope())) { |
933 const V8DOMConfiguration::MethodConfiguration windowAndServiceWorkerExpo
sedMethodMethodConfiguration = {"windowAndServiceWorkerExposedMethod", TestInter
face5ImplementationV8Internal::windowAndServiceWorkerExposedMethodMethodCallback
, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::O
nPrototype}; | 921 const V8DOMConfiguration::MethodConfiguration windowAndServiceWorkerExpo
sedMethodMethodConfiguration = {"windowAndServiceWorkerExposedMethod", TestInter
face5ImplementationV8Internal::windowAndServiceWorkerExposedMethodMethodCallback
, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::O
nPrototype}; |
934 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(
), prototypeObject, interfaceObject, signature, windowAndServiceWorkerExposedMet
hodMethodConfiguration); | 922 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(
), prototypeObject, interfaceObject, signature, windowAndServiceWorkerExposedMet
hodMethodConfiguration); |
935 } | 923 } |
936 } | 924 } |
937 | 925 |
938 } // namespace blink | 926 } // namespace blink |
OLD | NEW |