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. | 5 // This file has been auto-generated by code_generator_v8.py. |
6 // DO NOT MODIFY! | 6 // DO NOT MODIFY! |
7 | 7 |
8 // This file has been generated from the Jinja2 template in | 8 // This file has been generated from the Jinja2 template in |
9 // third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl | 9 // third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl |
10 | 10 |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 TestObject* impl = V8TestObject::toImpl(holder); | 117 TestObject* impl = V8TestObject::toImpl(holder); |
118 | 118 |
119 V8SetReturnValueString(info, impl->stringifierAttribute(), info.GetIsolate()); | 119 V8SetReturnValueString(info, impl->stringifierAttribute(), info.GetIsolate()); |
120 } | 120 } |
121 | 121 |
122 static void stringifierAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::FunctionCallbackInfo<v8::Value>& info) { | 122 static void stringifierAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::FunctionCallbackInfo<v8::Value>& info) { |
123 v8::Isolate* isolate = info.GetIsolate(); | 123 v8::Isolate* isolate = info.GetIsolate(); |
124 ALLOW_UNUSED_LOCAL(isolate); | 124 ALLOW_UNUSED_LOCAL(isolate); |
125 | 125 |
126 v8::Local<v8::Object> holder = info.Holder(); | 126 v8::Local<v8::Object> holder = info.Holder(); |
| 127 ALLOW_UNUSED_LOCAL(holder); |
| 128 |
127 TestObject* impl = V8TestObject::toImpl(holder); | 129 TestObject* impl = V8TestObject::toImpl(holder); |
128 | 130 |
129 // Prepare the value to be set. | 131 // Prepare the value to be set. |
130 V8StringResource<> cppValue = v8Value; | 132 V8StringResource<> cppValue = v8Value; |
131 if (!cppValue.Prepare()) | 133 if (!cppValue.Prepare()) |
132 return; | 134 return; |
133 | 135 |
134 impl->setStringifierAttribute(cppValue); | 136 impl->setStringifierAttribute(cppValue); |
135 } | 137 } |
136 | 138 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 TestObject* impl = V8TestObject::toImpl(holder); | 177 TestObject* impl = V8TestObject::toImpl(holder); |
176 | 178 |
177 V8SetReturnValue(info, V8DateOrNaN(info.GetIsolate(), impl->dateAttribute())); | 179 V8SetReturnValue(info, V8DateOrNaN(info.GetIsolate(), impl->dateAttribute())); |
178 } | 180 } |
179 | 181 |
180 static void dateAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:FunctionCallbackInfo<v8::Value>& info) { | 182 static void dateAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:FunctionCallbackInfo<v8::Value>& info) { |
181 v8::Isolate* isolate = info.GetIsolate(); | 183 v8::Isolate* isolate = info.GetIsolate(); |
182 ALLOW_UNUSED_LOCAL(isolate); | 184 ALLOW_UNUSED_LOCAL(isolate); |
183 | 185 |
184 v8::Local<v8::Object> holder = info.Holder(); | 186 v8::Local<v8::Object> holder = info.Holder(); |
| 187 ALLOW_UNUSED_LOCAL(holder); |
| 188 |
185 TestObject* impl = V8TestObject::toImpl(holder); | 189 TestObject* impl = V8TestObject::toImpl(holder); |
186 | 190 |
187 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "dateAttribute"); | 191 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "dateAttribute"); |
188 | 192 |
189 // Prepare the value to be set. | 193 // Prepare the value to be set. |
190 double cppValue = NativeValueTraits<IDLDate>::NativeValue(info.GetIsolate(), v
8Value, exceptionState); | 194 double cppValue = NativeValueTraits<IDLDate>::NativeValue(info.GetIsolate(), v
8Value, exceptionState); |
191 if (exceptionState.HadException()) | 195 if (exceptionState.HadException()) |
192 return; | 196 return; |
193 | 197 |
194 impl->setDateAttribute(cppValue); | 198 impl->setDateAttribute(cppValue); |
195 } | 199 } |
196 | 200 |
197 static void stringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Va
lue>& info) { | 201 static void stringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Va
lue>& info) { |
198 v8::Local<v8::Object> holder = info.Holder(); | 202 v8::Local<v8::Object> holder = info.Holder(); |
199 | 203 |
200 TestObject* impl = V8TestObject::toImpl(holder); | 204 TestObject* impl = V8TestObject::toImpl(holder); |
201 | 205 |
202 V8SetReturnValueString(info, impl->stringAttribute(), info.GetIsolate()); | 206 V8SetReturnValueString(info, impl->stringAttribute(), info.GetIsolate()); |
203 } | 207 } |
204 | 208 |
205 static void stringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::FunctionCallbackInfo<v8::Value>& info) { | 209 static void stringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::FunctionCallbackInfo<v8::Value>& info) { |
206 v8::Isolate* isolate = info.GetIsolate(); | 210 v8::Isolate* isolate = info.GetIsolate(); |
207 ALLOW_UNUSED_LOCAL(isolate); | 211 ALLOW_UNUSED_LOCAL(isolate); |
208 | 212 |
209 v8::Local<v8::Object> holder = info.Holder(); | 213 v8::Local<v8::Object> holder = info.Holder(); |
| 214 ALLOW_UNUSED_LOCAL(holder); |
| 215 |
210 TestObject* impl = V8TestObject::toImpl(holder); | 216 TestObject* impl = V8TestObject::toImpl(holder); |
211 | 217 |
212 // Prepare the value to be set. | 218 // Prepare the value to be set. |
213 V8StringResource<> cppValue = v8Value; | 219 V8StringResource<> cppValue = v8Value; |
214 if (!cppValue.Prepare()) | 220 if (!cppValue.Prepare()) |
215 return; | 221 return; |
216 | 222 |
217 impl->setStringAttribute(cppValue); | 223 impl->setStringAttribute(cppValue); |
218 } | 224 } |
219 | 225 |
220 static void byteStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8
::Value>& info) { | 226 static void byteStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8
::Value>& info) { |
221 v8::Local<v8::Object> holder = info.Holder(); | 227 v8::Local<v8::Object> holder = info.Holder(); |
222 | 228 |
223 TestObject* impl = V8TestObject::toImpl(holder); | 229 TestObject* impl = V8TestObject::toImpl(holder); |
224 | 230 |
225 V8SetReturnValueString(info, impl->byteStringAttribute(), info.GetIsolate()); | 231 V8SetReturnValueString(info, impl->byteStringAttribute(), info.GetIsolate()); |
226 } | 232 } |
227 | 233 |
228 static void byteStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::FunctionCallbackInfo<v8::Value>& info) { | 234 static void byteStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::FunctionCallbackInfo<v8::Value>& info) { |
229 v8::Isolate* isolate = info.GetIsolate(); | 235 v8::Isolate* isolate = info.GetIsolate(); |
230 ALLOW_UNUSED_LOCAL(isolate); | 236 ALLOW_UNUSED_LOCAL(isolate); |
231 | 237 |
232 v8::Local<v8::Object> holder = info.Holder(); | 238 v8::Local<v8::Object> holder = info.Holder(); |
| 239 ALLOW_UNUSED_LOCAL(holder); |
| 240 |
233 TestObject* impl = V8TestObject::toImpl(holder); | 241 TestObject* impl = V8TestObject::toImpl(holder); |
234 | 242 |
235 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "byteStringAttribute"); | 243 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "byteStringAttribute"); |
236 | 244 |
237 // Prepare the value to be set. | 245 // Prepare the value to be set. |
238 V8StringResource<> cppValue = NativeValueTraits<IDLByteString>::NativeValue(in
fo.GetIsolate(), v8Value, exceptionState); | 246 V8StringResource<> cppValue = NativeValueTraits<IDLByteString>::NativeValue(in
fo.GetIsolate(), v8Value, exceptionState); |
239 if (exceptionState.HadException()) | 247 if (exceptionState.HadException()) |
240 return; | 248 return; |
241 | 249 |
242 impl->setByteStringAttribute(cppValue); | 250 impl->setByteStringAttribute(cppValue); |
243 } | 251 } |
244 | 252 |
245 static void usvStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8:
:Value>& info) { | 253 static void usvStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8:
:Value>& info) { |
246 v8::Local<v8::Object> holder = info.Holder(); | 254 v8::Local<v8::Object> holder = info.Holder(); |
247 | 255 |
248 TestObject* impl = V8TestObject::toImpl(holder); | 256 TestObject* impl = V8TestObject::toImpl(holder); |
249 | 257 |
250 V8SetReturnValueString(info, impl->usvStringAttribute(), info.GetIsolate()); | 258 V8SetReturnValueString(info, impl->usvStringAttribute(), info.GetIsolate()); |
251 } | 259 } |
252 | 260 |
253 static void usvStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, cons
t v8::FunctionCallbackInfo<v8::Value>& info) { | 261 static void usvStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, cons
t v8::FunctionCallbackInfo<v8::Value>& info) { |
254 v8::Isolate* isolate = info.GetIsolate(); | 262 v8::Isolate* isolate = info.GetIsolate(); |
255 ALLOW_UNUSED_LOCAL(isolate); | 263 ALLOW_UNUSED_LOCAL(isolate); |
256 | 264 |
257 v8::Local<v8::Object> holder = info.Holder(); | 265 v8::Local<v8::Object> holder = info.Holder(); |
| 266 ALLOW_UNUSED_LOCAL(holder); |
| 267 |
258 TestObject* impl = V8TestObject::toImpl(holder); | 268 TestObject* impl = V8TestObject::toImpl(holder); |
259 | 269 |
260 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "usvStringAttribute"); | 270 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "usvStringAttribute"); |
261 | 271 |
262 // Prepare the value to be set. | 272 // Prepare the value to be set. |
263 V8StringResource<> cppValue = NativeValueTraits<IDLUSVString>::NativeValue(inf
o.GetIsolate(), v8Value, exceptionState); | 273 V8StringResource<> cppValue = NativeValueTraits<IDLUSVString>::NativeValue(inf
o.GetIsolate(), v8Value, exceptionState); |
264 if (exceptionState.HadException()) | 274 if (exceptionState.HadException()) |
265 return; | 275 return; |
266 | 276 |
267 impl->setUsvStringAttribute(cppValue); | 277 impl->setUsvStringAttribute(cppValue); |
268 } | 278 } |
269 | 279 |
270 static void domTimeStampAttributeAttributeGetter(const v8::FunctionCallbackInfo<
v8::Value>& info) { | 280 static void domTimeStampAttributeAttributeGetter(const v8::FunctionCallbackInfo<
v8::Value>& info) { |
271 v8::Local<v8::Object> holder = info.Holder(); | 281 v8::Local<v8::Object> holder = info.Holder(); |
272 | 282 |
273 TestObject* impl = V8TestObject::toImpl(holder); | 283 TestObject* impl = V8TestObject::toImpl(holder); |
274 | 284 |
275 V8SetReturnValue(info, static_cast<double>(impl->domTimeStampAttribute())); | 285 V8SetReturnValue(info, static_cast<double>(impl->domTimeStampAttribute())); |
276 } | 286 } |
277 | 287 |
278 static void domTimeStampAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::FunctionCallbackInfo<v8::Value>& info) { | 288 static void domTimeStampAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::FunctionCallbackInfo<v8::Value>& info) { |
279 v8::Isolate* isolate = info.GetIsolate(); | 289 v8::Isolate* isolate = info.GetIsolate(); |
280 ALLOW_UNUSED_LOCAL(isolate); | 290 ALLOW_UNUSED_LOCAL(isolate); |
281 | 291 |
282 v8::Local<v8::Object> holder = info.Holder(); | 292 v8::Local<v8::Object> holder = info.Holder(); |
| 293 ALLOW_UNUSED_LOCAL(holder); |
| 294 |
283 TestObject* impl = V8TestObject::toImpl(holder); | 295 TestObject* impl = V8TestObject::toImpl(holder); |
284 | 296 |
285 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "domTimeStampAttribute"); | 297 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "domTimeStampAttribute"); |
286 | 298 |
287 // Prepare the value to be set. | 299 // Prepare the value to be set. |
288 uint64_t cppValue = NativeValueTraits<IDLUnsignedLongLong>::NativeValue(info.G
etIsolate(), v8Value, exceptionState, kNormalConversion); | 300 uint64_t cppValue = NativeValueTraits<IDLUnsignedLongLong>::NativeValue(info.G
etIsolate(), v8Value, exceptionState, kNormalConversion); |
289 if (exceptionState.HadException()) | 301 if (exceptionState.HadException()) |
290 return; | 302 return; |
291 | 303 |
292 impl->setDomTimeStampAttribute(cppValue); | 304 impl->setDomTimeStampAttribute(cppValue); |
293 } | 305 } |
294 | 306 |
295 static void booleanAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::V
alue>& info) { | 307 static void booleanAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::V
alue>& info) { |
296 v8::Local<v8::Object> holder = info.Holder(); | 308 v8::Local<v8::Object> holder = info.Holder(); |
297 | 309 |
298 TestObject* impl = V8TestObject::toImpl(holder); | 310 TestObject* impl = V8TestObject::toImpl(holder); |
299 | 311 |
300 V8SetReturnValueBool(info, impl->booleanAttribute()); | 312 V8SetReturnValueBool(info, impl->booleanAttribute()); |
301 } | 313 } |
302 | 314 |
303 static void booleanAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::FunctionCallbackInfo<v8::Value>& info) { | 315 static void booleanAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::FunctionCallbackInfo<v8::Value>& info) { |
304 v8::Isolate* isolate = info.GetIsolate(); | 316 v8::Isolate* isolate = info.GetIsolate(); |
305 ALLOW_UNUSED_LOCAL(isolate); | 317 ALLOW_UNUSED_LOCAL(isolate); |
306 | 318 |
307 v8::Local<v8::Object> holder = info.Holder(); | 319 v8::Local<v8::Object> holder = info.Holder(); |
| 320 ALLOW_UNUSED_LOCAL(holder); |
| 321 |
308 TestObject* impl = V8TestObject::toImpl(holder); | 322 TestObject* impl = V8TestObject::toImpl(holder); |
309 | 323 |
310 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "booleanAttribute"); | 324 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "booleanAttribute"); |
311 | 325 |
312 // Prepare the value to be set. | 326 // Prepare the value to be set. |
313 bool cppValue = NativeValueTraits<IDLBoolean>::NativeValue(info.GetIsolate(),
v8Value, exceptionState); | 327 bool cppValue = NativeValueTraits<IDLBoolean>::NativeValue(info.GetIsolate(),
v8Value, exceptionState); |
314 if (exceptionState.HadException()) | 328 if (exceptionState.HadException()) |
315 return; | 329 return; |
316 | 330 |
317 impl->setBooleanAttribute(cppValue); | 331 impl->setBooleanAttribute(cppValue); |
318 } | 332 } |
319 | 333 |
320 static void byteAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Valu
e>& info) { | 334 static void byteAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Valu
e>& info) { |
321 v8::Local<v8::Object> holder = info.Holder(); | 335 v8::Local<v8::Object> holder = info.Holder(); |
322 | 336 |
323 TestObject* impl = V8TestObject::toImpl(holder); | 337 TestObject* impl = V8TestObject::toImpl(holder); |
324 | 338 |
325 V8SetReturnValueInt(info, impl->byteAttribute()); | 339 V8SetReturnValueInt(info, impl->byteAttribute()); |
326 } | 340 } |
327 | 341 |
328 static void byteAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:FunctionCallbackInfo<v8::Value>& info) { | 342 static void byteAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:FunctionCallbackInfo<v8::Value>& info) { |
329 v8::Isolate* isolate = info.GetIsolate(); | 343 v8::Isolate* isolate = info.GetIsolate(); |
330 ALLOW_UNUSED_LOCAL(isolate); | 344 ALLOW_UNUSED_LOCAL(isolate); |
331 | 345 |
332 v8::Local<v8::Object> holder = info.Holder(); | 346 v8::Local<v8::Object> holder = info.Holder(); |
| 347 ALLOW_UNUSED_LOCAL(holder); |
| 348 |
333 TestObject* impl = V8TestObject::toImpl(holder); | 349 TestObject* impl = V8TestObject::toImpl(holder); |
334 | 350 |
335 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "byteAttribute"); | 351 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "byteAttribute"); |
336 | 352 |
337 // Prepare the value to be set. | 353 // Prepare the value to be set. |
338 int8_t cppValue = NativeValueTraits<IDLByte>::NativeValue(info.GetIsolate(), v
8Value, exceptionState, kNormalConversion); | 354 int8_t cppValue = NativeValueTraits<IDLByte>::NativeValue(info.GetIsolate(), v
8Value, exceptionState, kNormalConversion); |
339 if (exceptionState.HadException()) | 355 if (exceptionState.HadException()) |
340 return; | 356 return; |
341 | 357 |
342 impl->setByteAttribute(cppValue); | 358 impl->setByteAttribute(cppValue); |
343 } | 359 } |
344 | 360 |
345 static void doubleAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Va
lue>& info) { | 361 static void doubleAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Va
lue>& info) { |
346 v8::Local<v8::Object> holder = info.Holder(); | 362 v8::Local<v8::Object> holder = info.Holder(); |
347 | 363 |
348 TestObject* impl = V8TestObject::toImpl(holder); | 364 TestObject* impl = V8TestObject::toImpl(holder); |
349 | 365 |
350 V8SetReturnValue(info, impl->doubleAttribute()); | 366 V8SetReturnValue(info, impl->doubleAttribute()); |
351 } | 367 } |
352 | 368 |
353 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::FunctionCallbackInfo<v8::Value>& info) { | 369 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::FunctionCallbackInfo<v8::Value>& info) { |
354 v8::Isolate* isolate = info.GetIsolate(); | 370 v8::Isolate* isolate = info.GetIsolate(); |
355 ALLOW_UNUSED_LOCAL(isolate); | 371 ALLOW_UNUSED_LOCAL(isolate); |
356 | 372 |
357 v8::Local<v8::Object> holder = info.Holder(); | 373 v8::Local<v8::Object> holder = info.Holder(); |
| 374 ALLOW_UNUSED_LOCAL(holder); |
| 375 |
358 TestObject* impl = V8TestObject::toImpl(holder); | 376 TestObject* impl = V8TestObject::toImpl(holder); |
359 | 377 |
360 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "doubleAttribute"); | 378 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "doubleAttribute"); |
361 | 379 |
362 // Prepare the value to be set. | 380 // Prepare the value to be set. |
363 double cppValue = NativeValueTraits<IDLDouble>::NativeValue(info.GetIsolate(),
v8Value, exceptionState); | 381 double cppValue = NativeValueTraits<IDLDouble>::NativeValue(info.GetIsolate(),
v8Value, exceptionState); |
364 if (exceptionState.HadException()) | 382 if (exceptionState.HadException()) |
365 return; | 383 return; |
366 | 384 |
367 impl->setDoubleAttribute(cppValue); | 385 impl->setDoubleAttribute(cppValue); |
368 } | 386 } |
369 | 387 |
370 static void floatAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Val
ue>& info) { | 388 static void floatAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Val
ue>& info) { |
371 v8::Local<v8::Object> holder = info.Holder(); | 389 v8::Local<v8::Object> holder = info.Holder(); |
372 | 390 |
373 TestObject* impl = V8TestObject::toImpl(holder); | 391 TestObject* impl = V8TestObject::toImpl(holder); |
374 | 392 |
375 V8SetReturnValue(info, impl->floatAttribute()); | 393 V8SetReturnValue(info, impl->floatAttribute()); |
376 } | 394 } |
377 | 395 |
378 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::FunctionCallbackInfo<v8::Value>& info) { | 396 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::FunctionCallbackInfo<v8::Value>& info) { |
379 v8::Isolate* isolate = info.GetIsolate(); | 397 v8::Isolate* isolate = info.GetIsolate(); |
380 ALLOW_UNUSED_LOCAL(isolate); | 398 ALLOW_UNUSED_LOCAL(isolate); |
381 | 399 |
382 v8::Local<v8::Object> holder = info.Holder(); | 400 v8::Local<v8::Object> holder = info.Holder(); |
| 401 ALLOW_UNUSED_LOCAL(holder); |
| 402 |
383 TestObject* impl = V8TestObject::toImpl(holder); | 403 TestObject* impl = V8TestObject::toImpl(holder); |
384 | 404 |
385 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "floatAttribute"); | 405 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "floatAttribute"); |
386 | 406 |
387 // Prepare the value to be set. | 407 // Prepare the value to be set. |
388 float cppValue = NativeValueTraits<IDLFloat>::NativeValue(info.GetIsolate(), v
8Value, exceptionState); | 408 float cppValue = NativeValueTraits<IDLFloat>::NativeValue(info.GetIsolate(), v
8Value, exceptionState); |
389 if (exceptionState.HadException()) | 409 if (exceptionState.HadException()) |
390 return; | 410 return; |
391 | 411 |
392 impl->setFloatAttribute(cppValue); | 412 impl->setFloatAttribute(cppValue); |
393 } | 413 } |
394 | 414 |
395 static void longAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Valu
e>& info) { | 415 static void longAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Valu
e>& info) { |
396 v8::Local<v8::Object> holder = info.Holder(); | 416 v8::Local<v8::Object> holder = info.Holder(); |
397 | 417 |
398 TestObject* impl = V8TestObject::toImpl(holder); | 418 TestObject* impl = V8TestObject::toImpl(holder); |
399 | 419 |
400 V8SetReturnValueInt(info, impl->longAttribute()); | 420 V8SetReturnValueInt(info, impl->longAttribute()); |
401 } | 421 } |
402 | 422 |
403 static void longAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:FunctionCallbackInfo<v8::Value>& info) { | 423 static void longAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:FunctionCallbackInfo<v8::Value>& info) { |
404 v8::Isolate* isolate = info.GetIsolate(); | 424 v8::Isolate* isolate = info.GetIsolate(); |
405 ALLOW_UNUSED_LOCAL(isolate); | 425 ALLOW_UNUSED_LOCAL(isolate); |
406 | 426 |
407 v8::Local<v8::Object> holder = info.Holder(); | 427 v8::Local<v8::Object> holder = info.Holder(); |
| 428 ALLOW_UNUSED_LOCAL(holder); |
| 429 |
408 TestObject* impl = V8TestObject::toImpl(holder); | 430 TestObject* impl = V8TestObject::toImpl(holder); |
409 | 431 |
410 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "longAttribute"); | 432 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "longAttribute"); |
411 | 433 |
412 // Prepare the value to be set. | 434 // Prepare the value to be set. |
413 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); | 435 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); |
414 if (exceptionState.HadException()) | 436 if (exceptionState.HadException()) |
415 return; | 437 return; |
416 | 438 |
417 impl->setLongAttribute(cppValue); | 439 impl->setLongAttribute(cppValue); |
418 } | 440 } |
419 | 441 |
420 static void longLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::
Value>& info) { | 442 static void longLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::
Value>& info) { |
421 v8::Local<v8::Object> holder = info.Holder(); | 443 v8::Local<v8::Object> holder = info.Holder(); |
422 | 444 |
423 TestObject* impl = V8TestObject::toImpl(holder); | 445 TestObject* impl = V8TestObject::toImpl(holder); |
424 | 446 |
425 V8SetReturnValue(info, static_cast<double>(impl->longLongAttribute())); | 447 V8SetReturnValue(info, static_cast<double>(impl->longLongAttribute())); |
426 } | 448 } |
427 | 449 |
428 static void longLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::FunctionCallbackInfo<v8::Value>& info) { | 450 static void longLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::FunctionCallbackInfo<v8::Value>& info) { |
429 v8::Isolate* isolate = info.GetIsolate(); | 451 v8::Isolate* isolate = info.GetIsolate(); |
430 ALLOW_UNUSED_LOCAL(isolate); | 452 ALLOW_UNUSED_LOCAL(isolate); |
431 | 453 |
432 v8::Local<v8::Object> holder = info.Holder(); | 454 v8::Local<v8::Object> holder = info.Holder(); |
| 455 ALLOW_UNUSED_LOCAL(holder); |
| 456 |
433 TestObject* impl = V8TestObject::toImpl(holder); | 457 TestObject* impl = V8TestObject::toImpl(holder); |
434 | 458 |
435 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "longLongAttribute"); | 459 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "longLongAttribute"); |
436 | 460 |
437 // Prepare the value to be set. | 461 // Prepare the value to be set. |
438 int64_t cppValue = NativeValueTraits<IDLLongLong>::NativeValue(info.GetIsolate
(), v8Value, exceptionState, kNormalConversion); | 462 int64_t cppValue = NativeValueTraits<IDLLongLong>::NativeValue(info.GetIsolate
(), v8Value, exceptionState, kNormalConversion); |
439 if (exceptionState.HadException()) | 463 if (exceptionState.HadException()) |
440 return; | 464 return; |
441 | 465 |
442 impl->setLongLongAttribute(cppValue); | 466 impl->setLongLongAttribute(cppValue); |
443 } | 467 } |
444 | 468 |
445 static void octetAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Val
ue>& info) { | 469 static void octetAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Val
ue>& info) { |
446 v8::Local<v8::Object> holder = info.Holder(); | 470 v8::Local<v8::Object> holder = info.Holder(); |
447 | 471 |
448 TestObject* impl = V8TestObject::toImpl(holder); | 472 TestObject* impl = V8TestObject::toImpl(holder); |
449 | 473 |
450 V8SetReturnValueUnsigned(info, impl->octetAttribute()); | 474 V8SetReturnValueUnsigned(info, impl->octetAttribute()); |
451 } | 475 } |
452 | 476 |
453 static void octetAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::FunctionCallbackInfo<v8::Value>& info) { | 477 static void octetAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::FunctionCallbackInfo<v8::Value>& info) { |
454 v8::Isolate* isolate = info.GetIsolate(); | 478 v8::Isolate* isolate = info.GetIsolate(); |
455 ALLOW_UNUSED_LOCAL(isolate); | 479 ALLOW_UNUSED_LOCAL(isolate); |
456 | 480 |
457 v8::Local<v8::Object> holder = info.Holder(); | 481 v8::Local<v8::Object> holder = info.Holder(); |
| 482 ALLOW_UNUSED_LOCAL(holder); |
| 483 |
458 TestObject* impl = V8TestObject::toImpl(holder); | 484 TestObject* impl = V8TestObject::toImpl(holder); |
459 | 485 |
460 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "octetAttribute"); | 486 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "octetAttribute"); |
461 | 487 |
462 // Prepare the value to be set. | 488 // Prepare the value to be set. |
463 uint8_t cppValue = NativeValueTraits<IDLOctet>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); | 489 uint8_t cppValue = NativeValueTraits<IDLOctet>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); |
464 if (exceptionState.HadException()) | 490 if (exceptionState.HadException()) |
465 return; | 491 return; |
466 | 492 |
467 impl->setOctetAttribute(cppValue); | 493 impl->setOctetAttribute(cppValue); |
468 } | 494 } |
469 | 495 |
470 static void shortAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Val
ue>& info) { | 496 static void shortAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Val
ue>& info) { |
471 v8::Local<v8::Object> holder = info.Holder(); | 497 v8::Local<v8::Object> holder = info.Holder(); |
472 | 498 |
473 TestObject* impl = V8TestObject::toImpl(holder); | 499 TestObject* impl = V8TestObject::toImpl(holder); |
474 | 500 |
475 V8SetReturnValueInt(info, impl->shortAttribute()); | 501 V8SetReturnValueInt(info, impl->shortAttribute()); |
476 } | 502 } |
477 | 503 |
478 static void shortAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::FunctionCallbackInfo<v8::Value>& info) { | 504 static void shortAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::FunctionCallbackInfo<v8::Value>& info) { |
479 v8::Isolate* isolate = info.GetIsolate(); | 505 v8::Isolate* isolate = info.GetIsolate(); |
480 ALLOW_UNUSED_LOCAL(isolate); | 506 ALLOW_UNUSED_LOCAL(isolate); |
481 | 507 |
482 v8::Local<v8::Object> holder = info.Holder(); | 508 v8::Local<v8::Object> holder = info.Holder(); |
| 509 ALLOW_UNUSED_LOCAL(holder); |
| 510 |
483 TestObject* impl = V8TestObject::toImpl(holder); | 511 TestObject* impl = V8TestObject::toImpl(holder); |
484 | 512 |
485 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "shortAttribute"); | 513 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "shortAttribute"); |
486 | 514 |
487 // Prepare the value to be set. | 515 // Prepare the value to be set. |
488 int16_t cppValue = NativeValueTraits<IDLShort>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); | 516 int16_t cppValue = NativeValueTraits<IDLShort>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); |
489 if (exceptionState.HadException()) | 517 if (exceptionState.HadException()) |
490 return; | 518 return; |
491 | 519 |
492 impl->setShortAttribute(cppValue); | 520 impl->setShortAttribute(cppValue); |
493 } | 521 } |
494 | 522 |
495 static void unrestrictedDoubleAttributeAttributeGetter(const v8::FunctionCallbac
kInfo<v8::Value>& info) { | 523 static void unrestrictedDoubleAttributeAttributeGetter(const v8::FunctionCallbac
kInfo<v8::Value>& info) { |
496 v8::Local<v8::Object> holder = info.Holder(); | 524 v8::Local<v8::Object> holder = info.Holder(); |
497 | 525 |
498 TestObject* impl = V8TestObject::toImpl(holder); | 526 TestObject* impl = V8TestObject::toImpl(holder); |
499 | 527 |
500 V8SetReturnValue(info, impl->unrestrictedDoubleAttribute()); | 528 V8SetReturnValue(info, impl->unrestrictedDoubleAttribute()); |
501 } | 529 } |
502 | 530 |
503 static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::FunctionCallbackInfo<v8::Value>& info) { | 531 static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::FunctionCallbackInfo<v8::Value>& info) { |
504 v8::Isolate* isolate = info.GetIsolate(); | 532 v8::Isolate* isolate = info.GetIsolate(); |
505 ALLOW_UNUSED_LOCAL(isolate); | 533 ALLOW_UNUSED_LOCAL(isolate); |
506 | 534 |
507 v8::Local<v8::Object> holder = info.Holder(); | 535 v8::Local<v8::Object> holder = info.Holder(); |
| 536 ALLOW_UNUSED_LOCAL(holder); |
| 537 |
508 TestObject* impl = V8TestObject::toImpl(holder); | 538 TestObject* impl = V8TestObject::toImpl(holder); |
509 | 539 |
510 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "unrestrictedDoubleAttribute"); | 540 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "unrestrictedDoubleAttribute"); |
511 | 541 |
512 // Prepare the value to be set. | 542 // Prepare the value to be set. |
513 double cppValue = NativeValueTraits<IDLUnrestrictedDouble>::NativeValue(info.G
etIsolate(), v8Value, exceptionState); | 543 double cppValue = NativeValueTraits<IDLUnrestrictedDouble>::NativeValue(info.G
etIsolate(), v8Value, exceptionState); |
514 if (exceptionState.HadException()) | 544 if (exceptionState.HadException()) |
515 return; | 545 return; |
516 | 546 |
517 impl->setUnrestrictedDoubleAttribute(cppValue); | 547 impl->setUnrestrictedDoubleAttribute(cppValue); |
518 } | 548 } |
519 | 549 |
520 static void unrestrictedFloatAttributeAttributeGetter(const v8::FunctionCallback
Info<v8::Value>& info) { | 550 static void unrestrictedFloatAttributeAttributeGetter(const v8::FunctionCallback
Info<v8::Value>& info) { |
521 v8::Local<v8::Object> holder = info.Holder(); | 551 v8::Local<v8::Object> holder = info.Holder(); |
522 | 552 |
523 TestObject* impl = V8TestObject::toImpl(holder); | 553 TestObject* impl = V8TestObject::toImpl(holder); |
524 | 554 |
525 V8SetReturnValue(info, impl->unrestrictedFloatAttribute()); | 555 V8SetReturnValue(info, impl->unrestrictedFloatAttribute()); |
526 } | 556 } |
527 | 557 |
528 static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::FunctionCallbackInfo<v8::Value>& info) { | 558 static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::FunctionCallbackInfo<v8::Value>& info) { |
529 v8::Isolate* isolate = info.GetIsolate(); | 559 v8::Isolate* isolate = info.GetIsolate(); |
530 ALLOW_UNUSED_LOCAL(isolate); | 560 ALLOW_UNUSED_LOCAL(isolate); |
531 | 561 |
532 v8::Local<v8::Object> holder = info.Holder(); | 562 v8::Local<v8::Object> holder = info.Holder(); |
| 563 ALLOW_UNUSED_LOCAL(holder); |
| 564 |
533 TestObject* impl = V8TestObject::toImpl(holder); | 565 TestObject* impl = V8TestObject::toImpl(holder); |
534 | 566 |
535 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "unrestrictedFloatAttribute"); | 567 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "unrestrictedFloatAttribute"); |
536 | 568 |
537 // Prepare the value to be set. | 569 // Prepare the value to be set. |
538 float cppValue = NativeValueTraits<IDLUnrestrictedFloat>::NativeValue(info.Get
Isolate(), v8Value, exceptionState); | 570 float cppValue = NativeValueTraits<IDLUnrestrictedFloat>::NativeValue(info.Get
Isolate(), v8Value, exceptionState); |
539 if (exceptionState.HadException()) | 571 if (exceptionState.HadException()) |
540 return; | 572 return; |
541 | 573 |
542 impl->setUnrestrictedFloatAttribute(cppValue); | 574 impl->setUnrestrictedFloatAttribute(cppValue); |
543 } | 575 } |
544 | 576 |
545 static void unsignedLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<
v8::Value>& info) { | 577 static void unsignedLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<
v8::Value>& info) { |
546 v8::Local<v8::Object> holder = info.Holder(); | 578 v8::Local<v8::Object> holder = info.Holder(); |
547 | 579 |
548 TestObject* impl = V8TestObject::toImpl(holder); | 580 TestObject* impl = V8TestObject::toImpl(holder); |
549 | 581 |
550 V8SetReturnValueUnsigned(info, impl->unsignedLongAttribute()); | 582 V8SetReturnValueUnsigned(info, impl->unsignedLongAttribute()); |
551 } | 583 } |
552 | 584 |
553 static void unsignedLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::FunctionCallbackInfo<v8::Value>& info) { | 585 static void unsignedLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::FunctionCallbackInfo<v8::Value>& info) { |
554 v8::Isolate* isolate = info.GetIsolate(); | 586 v8::Isolate* isolate = info.GetIsolate(); |
555 ALLOW_UNUSED_LOCAL(isolate); | 587 ALLOW_UNUSED_LOCAL(isolate); |
556 | 588 |
557 v8::Local<v8::Object> holder = info.Holder(); | 589 v8::Local<v8::Object> holder = info.Holder(); |
| 590 ALLOW_UNUSED_LOCAL(holder); |
| 591 |
558 TestObject* impl = V8TestObject::toImpl(holder); | 592 TestObject* impl = V8TestObject::toImpl(holder); |
559 | 593 |
560 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "unsignedLongAttribute"); | 594 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "unsignedLongAttribute"); |
561 | 595 |
562 // Prepare the value to be set. | 596 // Prepare the value to be set. |
563 uint32_t cppValue = NativeValueTraits<IDLUnsignedLong>::NativeValue(info.GetIs
olate(), v8Value, exceptionState, kNormalConversion); | 597 uint32_t cppValue = NativeValueTraits<IDLUnsignedLong>::NativeValue(info.GetIs
olate(), v8Value, exceptionState, kNormalConversion); |
564 if (exceptionState.HadException()) | 598 if (exceptionState.HadException()) |
565 return; | 599 return; |
566 | 600 |
567 impl->setUnsignedLongAttribute(cppValue); | 601 impl->setUnsignedLongAttribute(cppValue); |
568 } | 602 } |
569 | 603 |
570 static void unsignedLongLongAttributeAttributeGetter(const v8::FunctionCallbackI
nfo<v8::Value>& info) { | 604 static void unsignedLongLongAttributeAttributeGetter(const v8::FunctionCallbackI
nfo<v8::Value>& info) { |
571 v8::Local<v8::Object> holder = info.Holder(); | 605 v8::Local<v8::Object> holder = info.Holder(); |
572 | 606 |
573 TestObject* impl = V8TestObject::toImpl(holder); | 607 TestObject* impl = V8TestObject::toImpl(holder); |
574 | 608 |
575 V8SetReturnValue(info, static_cast<double>(impl->unsignedLongLongAttribute()))
; | 609 V8SetReturnValue(info, static_cast<double>(impl->unsignedLongLongAttribute()))
; |
576 } | 610 } |
577 | 611 |
578 static void unsignedLongLongAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::FunctionCallbackInfo<v8::Value>& info) { | 612 static void unsignedLongLongAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::FunctionCallbackInfo<v8::Value>& info) { |
579 v8::Isolate* isolate = info.GetIsolate(); | 613 v8::Isolate* isolate = info.GetIsolate(); |
580 ALLOW_UNUSED_LOCAL(isolate); | 614 ALLOW_UNUSED_LOCAL(isolate); |
581 | 615 |
582 v8::Local<v8::Object> holder = info.Holder(); | 616 v8::Local<v8::Object> holder = info.Holder(); |
| 617 ALLOW_UNUSED_LOCAL(holder); |
| 618 |
583 TestObject* impl = V8TestObject::toImpl(holder); | 619 TestObject* impl = V8TestObject::toImpl(holder); |
584 | 620 |
585 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "unsignedLongLongAttribute"); | 621 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "unsignedLongLongAttribute"); |
586 | 622 |
587 // Prepare the value to be set. | 623 // Prepare the value to be set. |
588 uint64_t cppValue = NativeValueTraits<IDLUnsignedLongLong>::NativeValue(info.G
etIsolate(), v8Value, exceptionState, kNormalConversion); | 624 uint64_t cppValue = NativeValueTraits<IDLUnsignedLongLong>::NativeValue(info.G
etIsolate(), v8Value, exceptionState, kNormalConversion); |
589 if (exceptionState.HadException()) | 625 if (exceptionState.HadException()) |
590 return; | 626 return; |
591 | 627 |
592 impl->setUnsignedLongLongAttribute(cppValue); | 628 impl->setUnsignedLongLongAttribute(cppValue); |
593 } | 629 } |
594 | 630 |
595 static void unsignedShortAttributeAttributeGetter(const v8::FunctionCallbackInfo
<v8::Value>& info) { | 631 static void unsignedShortAttributeAttributeGetter(const v8::FunctionCallbackInfo
<v8::Value>& info) { |
596 v8::Local<v8::Object> holder = info.Holder(); | 632 v8::Local<v8::Object> holder = info.Holder(); |
597 | 633 |
598 TestObject* impl = V8TestObject::toImpl(holder); | 634 TestObject* impl = V8TestObject::toImpl(holder); |
599 | 635 |
600 V8SetReturnValueUnsigned(info, impl->unsignedShortAttribute()); | 636 V8SetReturnValueUnsigned(info, impl->unsignedShortAttribute()); |
601 } | 637 } |
602 | 638 |
603 static void unsignedShortAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) { | 639 static void unsignedShortAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) { |
604 v8::Isolate* isolate = info.GetIsolate(); | 640 v8::Isolate* isolate = info.GetIsolate(); |
605 ALLOW_UNUSED_LOCAL(isolate); | 641 ALLOW_UNUSED_LOCAL(isolate); |
606 | 642 |
607 v8::Local<v8::Object> holder = info.Holder(); | 643 v8::Local<v8::Object> holder = info.Holder(); |
| 644 ALLOW_UNUSED_LOCAL(holder); |
| 645 |
608 TestObject* impl = V8TestObject::toImpl(holder); | 646 TestObject* impl = V8TestObject::toImpl(holder); |
609 | 647 |
610 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "unsignedShortAttribute"); | 648 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "unsignedShortAttribute"); |
611 | 649 |
612 // Prepare the value to be set. | 650 // Prepare the value to be set. |
613 uint16_t cppValue = NativeValueTraits<IDLUnsignedShort>::NativeValue(info.GetI
solate(), v8Value, exceptionState, kNormalConversion); | 651 uint16_t cppValue = NativeValueTraits<IDLUnsignedShort>::NativeValue(info.GetI
solate(), v8Value, exceptionState, kNormalConversion); |
614 if (exceptionState.HadException()) | 652 if (exceptionState.HadException()) |
615 return; | 653 return; |
616 | 654 |
617 impl->setUnsignedShortAttribute(cppValue); | 655 impl->setUnsignedShortAttribute(cppValue); |
618 } | 656 } |
619 | 657 |
620 static void testInterfaceEmptyAttributeAttributeGetter(const v8::FunctionCallbac
kInfo<v8::Value>& info) { | 658 static void testInterfaceEmptyAttributeAttributeGetter(const v8::FunctionCallbac
kInfo<v8::Value>& info) { |
621 v8::Local<v8::Object> holder = info.Holder(); | 659 v8::Local<v8::Object> holder = info.Holder(); |
622 | 660 |
623 TestObject* impl = V8TestObject::toImpl(holder); | 661 TestObject* impl = V8TestObject::toImpl(holder); |
624 | 662 |
625 V8SetReturnValueFast(info, WTF::GetPtr(impl->testInterfaceEmptyAttribute()), i
mpl); | 663 V8SetReturnValueFast(info, WTF::GetPtr(impl->testInterfaceEmptyAttribute()), i
mpl); |
626 } | 664 } |
627 | 665 |
628 static void testInterfaceEmptyAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::FunctionCallbackInfo<v8::Value>& info) { | 666 static void testInterfaceEmptyAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::FunctionCallbackInfo<v8::Value>& info) { |
629 v8::Isolate* isolate = info.GetIsolate(); | 667 v8::Isolate* isolate = info.GetIsolate(); |
630 ALLOW_UNUSED_LOCAL(isolate); | 668 ALLOW_UNUSED_LOCAL(isolate); |
631 | 669 |
632 v8::Local<v8::Object> holder = info.Holder(); | 670 v8::Local<v8::Object> holder = info.Holder(); |
| 671 ALLOW_UNUSED_LOCAL(holder); |
| 672 |
633 TestObject* impl = V8TestObject::toImpl(holder); | 673 TestObject* impl = V8TestObject::toImpl(holder); |
634 | 674 |
635 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "testInterfaceEmptyAttribute"); | 675 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "testInterfaceEmptyAttribute"); |
636 | 676 |
637 // Prepare the value to be set. | 677 // Prepare the value to be set. |
638 TestInterfaceEmpty* cppValue = V8TestInterfaceEmpty::toImplWithTypeCheck(info.
GetIsolate(), v8Value); | 678 TestInterfaceEmpty* cppValue = V8TestInterfaceEmpty::toImplWithTypeCheck(info.
GetIsolate(), v8Value); |
639 | 679 |
640 // Type check per: http://heycam.github.io/webidl/#es-interface | 680 // Type check per: http://heycam.github.io/webidl/#es-interface |
641 if (!cppValue) { | 681 if (!cppValue) { |
642 exceptionState.ThrowTypeError("The provided value is not of type 'TestInterf
aceEmpty'."); | 682 exceptionState.ThrowTypeError("The provided value is not of type 'TestInterf
aceEmpty'."); |
643 return; | 683 return; |
644 } | 684 } |
645 | 685 |
646 impl->setTestInterfaceEmptyAttribute(cppValue); | 686 impl->setTestInterfaceEmptyAttribute(cppValue); |
647 } | 687 } |
648 | 688 |
649 static void testObjectAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8
::Value>& info) { | 689 static void testObjectAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8
::Value>& info) { |
650 v8::Local<v8::Object> holder = info.Holder(); | 690 v8::Local<v8::Object> holder = info.Holder(); |
651 | 691 |
652 TestObject* impl = V8TestObject::toImpl(holder); | 692 TestObject* impl = V8TestObject::toImpl(holder); |
653 | 693 |
654 V8SetReturnValueFast(info, WTF::GetPtr(impl->testObjectAttribute()), impl); | 694 V8SetReturnValueFast(info, WTF::GetPtr(impl->testObjectAttribute()), impl); |
655 } | 695 } |
656 | 696 |
657 static void testObjectAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::FunctionCallbackInfo<v8::Value>& info) { | 697 static void testObjectAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::FunctionCallbackInfo<v8::Value>& info) { |
658 v8::Isolate* isolate = info.GetIsolate(); | 698 v8::Isolate* isolate = info.GetIsolate(); |
659 ALLOW_UNUSED_LOCAL(isolate); | 699 ALLOW_UNUSED_LOCAL(isolate); |
660 | 700 |
661 v8::Local<v8::Object> holder = info.Holder(); | 701 v8::Local<v8::Object> holder = info.Holder(); |
| 702 ALLOW_UNUSED_LOCAL(holder); |
| 703 |
662 TestObject* impl = V8TestObject::toImpl(holder); | 704 TestObject* impl = V8TestObject::toImpl(holder); |
663 | 705 |
664 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "testObjectAttribute"); | 706 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "testObjectAttribute"); |
665 | 707 |
666 // Prepare the value to be set. | 708 // Prepare the value to be set. |
667 TestObject* cppValue = V8TestObject::toImplWithTypeCheck(info.GetIsolate(), v8
Value); | 709 TestObject* cppValue = V8TestObject::toImplWithTypeCheck(info.GetIsolate(), v8
Value); |
668 | 710 |
669 // Type check per: http://heycam.github.io/webidl/#es-interface | 711 // Type check per: http://heycam.github.io/webidl/#es-interface |
670 if (!cppValue) { | 712 if (!cppValue) { |
671 exceptionState.ThrowTypeError("The provided value is not of type 'TestObject
'."); | 713 exceptionState.ThrowTypeError("The provided value is not of type 'TestObject
'."); |
672 return; | 714 return; |
673 } | 715 } |
674 | 716 |
675 impl->setTestObjectAttribute(cppValue); | 717 impl->setTestObjectAttribute(cppValue); |
676 } | 718 } |
677 | 719 |
678 static void cssAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value
>& info) { | 720 static void cssAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value
>& info) { |
679 v8::Local<v8::Object> holder = info.Holder(); | 721 v8::Local<v8::Object> holder = info.Holder(); |
680 | 722 |
681 TestObject* impl = V8TestObject::toImpl(holder); | 723 TestObject* impl = V8TestObject::toImpl(holder); |
682 | 724 |
683 V8SetReturnValueInt(info, impl->cssAttribute()); | 725 V8SetReturnValueInt(info, impl->cssAttribute()); |
684 } | 726 } |
685 | 727 |
686 static void cssAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
FunctionCallbackInfo<v8::Value>& info) { | 728 static void cssAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
FunctionCallbackInfo<v8::Value>& info) { |
687 v8::Isolate* isolate = info.GetIsolate(); | 729 v8::Isolate* isolate = info.GetIsolate(); |
688 ALLOW_UNUSED_LOCAL(isolate); | 730 ALLOW_UNUSED_LOCAL(isolate); |
689 | 731 |
690 v8::Local<v8::Object> holder = info.Holder(); | 732 v8::Local<v8::Object> holder = info.Holder(); |
| 733 ALLOW_UNUSED_LOCAL(holder); |
| 734 |
691 TestObject* impl = V8TestObject::toImpl(holder); | 735 TestObject* impl = V8TestObject::toImpl(holder); |
692 | 736 |
693 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "cssAttribute"); | 737 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "cssAttribute"); |
694 | 738 |
695 // Prepare the value to be set. | 739 // Prepare the value to be set. |
696 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); | 740 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); |
697 if (exceptionState.HadException()) | 741 if (exceptionState.HadException()) |
698 return; | 742 return; |
699 | 743 |
700 impl->setCSSAttribute(cppValue); | 744 impl->setCSSAttribute(cppValue); |
701 } | 745 } |
702 | 746 |
703 static void imeAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value
>& info) { | 747 static void imeAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value
>& info) { |
704 v8::Local<v8::Object> holder = info.Holder(); | 748 v8::Local<v8::Object> holder = info.Holder(); |
705 | 749 |
706 TestObject* impl = V8TestObject::toImpl(holder); | 750 TestObject* impl = V8TestObject::toImpl(holder); |
707 | 751 |
708 V8SetReturnValueInt(info, impl->imeAttribute()); | 752 V8SetReturnValueInt(info, impl->imeAttribute()); |
709 } | 753 } |
710 | 754 |
711 static void imeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
FunctionCallbackInfo<v8::Value>& info) { | 755 static void imeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
FunctionCallbackInfo<v8::Value>& info) { |
712 v8::Isolate* isolate = info.GetIsolate(); | 756 v8::Isolate* isolate = info.GetIsolate(); |
713 ALLOW_UNUSED_LOCAL(isolate); | 757 ALLOW_UNUSED_LOCAL(isolate); |
714 | 758 |
715 v8::Local<v8::Object> holder = info.Holder(); | 759 v8::Local<v8::Object> holder = info.Holder(); |
| 760 ALLOW_UNUSED_LOCAL(holder); |
| 761 |
716 TestObject* impl = V8TestObject::toImpl(holder); | 762 TestObject* impl = V8TestObject::toImpl(holder); |
717 | 763 |
718 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "imeAttribute"); | 764 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "imeAttribute"); |
719 | 765 |
720 // Prepare the value to be set. | 766 // Prepare the value to be set. |
721 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); | 767 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); |
722 if (exceptionState.HadException()) | 768 if (exceptionState.HadException()) |
723 return; | 769 return; |
724 | 770 |
725 impl->setIMEAttribute(cppValue); | 771 impl->setIMEAttribute(cppValue); |
726 } | 772 } |
727 | 773 |
728 static void svgAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value
>& info) { | 774 static void svgAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value
>& info) { |
729 v8::Local<v8::Object> holder = info.Holder(); | 775 v8::Local<v8::Object> holder = info.Holder(); |
730 | 776 |
731 TestObject* impl = V8TestObject::toImpl(holder); | 777 TestObject* impl = V8TestObject::toImpl(holder); |
732 | 778 |
733 V8SetReturnValueInt(info, impl->svgAttribute()); | 779 V8SetReturnValueInt(info, impl->svgAttribute()); |
734 } | 780 } |
735 | 781 |
736 static void svgAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
FunctionCallbackInfo<v8::Value>& info) { | 782 static void svgAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
FunctionCallbackInfo<v8::Value>& info) { |
737 v8::Isolate* isolate = info.GetIsolate(); | 783 v8::Isolate* isolate = info.GetIsolate(); |
738 ALLOW_UNUSED_LOCAL(isolate); | 784 ALLOW_UNUSED_LOCAL(isolate); |
739 | 785 |
740 v8::Local<v8::Object> holder = info.Holder(); | 786 v8::Local<v8::Object> holder = info.Holder(); |
| 787 ALLOW_UNUSED_LOCAL(holder); |
| 788 |
741 TestObject* impl = V8TestObject::toImpl(holder); | 789 TestObject* impl = V8TestObject::toImpl(holder); |
742 | 790 |
743 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "svgAttribute"); | 791 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "svgAttribute"); |
744 | 792 |
745 // Prepare the value to be set. | 793 // Prepare the value to be set. |
746 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); | 794 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); |
747 if (exceptionState.HadException()) | 795 if (exceptionState.HadException()) |
748 return; | 796 return; |
749 | 797 |
750 impl->setSVGAttribute(cppValue); | 798 impl->setSVGAttribute(cppValue); |
751 } | 799 } |
752 | 800 |
753 static void xmlAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value
>& info) { | 801 static void xmlAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value
>& info) { |
754 v8::Local<v8::Object> holder = info.Holder(); | 802 v8::Local<v8::Object> holder = info.Holder(); |
755 | 803 |
756 TestObject* impl = V8TestObject::toImpl(holder); | 804 TestObject* impl = V8TestObject::toImpl(holder); |
757 | 805 |
758 V8SetReturnValueInt(info, impl->xmlAttribute()); | 806 V8SetReturnValueInt(info, impl->xmlAttribute()); |
759 } | 807 } |
760 | 808 |
761 static void xmlAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
FunctionCallbackInfo<v8::Value>& info) { | 809 static void xmlAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
FunctionCallbackInfo<v8::Value>& info) { |
762 v8::Isolate* isolate = info.GetIsolate(); | 810 v8::Isolate* isolate = info.GetIsolate(); |
763 ALLOW_UNUSED_LOCAL(isolate); | 811 ALLOW_UNUSED_LOCAL(isolate); |
764 | 812 |
765 v8::Local<v8::Object> holder = info.Holder(); | 813 v8::Local<v8::Object> holder = info.Holder(); |
| 814 ALLOW_UNUSED_LOCAL(holder); |
| 815 |
766 TestObject* impl = V8TestObject::toImpl(holder); | 816 TestObject* impl = V8TestObject::toImpl(holder); |
767 | 817 |
768 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "xmlAttribute"); | 818 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "xmlAttribute"); |
769 | 819 |
770 // Prepare the value to be set. | 820 // Prepare the value to be set. |
771 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); | 821 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); |
772 if (exceptionState.HadException()) | 822 if (exceptionState.HadException()) |
773 return; | 823 return; |
774 | 824 |
775 impl->setXMLAttribute(cppValue); | 825 impl->setXMLAttribute(cppValue); |
776 } | 826 } |
777 | 827 |
778 static void nodeFilterAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8
::Value>& info) { | 828 static void nodeFilterAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8
::Value>& info) { |
779 v8::Local<v8::Object> holder = info.Holder(); | 829 v8::Local<v8::Object> holder = info.Holder(); |
780 | 830 |
781 TestObject* impl = V8TestObject::toImpl(holder); | 831 TestObject* impl = V8TestObject::toImpl(holder); |
782 | 832 |
783 V8SetReturnValue(info, ToV8(WTF::GetPtr(impl->nodeFilterAttribute()), info.Hol
der(), info.GetIsolate())); | 833 V8SetReturnValue(info, ToV8(WTF::GetPtr(impl->nodeFilterAttribute()), info.Hol
der(), info.GetIsolate())); |
784 } | 834 } |
785 | 835 |
786 static void nodeFilterAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::FunctionCallbackInfo<v8::Value>& info) { | 836 static void nodeFilterAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::FunctionCallbackInfo<v8::Value>& info) { |
787 v8::Isolate* isolate = info.GetIsolate(); | 837 v8::Isolate* isolate = info.GetIsolate(); |
788 ALLOW_UNUSED_LOCAL(isolate); | 838 ALLOW_UNUSED_LOCAL(isolate); |
789 | 839 |
790 v8::Local<v8::Object> holder = info.Holder(); | 840 v8::Local<v8::Object> holder = info.Holder(); |
| 841 ALLOW_UNUSED_LOCAL(holder); |
| 842 |
791 TestObject* impl = V8TestObject::toImpl(holder); | 843 TestObject* impl = V8TestObject::toImpl(holder); |
792 | 844 |
793 // Prepare the value to be set. | 845 // Prepare the value to be set. |
794 V8NodeFilterCondition* cppValue = V8NodeFilter::toImplWithTypeCheck(info.GetIs
olate(), v8Value); | 846 V8NodeFilterCondition* cppValue = V8NodeFilter::toImplWithTypeCheck(info.GetIs
olate(), v8Value); |
795 | 847 |
796 impl->setNodeFilterAttribute(cppValue); | 848 impl->setNodeFilterAttribute(cppValue); |
797 } | 849 } |
798 | 850 |
799 static void serializedScriptValueAttributeAttributeGetter(const v8::FunctionCall
backInfo<v8::Value>& info) { | 851 static void serializedScriptValueAttributeAttributeGetter(const v8::FunctionCall
backInfo<v8::Value>& info) { |
800 v8::Local<v8::Object> holder = info.Holder(); | 852 v8::Local<v8::Object> holder = info.Holder(); |
801 | 853 |
802 TestObject* impl = V8TestObject::toImpl(holder); | 854 TestObject* impl = V8TestObject::toImpl(holder); |
803 | 855 |
804 V8SetReturnValue(info, V8Deserialize(info.GetIsolate(), WTF::GetPtr(impl->seri
alizedScriptValueAttribute()))); | 856 V8SetReturnValue(info, V8Deserialize(info.GetIsolate(), WTF::GetPtr(impl->seri
alizedScriptValueAttribute()))); |
805 } | 857 } |
806 | 858 |
807 static void serializedScriptValueAttributeAttributeSetter(v8::Local<v8::Value> v
8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { | 859 static void serializedScriptValueAttributeAttributeSetter(v8::Local<v8::Value> v
8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { |
808 v8::Isolate* isolate = info.GetIsolate(); | 860 v8::Isolate* isolate = info.GetIsolate(); |
809 ALLOW_UNUSED_LOCAL(isolate); | 861 ALLOW_UNUSED_LOCAL(isolate); |
810 | 862 |
811 v8::Local<v8::Object> holder = info.Holder(); | 863 v8::Local<v8::Object> holder = info.Holder(); |
| 864 ALLOW_UNUSED_LOCAL(holder); |
| 865 |
812 TestObject* impl = V8TestObject::toImpl(holder); | 866 TestObject* impl = V8TestObject::toImpl(holder); |
813 | 867 |
814 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "serializedScriptValueAttribute"); | 868 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "serializedScriptValueAttribute"); |
815 | 869 |
816 // Prepare the value to be set. | 870 // Prepare the value to be set. |
817 RefPtr<SerializedScriptValue> cppValue = NativeValueTraits<SerializedScriptVal
ue>::NativeValue(info.GetIsolate(), v8Value, exceptionState); | 871 RefPtr<SerializedScriptValue> cppValue = NativeValueTraits<SerializedScriptVal
ue>::NativeValue(info.GetIsolate(), v8Value, exceptionState); |
818 if (exceptionState.HadException()) | 872 if (exceptionState.HadException()) |
819 return; | 873 return; |
820 | 874 |
821 impl->setSerializedScriptValueAttribute(cppValue); | 875 impl->setSerializedScriptValueAttribute(cppValue); |
822 } | 876 } |
823 | 877 |
824 static void anyAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value
>& info) { | 878 static void anyAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value
>& info) { |
825 v8::Local<v8::Object> holder = info.Holder(); | 879 v8::Local<v8::Object> holder = info.Holder(); |
826 | 880 |
827 TestObject* impl = V8TestObject::toImpl(holder); | 881 TestObject* impl = V8TestObject::toImpl(holder); |
828 | 882 |
829 V8SetReturnValue(info, impl->anyAttribute().V8Value()); | 883 V8SetReturnValue(info, impl->anyAttribute().V8Value()); |
830 } | 884 } |
831 | 885 |
832 static void anyAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
FunctionCallbackInfo<v8::Value>& info) { | 886 static void anyAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
FunctionCallbackInfo<v8::Value>& info) { |
833 v8::Isolate* isolate = info.GetIsolate(); | 887 v8::Isolate* isolate = info.GetIsolate(); |
834 ALLOW_UNUSED_LOCAL(isolate); | 888 ALLOW_UNUSED_LOCAL(isolate); |
835 | 889 |
836 v8::Local<v8::Object> holder = info.Holder(); | 890 v8::Local<v8::Object> holder = info.Holder(); |
| 891 ALLOW_UNUSED_LOCAL(holder); |
| 892 |
837 TestObject* impl = V8TestObject::toImpl(holder); | 893 TestObject* impl = V8TestObject::toImpl(holder); |
838 | 894 |
839 // Prepare the value to be set. | 895 // Prepare the value to be set. |
840 ScriptValue cppValue = ScriptValue(ScriptState::Current(info.GetIsolate()), v8
Value); | 896 ScriptValue cppValue = ScriptValue(ScriptState::Current(info.GetIsolate()), v8
Value); |
841 | 897 |
842 impl->setAnyAttribute(cppValue); | 898 impl->setAnyAttribute(cppValue); |
843 } | 899 } |
844 | 900 |
845 static void promiseAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::V
alue>& info) { | 901 static void promiseAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::V
alue>& info) { |
846 v8::Local<v8::Object> holder = info.Holder(); | 902 v8::Local<v8::Object> holder = info.Holder(); |
847 | 903 |
848 TestObject* impl = V8TestObject::toImpl(holder); | 904 TestObject* impl = V8TestObject::toImpl(holder); |
849 | 905 |
850 V8SetReturnValue(info, impl->promiseAttribute().V8Value()); | 906 V8SetReturnValue(info, impl->promiseAttribute().V8Value()); |
851 } | 907 } |
852 | 908 |
853 static void promiseAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::FunctionCallbackInfo<v8::Value>& info) { | 909 static void promiseAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::FunctionCallbackInfo<v8::Value>& info) { |
854 v8::Isolate* isolate = info.GetIsolate(); | 910 v8::Isolate* isolate = info.GetIsolate(); |
855 ALLOW_UNUSED_LOCAL(isolate); | 911 ALLOW_UNUSED_LOCAL(isolate); |
856 | 912 |
857 v8::Local<v8::Object> holder = info.Holder(); | 913 v8::Local<v8::Object> holder = info.Holder(); |
| 914 ALLOW_UNUSED_LOCAL(holder); |
| 915 |
858 TestObject* impl = V8TestObject::toImpl(holder); | 916 TestObject* impl = V8TestObject::toImpl(holder); |
859 | 917 |
860 // Prepare the value to be set. | 918 // Prepare the value to be set. |
861 ScriptPromise cppValue = ScriptPromise::Cast(ScriptState::Current(info.GetIsol
ate()), v8Value); | 919 ScriptPromise cppValue = ScriptPromise::Cast(ScriptState::Current(info.GetIsol
ate()), v8Value); |
862 | 920 |
863 impl->setPromiseAttribute(cppValue); | 921 impl->setPromiseAttribute(cppValue); |
864 } | 922 } |
865 | 923 |
866 static void windowAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Va
lue>& info) { | 924 static void windowAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Va
lue>& info) { |
867 v8::Local<v8::Object> holder = info.Holder(); | 925 v8::Local<v8::Object> holder = info.Holder(); |
868 | 926 |
869 TestObject* impl = V8TestObject::toImpl(holder); | 927 TestObject* impl = V8TestObject::toImpl(holder); |
870 | 928 |
871 V8SetReturnValueFast(info, WTF::GetPtr(impl->windowAttribute()), impl); | 929 V8SetReturnValueFast(info, WTF::GetPtr(impl->windowAttribute()), impl); |
872 } | 930 } |
873 | 931 |
874 static void windowAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::FunctionCallbackInfo<v8::Value>& info) { | 932 static void windowAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::FunctionCallbackInfo<v8::Value>& info) { |
875 v8::Isolate* isolate = info.GetIsolate(); | 933 v8::Isolate* isolate = info.GetIsolate(); |
876 ALLOW_UNUSED_LOCAL(isolate); | 934 ALLOW_UNUSED_LOCAL(isolate); |
877 | 935 |
878 v8::Local<v8::Object> holder = info.Holder(); | 936 v8::Local<v8::Object> holder = info.Holder(); |
| 937 ALLOW_UNUSED_LOCAL(holder); |
| 938 |
879 TestObject* impl = V8TestObject::toImpl(holder); | 939 TestObject* impl = V8TestObject::toImpl(holder); |
880 | 940 |
881 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "windowAttribute"); | 941 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "windowAttribute"); |
882 | 942 |
883 // Prepare the value to be set. | 943 // Prepare the value to be set. |
884 DOMWindow* cppValue = ToDOMWindow(info.GetIsolate(), v8Value); | 944 DOMWindow* cppValue = ToDOMWindow(info.GetIsolate(), v8Value); |
885 | 945 |
886 // Type check per: http://heycam.github.io/webidl/#es-interface | 946 // Type check per: http://heycam.github.io/webidl/#es-interface |
887 if (!cppValue) { | 947 if (!cppValue) { |
888 exceptionState.ThrowTypeError("The provided value is not of type 'Window'.")
; | 948 exceptionState.ThrowTypeError("The provided value is not of type 'Window'.")
; |
889 return; | 949 return; |
890 } | 950 } |
891 | 951 |
892 impl->setWindowAttribute(cppValue); | 952 impl->setWindowAttribute(cppValue); |
893 } | 953 } |
894 | 954 |
895 static void documentAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::
Value>& info) { | 955 static void documentAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::
Value>& info) { |
896 v8::Local<v8::Object> holder = info.Holder(); | 956 v8::Local<v8::Object> holder = info.Holder(); |
897 | 957 |
898 TestObject* impl = V8TestObject::toImpl(holder); | 958 TestObject* impl = V8TestObject::toImpl(holder); |
899 | 959 |
900 V8SetReturnValueFast(info, WTF::GetPtr(impl->documentAttribute()), impl); | 960 V8SetReturnValueFast(info, WTF::GetPtr(impl->documentAttribute()), impl); |
901 } | 961 } |
902 | 962 |
903 static void documentAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::FunctionCallbackInfo<v8::Value>& info) { | 963 static void documentAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::FunctionCallbackInfo<v8::Value>& info) { |
904 v8::Isolate* isolate = info.GetIsolate(); | 964 v8::Isolate* isolate = info.GetIsolate(); |
905 ALLOW_UNUSED_LOCAL(isolate); | 965 ALLOW_UNUSED_LOCAL(isolate); |
906 | 966 |
907 v8::Local<v8::Object> holder = info.Holder(); | 967 v8::Local<v8::Object> holder = info.Holder(); |
| 968 ALLOW_UNUSED_LOCAL(holder); |
| 969 |
908 TestObject* impl = V8TestObject::toImpl(holder); | 970 TestObject* impl = V8TestObject::toImpl(holder); |
909 | 971 |
910 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "documentAttribute"); | 972 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "documentAttribute"); |
911 | 973 |
912 // Prepare the value to be set. | 974 // Prepare the value to be set. |
913 Document* cppValue = V8Document::toImplWithTypeCheck(info.GetIsolate(), v8Valu
e); | 975 Document* cppValue = V8Document::toImplWithTypeCheck(info.GetIsolate(), v8Valu
e); |
914 | 976 |
915 // Type check per: http://heycam.github.io/webidl/#es-interface | 977 // Type check per: http://heycam.github.io/webidl/#es-interface |
916 if (!cppValue) { | 978 if (!cppValue) { |
917 exceptionState.ThrowTypeError("The provided value is not of type 'Document'.
"); | 979 exceptionState.ThrowTypeError("The provided value is not of type 'Document'.
"); |
918 return; | 980 return; |
919 } | 981 } |
920 | 982 |
921 impl->setDocumentAttribute(cppValue); | 983 impl->setDocumentAttribute(cppValue); |
922 } | 984 } |
923 | 985 |
924 static void documentFragmentAttributeAttributeGetter(const v8::FunctionCallbackI
nfo<v8::Value>& info) { | 986 static void documentFragmentAttributeAttributeGetter(const v8::FunctionCallbackI
nfo<v8::Value>& info) { |
925 v8::Local<v8::Object> holder = info.Holder(); | 987 v8::Local<v8::Object> holder = info.Holder(); |
926 | 988 |
927 TestObject* impl = V8TestObject::toImpl(holder); | 989 TestObject* impl = V8TestObject::toImpl(holder); |
928 | 990 |
929 V8SetReturnValueFast(info, WTF::GetPtr(impl->documentFragmentAttribute()), imp
l); | 991 V8SetReturnValueFast(info, WTF::GetPtr(impl->documentFragmentAttribute()), imp
l); |
930 } | 992 } |
931 | 993 |
932 static void documentFragmentAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::FunctionCallbackInfo<v8::Value>& info) { | 994 static void documentFragmentAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::FunctionCallbackInfo<v8::Value>& info) { |
933 v8::Isolate* isolate = info.GetIsolate(); | 995 v8::Isolate* isolate = info.GetIsolate(); |
934 ALLOW_UNUSED_LOCAL(isolate); | 996 ALLOW_UNUSED_LOCAL(isolate); |
935 | 997 |
936 v8::Local<v8::Object> holder = info.Holder(); | 998 v8::Local<v8::Object> holder = info.Holder(); |
| 999 ALLOW_UNUSED_LOCAL(holder); |
| 1000 |
937 TestObject* impl = V8TestObject::toImpl(holder); | 1001 TestObject* impl = V8TestObject::toImpl(holder); |
938 | 1002 |
939 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "documentFragmentAttribute"); | 1003 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "documentFragmentAttribute"); |
940 | 1004 |
941 // Prepare the value to be set. | 1005 // Prepare the value to be set. |
942 DocumentFragment* cppValue = V8DocumentFragment::toImplWithTypeCheck(info.GetI
solate(), v8Value); | 1006 DocumentFragment* cppValue = V8DocumentFragment::toImplWithTypeCheck(info.GetI
solate(), v8Value); |
943 | 1007 |
944 // Type check per: http://heycam.github.io/webidl/#es-interface | 1008 // Type check per: http://heycam.github.io/webidl/#es-interface |
945 if (!cppValue) { | 1009 if (!cppValue) { |
946 exceptionState.ThrowTypeError("The provided value is not of type 'DocumentFr
agment'."); | 1010 exceptionState.ThrowTypeError("The provided value is not of type 'DocumentFr
agment'."); |
947 return; | 1011 return; |
948 } | 1012 } |
949 | 1013 |
950 impl->setDocumentFragmentAttribute(cppValue); | 1014 impl->setDocumentFragmentAttribute(cppValue); |
951 } | 1015 } |
952 | 1016 |
953 static void documentTypeAttributeAttributeGetter(const v8::FunctionCallbackInfo<
v8::Value>& info) { | 1017 static void documentTypeAttributeAttributeGetter(const v8::FunctionCallbackInfo<
v8::Value>& info) { |
954 v8::Local<v8::Object> holder = info.Holder(); | 1018 v8::Local<v8::Object> holder = info.Holder(); |
955 | 1019 |
956 TestObject* impl = V8TestObject::toImpl(holder); | 1020 TestObject* impl = V8TestObject::toImpl(holder); |
957 | 1021 |
958 V8SetReturnValueFast(info, WTF::GetPtr(impl->documentTypeAttribute()), impl); | 1022 V8SetReturnValueFast(info, WTF::GetPtr(impl->documentTypeAttribute()), impl); |
959 } | 1023 } |
960 | 1024 |
961 static void documentTypeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::FunctionCallbackInfo<v8::Value>& info) { | 1025 static void documentTypeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::FunctionCallbackInfo<v8::Value>& info) { |
962 v8::Isolate* isolate = info.GetIsolate(); | 1026 v8::Isolate* isolate = info.GetIsolate(); |
963 ALLOW_UNUSED_LOCAL(isolate); | 1027 ALLOW_UNUSED_LOCAL(isolate); |
964 | 1028 |
965 v8::Local<v8::Object> holder = info.Holder(); | 1029 v8::Local<v8::Object> holder = info.Holder(); |
| 1030 ALLOW_UNUSED_LOCAL(holder); |
| 1031 |
966 TestObject* impl = V8TestObject::toImpl(holder); | 1032 TestObject* impl = V8TestObject::toImpl(holder); |
967 | 1033 |
968 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "documentTypeAttribute"); | 1034 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "documentTypeAttribute"); |
969 | 1035 |
970 // Prepare the value to be set. | 1036 // Prepare the value to be set. |
971 DocumentType* cppValue = V8DocumentType::toImplWithTypeCheck(info.GetIsolate()
, v8Value); | 1037 DocumentType* cppValue = V8DocumentType::toImplWithTypeCheck(info.GetIsolate()
, v8Value); |
972 | 1038 |
973 // Type check per: http://heycam.github.io/webidl/#es-interface | 1039 // Type check per: http://heycam.github.io/webidl/#es-interface |
974 if (!cppValue) { | 1040 if (!cppValue) { |
975 exceptionState.ThrowTypeError("The provided value is not of type 'DocumentTy
pe'."); | 1041 exceptionState.ThrowTypeError("The provided value is not of type 'DocumentTy
pe'."); |
976 return; | 1042 return; |
977 } | 1043 } |
978 | 1044 |
979 impl->setDocumentTypeAttribute(cppValue); | 1045 impl->setDocumentTypeAttribute(cppValue); |
980 } | 1046 } |
981 | 1047 |
982 static void elementAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::V
alue>& info) { | 1048 static void elementAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::V
alue>& info) { |
983 v8::Local<v8::Object> holder = info.Holder(); | 1049 v8::Local<v8::Object> holder = info.Holder(); |
984 | 1050 |
985 TestObject* impl = V8TestObject::toImpl(holder); | 1051 TestObject* impl = V8TestObject::toImpl(holder); |
986 | 1052 |
987 V8SetReturnValueFast(info, WTF::GetPtr(impl->elementAttribute()), impl); | 1053 V8SetReturnValueFast(info, WTF::GetPtr(impl->elementAttribute()), impl); |
988 } | 1054 } |
989 | 1055 |
990 static void elementAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::FunctionCallbackInfo<v8::Value>& info) { | 1056 static void elementAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::FunctionCallbackInfo<v8::Value>& info) { |
991 v8::Isolate* isolate = info.GetIsolate(); | 1057 v8::Isolate* isolate = info.GetIsolate(); |
992 ALLOW_UNUSED_LOCAL(isolate); | 1058 ALLOW_UNUSED_LOCAL(isolate); |
993 | 1059 |
994 v8::Local<v8::Object> holder = info.Holder(); | 1060 v8::Local<v8::Object> holder = info.Holder(); |
| 1061 ALLOW_UNUSED_LOCAL(holder); |
| 1062 |
995 TestObject* impl = V8TestObject::toImpl(holder); | 1063 TestObject* impl = V8TestObject::toImpl(holder); |
996 | 1064 |
997 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "elementAttribute"); | 1065 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "elementAttribute"); |
998 | 1066 |
999 // Prepare the value to be set. | 1067 // Prepare the value to be set. |
1000 Element* cppValue = V8Element::toImplWithTypeCheck(info.GetIsolate(), v8Value)
; | 1068 Element* cppValue = V8Element::toImplWithTypeCheck(info.GetIsolate(), v8Value)
; |
1001 | 1069 |
1002 // Type check per: http://heycam.github.io/webidl/#es-interface | 1070 // Type check per: http://heycam.github.io/webidl/#es-interface |
1003 if (!cppValue) { | 1071 if (!cppValue) { |
1004 exceptionState.ThrowTypeError("The provided value is not of type 'Element'."
); | 1072 exceptionState.ThrowTypeError("The provided value is not of type 'Element'."
); |
1005 return; | 1073 return; |
1006 } | 1074 } |
1007 | 1075 |
1008 impl->setElementAttribute(cppValue); | 1076 impl->setElementAttribute(cppValue); |
1009 } | 1077 } |
1010 | 1078 |
1011 static void nodeAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Valu
e>& info) { | 1079 static void nodeAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Valu
e>& info) { |
1012 v8::Local<v8::Object> holder = info.Holder(); | 1080 v8::Local<v8::Object> holder = info.Holder(); |
1013 | 1081 |
1014 TestObject* impl = V8TestObject::toImpl(holder); | 1082 TestObject* impl = V8TestObject::toImpl(holder); |
1015 | 1083 |
1016 V8SetReturnValueFast(info, WTF::GetPtr(impl->nodeAttribute()), impl); | 1084 V8SetReturnValueFast(info, WTF::GetPtr(impl->nodeAttribute()), impl); |
1017 } | 1085 } |
1018 | 1086 |
1019 static void nodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:FunctionCallbackInfo<v8::Value>& info) { | 1087 static void nodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:FunctionCallbackInfo<v8::Value>& info) { |
1020 v8::Isolate* isolate = info.GetIsolate(); | 1088 v8::Isolate* isolate = info.GetIsolate(); |
1021 ALLOW_UNUSED_LOCAL(isolate); | 1089 ALLOW_UNUSED_LOCAL(isolate); |
1022 | 1090 |
1023 v8::Local<v8::Object> holder = info.Holder(); | 1091 v8::Local<v8::Object> holder = info.Holder(); |
| 1092 ALLOW_UNUSED_LOCAL(holder); |
| 1093 |
1024 TestObject* impl = V8TestObject::toImpl(holder); | 1094 TestObject* impl = V8TestObject::toImpl(holder); |
1025 | 1095 |
1026 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "nodeAttribute"); | 1096 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "nodeAttribute"); |
1027 | 1097 |
1028 // Prepare the value to be set. | 1098 // Prepare the value to be set. |
1029 Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value); | 1099 Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
1030 | 1100 |
1031 // Type check per: http://heycam.github.io/webidl/#es-interface | 1101 // Type check per: http://heycam.github.io/webidl/#es-interface |
1032 if (!cppValue) { | 1102 if (!cppValue) { |
1033 exceptionState.ThrowTypeError("The provided value is not of type 'Node'."); | 1103 exceptionState.ThrowTypeError("The provided value is not of type 'Node'."); |
1034 return; | 1104 return; |
1035 } | 1105 } |
1036 | 1106 |
1037 impl->setNodeAttribute(cppValue); | 1107 impl->setNodeAttribute(cppValue); |
1038 } | 1108 } |
1039 | 1109 |
1040 static void shadowRootAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8
::Value>& info) { | 1110 static void shadowRootAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8
::Value>& info) { |
1041 v8::Local<v8::Object> holder = info.Holder(); | 1111 v8::Local<v8::Object> holder = info.Holder(); |
1042 | 1112 |
1043 TestObject* impl = V8TestObject::toImpl(holder); | 1113 TestObject* impl = V8TestObject::toImpl(holder); |
1044 | 1114 |
1045 V8SetReturnValueFast(info, WTF::GetPtr(impl->shadowRootAttribute()), impl); | 1115 V8SetReturnValueFast(info, WTF::GetPtr(impl->shadowRootAttribute()), impl); |
1046 } | 1116 } |
1047 | 1117 |
1048 static void shadowRootAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::FunctionCallbackInfo<v8::Value>& info) { | 1118 static void shadowRootAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::FunctionCallbackInfo<v8::Value>& info) { |
1049 v8::Isolate* isolate = info.GetIsolate(); | 1119 v8::Isolate* isolate = info.GetIsolate(); |
1050 ALLOW_UNUSED_LOCAL(isolate); | 1120 ALLOW_UNUSED_LOCAL(isolate); |
1051 | 1121 |
1052 v8::Local<v8::Object> holder = info.Holder(); | 1122 v8::Local<v8::Object> holder = info.Holder(); |
| 1123 ALLOW_UNUSED_LOCAL(holder); |
| 1124 |
1053 TestObject* impl = V8TestObject::toImpl(holder); | 1125 TestObject* impl = V8TestObject::toImpl(holder); |
1054 | 1126 |
1055 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "shadowRootAttribute"); | 1127 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "shadowRootAttribute"); |
1056 | 1128 |
1057 // Prepare the value to be set. | 1129 // Prepare the value to be set. |
1058 ShadowRoot* cppValue = V8ShadowRoot::toImplWithTypeCheck(info.GetIsolate(), v8
Value); | 1130 ShadowRoot* cppValue = V8ShadowRoot::toImplWithTypeCheck(info.GetIsolate(), v8
Value); |
1059 | 1131 |
1060 // Type check per: http://heycam.github.io/webidl/#es-interface | 1132 // Type check per: http://heycam.github.io/webidl/#es-interface |
1061 if (!cppValue) { | 1133 if (!cppValue) { |
1062 exceptionState.ThrowTypeError("The provided value is not of type 'ShadowRoot
'."); | 1134 exceptionState.ThrowTypeError("The provided value is not of type 'ShadowRoot
'."); |
1063 return; | 1135 return; |
1064 } | 1136 } |
1065 | 1137 |
1066 impl->setShadowRootAttribute(cppValue); | 1138 impl->setShadowRootAttribute(cppValue); |
1067 } | 1139 } |
1068 | 1140 |
1069 static void arrayBufferAttributeAttributeGetter(const v8::FunctionCallbackInfo<v
8::Value>& info) { | 1141 static void arrayBufferAttributeAttributeGetter(const v8::FunctionCallbackInfo<v
8::Value>& info) { |
1070 v8::Local<v8::Object> holder = info.Holder(); | 1142 v8::Local<v8::Object> holder = info.Holder(); |
1071 | 1143 |
1072 TestObject* impl = V8TestObject::toImpl(holder); | 1144 TestObject* impl = V8TestObject::toImpl(holder); |
1073 | 1145 |
1074 V8SetReturnValueFast(info, WTF::GetPtr(impl->arrayBufferAttribute()), impl); | 1146 V8SetReturnValueFast(info, WTF::GetPtr(impl->arrayBufferAttribute()), impl); |
1075 } | 1147 } |
1076 | 1148 |
1077 static void arrayBufferAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::FunctionCallbackInfo<v8::Value>& info) { | 1149 static void arrayBufferAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::FunctionCallbackInfo<v8::Value>& info) { |
1078 v8::Isolate* isolate = info.GetIsolate(); | 1150 v8::Isolate* isolate = info.GetIsolate(); |
1079 ALLOW_UNUSED_LOCAL(isolate); | 1151 ALLOW_UNUSED_LOCAL(isolate); |
1080 | 1152 |
1081 v8::Local<v8::Object> holder = info.Holder(); | 1153 v8::Local<v8::Object> holder = info.Holder(); |
| 1154 ALLOW_UNUSED_LOCAL(holder); |
| 1155 |
1082 TestObject* impl = V8TestObject::toImpl(holder); | 1156 TestObject* impl = V8TestObject::toImpl(holder); |
1083 | 1157 |
1084 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "arrayBufferAttribute"); | 1158 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "arrayBufferAttribute"); |
1085 | 1159 |
1086 // Prepare the value to be set. | 1160 // Prepare the value to be set. |
1087 TestArrayBuffer* cppValue = v8Value->IsArrayBuffer() ? V8ArrayBuffer::toImpl(v
8::Local<v8::ArrayBuffer>::Cast(v8Value)) : 0; | 1161 TestArrayBuffer* cppValue = v8Value->IsArrayBuffer() ? V8ArrayBuffer::toImpl(v
8::Local<v8::ArrayBuffer>::Cast(v8Value)) : 0; |
1088 | 1162 |
1089 // Type check per: http://heycam.github.io/webidl/#es-interface | 1163 // Type check per: http://heycam.github.io/webidl/#es-interface |
1090 if (!cppValue) { | 1164 if (!cppValue) { |
1091 exceptionState.ThrowTypeError("The provided value is not of type 'ArrayBuffe
r'."); | 1165 exceptionState.ThrowTypeError("The provided value is not of type 'ArrayBuffe
r'."); |
1092 return; | 1166 return; |
1093 } | 1167 } |
1094 | 1168 |
1095 impl->setArrayBufferAttribute(cppValue); | 1169 impl->setArrayBufferAttribute(cppValue); |
1096 } | 1170 } |
1097 | 1171 |
1098 static void float32ArrayAttributeAttributeGetter(const v8::FunctionCallbackInfo<
v8::Value>& info) { | 1172 static void float32ArrayAttributeAttributeGetter(const v8::FunctionCallbackInfo<
v8::Value>& info) { |
1099 v8::Local<v8::Object> holder = info.Holder(); | 1173 v8::Local<v8::Object> holder = info.Holder(); |
1100 | 1174 |
1101 TestObject* impl = V8TestObject::toImpl(holder); | 1175 TestObject* impl = V8TestObject::toImpl(holder); |
1102 | 1176 |
1103 V8SetReturnValueFast(info, impl->float32ArrayAttribute(), impl); | 1177 V8SetReturnValueFast(info, impl->float32ArrayAttribute(), impl); |
1104 } | 1178 } |
1105 | 1179 |
1106 static void float32ArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::FunctionCallbackInfo<v8::Value>& info) { | 1180 static void float32ArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::FunctionCallbackInfo<v8::Value>& info) { |
1107 v8::Isolate* isolate = info.GetIsolate(); | 1181 v8::Isolate* isolate = info.GetIsolate(); |
1108 ALLOW_UNUSED_LOCAL(isolate); | 1182 ALLOW_UNUSED_LOCAL(isolate); |
1109 | 1183 |
1110 v8::Local<v8::Object> holder = info.Holder(); | 1184 v8::Local<v8::Object> holder = info.Holder(); |
| 1185 ALLOW_UNUSED_LOCAL(holder); |
| 1186 |
1111 TestObject* impl = V8TestObject::toImpl(holder); | 1187 TestObject* impl = V8TestObject::toImpl(holder); |
1112 | 1188 |
1113 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "float32ArrayAttribute"); | 1189 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "float32ArrayAttribute"); |
1114 | 1190 |
1115 // Prepare the value to be set. | 1191 // Prepare the value to be set. |
1116 NotShared<DOMFloat32Array> cppValue = ToNotShared<NotShared<DOMFloat32Array>>(
info.GetIsolate(), v8Value, exceptionState); | 1192 NotShared<DOMFloat32Array> cppValue = ToNotShared<NotShared<DOMFloat32Array>>(
info.GetIsolate(), v8Value, exceptionState); |
1117 if (exceptionState.HadException()) | 1193 if (exceptionState.HadException()) |
1118 return; | 1194 return; |
1119 | 1195 |
1120 // Type check per: http://heycam.github.io/webidl/#es-interface | 1196 // Type check per: http://heycam.github.io/webidl/#es-interface |
(...skipping 11 matching lines...) Expand all Loading... |
1132 TestObject* impl = V8TestObject::toImpl(holder); | 1208 TestObject* impl = V8TestObject::toImpl(holder); |
1133 | 1209 |
1134 V8SetReturnValueFast(info, impl->uint8ArrayAttribute(), impl); | 1210 V8SetReturnValueFast(info, impl->uint8ArrayAttribute(), impl); |
1135 } | 1211 } |
1136 | 1212 |
1137 static void uint8ArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::FunctionCallbackInfo<v8::Value>& info) { | 1213 static void uint8ArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::FunctionCallbackInfo<v8::Value>& info) { |
1138 v8::Isolate* isolate = info.GetIsolate(); | 1214 v8::Isolate* isolate = info.GetIsolate(); |
1139 ALLOW_UNUSED_LOCAL(isolate); | 1215 ALLOW_UNUSED_LOCAL(isolate); |
1140 | 1216 |
1141 v8::Local<v8::Object> holder = info.Holder(); | 1217 v8::Local<v8::Object> holder = info.Holder(); |
| 1218 ALLOW_UNUSED_LOCAL(holder); |
| 1219 |
1142 TestObject* impl = V8TestObject::toImpl(holder); | 1220 TestObject* impl = V8TestObject::toImpl(holder); |
1143 | 1221 |
1144 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "uint8ArrayAttribute"); | 1222 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "uint8ArrayAttribute"); |
1145 | 1223 |
1146 // Prepare the value to be set. | 1224 // Prepare the value to be set. |
1147 NotShared<DOMUint8Array> cppValue = ToNotShared<NotShared<DOMUint8Array>>(info
.GetIsolate(), v8Value, exceptionState); | 1225 NotShared<DOMUint8Array> cppValue = ToNotShared<NotShared<DOMUint8Array>>(info
.GetIsolate(), v8Value, exceptionState); |
1148 if (exceptionState.HadException()) | 1226 if (exceptionState.HadException()) |
1149 return; | 1227 return; |
1150 | 1228 |
1151 // Type check per: http://heycam.github.io/webidl/#es-interface | 1229 // Type check per: http://heycam.github.io/webidl/#es-interface |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1211 TestObject* impl = V8TestObject::toImpl(holder); | 1289 TestObject* impl = V8TestObject::toImpl(holder); |
1212 | 1290 |
1213 V8SetReturnValue(info, ToV8(impl->stringArrayAttribute(), info.Holder(), info.
GetIsolate())); | 1291 V8SetReturnValue(info, ToV8(impl->stringArrayAttribute(), info.Holder(), info.
GetIsolate())); |
1214 } | 1292 } |
1215 | 1293 |
1216 static void stringArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::FunctionCallbackInfo<v8::Value>& info) { | 1294 static void stringArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::FunctionCallbackInfo<v8::Value>& info) { |
1217 v8::Isolate* isolate = info.GetIsolate(); | 1295 v8::Isolate* isolate = info.GetIsolate(); |
1218 ALLOW_UNUSED_LOCAL(isolate); | 1296 ALLOW_UNUSED_LOCAL(isolate); |
1219 | 1297 |
1220 v8::Local<v8::Object> holder = info.Holder(); | 1298 v8::Local<v8::Object> holder = info.Holder(); |
| 1299 ALLOW_UNUSED_LOCAL(holder); |
| 1300 |
1221 TestObject* impl = V8TestObject::toImpl(holder); | 1301 TestObject* impl = V8TestObject::toImpl(holder); |
1222 | 1302 |
1223 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "stringArrayAttribute"); | 1303 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "stringArrayAttribute"); |
1224 | 1304 |
1225 // Prepare the value to be set. | 1305 // Prepare the value to be set. |
1226 Vector<String> cppValue = NativeValueTraits<IDLSequence<IDLString>>::NativeVal
ue(info.GetIsolate(), v8Value, exceptionState); | 1306 Vector<String> cppValue = NativeValueTraits<IDLSequence<IDLString>>::NativeVal
ue(info.GetIsolate(), v8Value, exceptionState); |
1227 if (exceptionState.HadException()) | 1307 if (exceptionState.HadException()) |
1228 return; | 1308 return; |
1229 | 1309 |
1230 impl->setStringArrayAttribute(cppValue); | 1310 impl->setStringArrayAttribute(cppValue); |
1231 } | 1311 } |
1232 | 1312 |
1233 static void testInterfaceEmptyArrayAttributeAttributeGetter(const v8::FunctionCa
llbackInfo<v8::Value>& info) { | 1313 static void testInterfaceEmptyArrayAttributeAttributeGetter(const v8::FunctionCa
llbackInfo<v8::Value>& info) { |
1234 v8::Local<v8::Object> holder = info.Holder(); | 1314 v8::Local<v8::Object> holder = info.Holder(); |
1235 | 1315 |
1236 TestObject* impl = V8TestObject::toImpl(holder); | 1316 TestObject* impl = V8TestObject::toImpl(holder); |
1237 | 1317 |
1238 V8SetReturnValue(info, ToV8(impl->testInterfaceEmptyArrayAttribute(), info.Hol
der(), info.GetIsolate())); | 1318 V8SetReturnValue(info, ToV8(impl->testInterfaceEmptyArrayAttribute(), info.Hol
der(), info.GetIsolate())); |
1239 } | 1319 } |
1240 | 1320 |
1241 static void testInterfaceEmptyArrayAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { | 1321 static void testInterfaceEmptyArrayAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { |
1242 v8::Isolate* isolate = info.GetIsolate(); | 1322 v8::Isolate* isolate = info.GetIsolate(); |
1243 ALLOW_UNUSED_LOCAL(isolate); | 1323 ALLOW_UNUSED_LOCAL(isolate); |
1244 | 1324 |
1245 v8::Local<v8::Object> holder = info.Holder(); | 1325 v8::Local<v8::Object> holder = info.Holder(); |
| 1326 ALLOW_UNUSED_LOCAL(holder); |
| 1327 |
1246 TestObject* impl = V8TestObject::toImpl(holder); | 1328 TestObject* impl = V8TestObject::toImpl(holder); |
1247 | 1329 |
1248 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "testInterfaceEmptyArrayAttribute"); | 1330 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "testInterfaceEmptyArrayAttribute"); |
1249 | 1331 |
1250 // Prepare the value to be set. | 1332 // Prepare the value to be set. |
1251 HeapVector<Member<TestInterfaceEmpty>> cppValue = NativeValueTraits<IDLSequenc
e<TestInterfaceEmpty>>::NativeValue(info.GetIsolate(), v8Value, exceptionState); | 1333 HeapVector<Member<TestInterfaceEmpty>> cppValue = NativeValueTraits<IDLSequenc
e<TestInterfaceEmpty>>::NativeValue(info.GetIsolate(), v8Value, exceptionState); |
1252 if (exceptionState.HadException()) | 1334 if (exceptionState.HadException()) |
1253 return; | 1335 return; |
1254 | 1336 |
1255 impl->setTestInterfaceEmptyArrayAttribute(cppValue); | 1337 impl->setTestInterfaceEmptyArrayAttribute(cppValue); |
1256 } | 1338 } |
1257 | 1339 |
1258 static void floatArrayAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8
::Value>& info) { | 1340 static void floatArrayAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8
::Value>& info) { |
1259 v8::Local<v8::Object> holder = info.Holder(); | 1341 v8::Local<v8::Object> holder = info.Holder(); |
1260 | 1342 |
1261 TestObject* impl = V8TestObject::toImpl(holder); | 1343 TestObject* impl = V8TestObject::toImpl(holder); |
1262 | 1344 |
1263 V8SetReturnValue(info, ToV8(impl->floatArrayAttribute(), info.Holder(), info.G
etIsolate())); | 1345 V8SetReturnValue(info, ToV8(impl->floatArrayAttribute(), info.Holder(), info.G
etIsolate())); |
1264 } | 1346 } |
1265 | 1347 |
1266 static void floatArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::FunctionCallbackInfo<v8::Value>& info) { | 1348 static void floatArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::FunctionCallbackInfo<v8::Value>& info) { |
1267 v8::Isolate* isolate = info.GetIsolate(); | 1349 v8::Isolate* isolate = info.GetIsolate(); |
1268 ALLOW_UNUSED_LOCAL(isolate); | 1350 ALLOW_UNUSED_LOCAL(isolate); |
1269 | 1351 |
1270 v8::Local<v8::Object> holder = info.Holder(); | 1352 v8::Local<v8::Object> holder = info.Holder(); |
| 1353 ALLOW_UNUSED_LOCAL(holder); |
| 1354 |
1271 TestObject* impl = V8TestObject::toImpl(holder); | 1355 TestObject* impl = V8TestObject::toImpl(holder); |
1272 | 1356 |
1273 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "floatArrayAttribute"); | 1357 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "floatArrayAttribute"); |
1274 | 1358 |
1275 // Prepare the value to be set. | 1359 // Prepare the value to be set. |
1276 Vector<float> cppValue = NativeValueTraits<IDLSequence<IDLFloat>>::NativeValue
(info.GetIsolate(), v8Value, exceptionState); | 1360 Vector<float> cppValue = NativeValueTraits<IDLSequence<IDLFloat>>::NativeValue
(info.GetIsolate(), v8Value, exceptionState); |
1277 if (exceptionState.HadException()) | 1361 if (exceptionState.HadException()) |
1278 return; | 1362 return; |
1279 | 1363 |
1280 impl->setFloatArrayAttribute(cppValue); | 1364 impl->setFloatArrayAttribute(cppValue); |
1281 } | 1365 } |
1282 | 1366 |
1283 static void stringFrozenArrayAttributeAttributeGetter(const v8::FunctionCallback
Info<v8::Value>& info) { | 1367 static void stringFrozenArrayAttributeAttributeGetter(const v8::FunctionCallback
Info<v8::Value>& info) { |
1284 v8::Local<v8::Object> holder = info.Holder(); | 1368 v8::Local<v8::Object> holder = info.Holder(); |
1285 | 1369 |
1286 TestObject* impl = V8TestObject::toImpl(holder); | 1370 TestObject* impl = V8TestObject::toImpl(holder); |
1287 | 1371 |
1288 V8SetReturnValue(info, FreezeV8Object(ToV8(impl->stringFrozenArrayAttribute(),
info.Holder(), info.GetIsolate()), info.GetIsolate())); | 1372 V8SetReturnValue(info, FreezeV8Object(ToV8(impl->stringFrozenArrayAttribute(),
info.Holder(), info.GetIsolate()), info.GetIsolate())); |
1289 } | 1373 } |
1290 | 1374 |
1291 static void stringFrozenArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::FunctionCallbackInfo<v8::Value>& info) { | 1375 static void stringFrozenArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::FunctionCallbackInfo<v8::Value>& info) { |
1292 v8::Isolate* isolate = info.GetIsolate(); | 1376 v8::Isolate* isolate = info.GetIsolate(); |
1293 ALLOW_UNUSED_LOCAL(isolate); | 1377 ALLOW_UNUSED_LOCAL(isolate); |
1294 | 1378 |
1295 v8::Local<v8::Object> holder = info.Holder(); | 1379 v8::Local<v8::Object> holder = info.Holder(); |
| 1380 ALLOW_UNUSED_LOCAL(holder); |
| 1381 |
1296 TestObject* impl = V8TestObject::toImpl(holder); | 1382 TestObject* impl = V8TestObject::toImpl(holder); |
1297 | 1383 |
1298 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "stringFrozenArrayAttribute"); | 1384 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "stringFrozenArrayAttribute"); |
1299 | 1385 |
1300 // Prepare the value to be set. | 1386 // Prepare the value to be set. |
1301 Vector<String> cppValue = NativeValueTraits<IDLSequence<IDLString>>::NativeVal
ue(info.GetIsolate(), v8Value, exceptionState); | 1387 Vector<String> cppValue = NativeValueTraits<IDLSequence<IDLString>>::NativeVal
ue(info.GetIsolate(), v8Value, exceptionState); |
1302 if (exceptionState.HadException()) | 1388 if (exceptionState.HadException()) |
1303 return; | 1389 return; |
1304 | 1390 |
1305 impl->setStringFrozenArrayAttribute(cppValue); | 1391 impl->setStringFrozenArrayAttribute(cppValue); |
1306 } | 1392 } |
1307 | 1393 |
1308 static void testInterfaceEmptyFrozenArrayAttributeAttributeGetter(const v8::Func
tionCallbackInfo<v8::Value>& info) { | 1394 static void testInterfaceEmptyFrozenArrayAttributeAttributeGetter(const v8::Func
tionCallbackInfo<v8::Value>& info) { |
1309 v8::Local<v8::Object> holder = info.Holder(); | 1395 v8::Local<v8::Object> holder = info.Holder(); |
1310 | 1396 |
1311 TestObject* impl = V8TestObject::toImpl(holder); | 1397 TestObject* impl = V8TestObject::toImpl(holder); |
1312 | 1398 |
1313 V8SetReturnValue(info, FreezeV8Object(ToV8(impl->testInterfaceEmptyFrozenArray
Attribute(), info.Holder(), info.GetIsolate()), info.GetIsolate())); | 1399 V8SetReturnValue(info, FreezeV8Object(ToV8(impl->testInterfaceEmptyFrozenArray
Attribute(), info.Holder(), info.GetIsolate()), info.GetIsolate())); |
1314 } | 1400 } |
1315 | 1401 |
1316 static void testInterfaceEmptyFrozenArrayAttributeAttributeSetter(v8::Local<v8::
Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { | 1402 static void testInterfaceEmptyFrozenArrayAttributeAttributeSetter(v8::Local<v8::
Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { |
1317 v8::Isolate* isolate = info.GetIsolate(); | 1403 v8::Isolate* isolate = info.GetIsolate(); |
1318 ALLOW_UNUSED_LOCAL(isolate); | 1404 ALLOW_UNUSED_LOCAL(isolate); |
1319 | 1405 |
1320 v8::Local<v8::Object> holder = info.Holder(); | 1406 v8::Local<v8::Object> holder = info.Holder(); |
| 1407 ALLOW_UNUSED_LOCAL(holder); |
| 1408 |
1321 TestObject* impl = V8TestObject::toImpl(holder); | 1409 TestObject* impl = V8TestObject::toImpl(holder); |
1322 | 1410 |
1323 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "testInterfaceEmptyFrozenArrayAttribute"); | 1411 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "testInterfaceEmptyFrozenArrayAttribute"); |
1324 | 1412 |
1325 // Prepare the value to be set. | 1413 // Prepare the value to be set. |
1326 HeapVector<Member<TestInterfaceEmpty>> cppValue = NativeValueTraits<IDLSequenc
e<TestInterfaceEmpty>>::NativeValue(info.GetIsolate(), v8Value, exceptionState); | 1414 HeapVector<Member<TestInterfaceEmpty>> cppValue = NativeValueTraits<IDLSequenc
e<TestInterfaceEmpty>>::NativeValue(info.GetIsolate(), v8Value, exceptionState); |
1327 if (exceptionState.HadException()) | 1415 if (exceptionState.HadException()) |
1328 return; | 1416 return; |
1329 | 1417 |
1330 impl->setTestInterfaceEmptyFrozenArrayAttribute(cppValue); | 1418 impl->setTestInterfaceEmptyFrozenArrayAttribute(cppValue); |
(...skipping 14 matching lines...) Expand all Loading... |
1345 } | 1433 } |
1346 | 1434 |
1347 V8SetReturnValueBool(info, cppValue); | 1435 V8SetReturnValueBool(info, cppValue); |
1348 } | 1436 } |
1349 | 1437 |
1350 static void booleanOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) { | 1438 static void booleanOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) { |
1351 v8::Isolate* isolate = info.GetIsolate(); | 1439 v8::Isolate* isolate = info.GetIsolate(); |
1352 ALLOW_UNUSED_LOCAL(isolate); | 1440 ALLOW_UNUSED_LOCAL(isolate); |
1353 | 1441 |
1354 v8::Local<v8::Object> holder = info.Holder(); | 1442 v8::Local<v8::Object> holder = info.Holder(); |
| 1443 ALLOW_UNUSED_LOCAL(holder); |
| 1444 |
1355 TestObject* impl = V8TestObject::toImpl(holder); | 1445 TestObject* impl = V8TestObject::toImpl(holder); |
1356 | 1446 |
1357 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "booleanOrNullAttribute"); | 1447 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "booleanOrNullAttribute"); |
1358 | 1448 |
1359 // Prepare the value to be set. | 1449 // Prepare the value to be set. |
1360 bool cppValue = NativeValueTraits<IDLBoolean>::NativeValue(info.GetIsolate(),
v8Value, exceptionState); | 1450 bool cppValue = NativeValueTraits<IDLBoolean>::NativeValue(info.GetIsolate(),
v8Value, exceptionState); |
1361 if (exceptionState.HadException()) | 1451 if (exceptionState.HadException()) |
1362 return; | 1452 return; |
1363 | 1453 |
1364 bool isNull = IsUndefinedOrNull(v8Value); | 1454 bool isNull = IsUndefinedOrNull(v8Value); |
1365 impl->setBooleanOrNullAttribute(cppValue, isNull); | 1455 impl->setBooleanOrNullAttribute(cppValue, isNull); |
1366 } | 1456 } |
1367 | 1457 |
1368 static void stringOrNullAttributeAttributeGetter(const v8::FunctionCallbackInfo<
v8::Value>& info) { | 1458 static void stringOrNullAttributeAttributeGetter(const v8::FunctionCallbackInfo<
v8::Value>& info) { |
1369 v8::Local<v8::Object> holder = info.Holder(); | 1459 v8::Local<v8::Object> holder = info.Holder(); |
1370 | 1460 |
1371 TestObject* impl = V8TestObject::toImpl(holder); | 1461 TestObject* impl = V8TestObject::toImpl(holder); |
1372 | 1462 |
1373 V8SetReturnValueStringOrNull(info, impl->stringOrNullAttribute(), info.GetIsol
ate()); | 1463 V8SetReturnValueStringOrNull(info, impl->stringOrNullAttribute(), info.GetIsol
ate()); |
1374 } | 1464 } |
1375 | 1465 |
1376 static void stringOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::FunctionCallbackInfo<v8::Value>& info) { | 1466 static void stringOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::FunctionCallbackInfo<v8::Value>& info) { |
1377 v8::Isolate* isolate = info.GetIsolate(); | 1467 v8::Isolate* isolate = info.GetIsolate(); |
1378 ALLOW_UNUSED_LOCAL(isolate); | 1468 ALLOW_UNUSED_LOCAL(isolate); |
1379 | 1469 |
1380 v8::Local<v8::Object> holder = info.Holder(); | 1470 v8::Local<v8::Object> holder = info.Holder(); |
| 1471 ALLOW_UNUSED_LOCAL(holder); |
| 1472 |
1381 TestObject* impl = V8TestObject::toImpl(holder); | 1473 TestObject* impl = V8TestObject::toImpl(holder); |
1382 | 1474 |
1383 // Prepare the value to be set. | 1475 // Prepare the value to be set. |
1384 V8StringResource<kTreatNullAndUndefinedAsNullString> cppValue = v8Value; | 1476 V8StringResource<kTreatNullAndUndefinedAsNullString> cppValue = v8Value; |
1385 if (!cppValue.Prepare()) | 1477 if (!cppValue.Prepare()) |
1386 return; | 1478 return; |
1387 | 1479 |
1388 impl->setStringOrNullAttribute(cppValue); | 1480 impl->setStringOrNullAttribute(cppValue); |
1389 } | 1481 } |
1390 | 1482 |
(...skipping 12 matching lines...) Expand all Loading... |
1403 } | 1495 } |
1404 | 1496 |
1405 V8SetReturnValueInt(info, cppValue); | 1497 V8SetReturnValueInt(info, cppValue); |
1406 } | 1498 } |
1407 | 1499 |
1408 static void longOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::FunctionCallbackInfo<v8::Value>& info) { | 1500 static void longOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::FunctionCallbackInfo<v8::Value>& info) { |
1409 v8::Isolate* isolate = info.GetIsolate(); | 1501 v8::Isolate* isolate = info.GetIsolate(); |
1410 ALLOW_UNUSED_LOCAL(isolate); | 1502 ALLOW_UNUSED_LOCAL(isolate); |
1411 | 1503 |
1412 v8::Local<v8::Object> holder = info.Holder(); | 1504 v8::Local<v8::Object> holder = info.Holder(); |
| 1505 ALLOW_UNUSED_LOCAL(holder); |
| 1506 |
1413 TestObject* impl = V8TestObject::toImpl(holder); | 1507 TestObject* impl = V8TestObject::toImpl(holder); |
1414 | 1508 |
1415 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "longOrNullAttribute"); | 1509 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "longOrNullAttribute"); |
1416 | 1510 |
1417 // Prepare the value to be set. | 1511 // Prepare the value to be set. |
1418 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); | 1512 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); |
1419 if (exceptionState.HadException()) | 1513 if (exceptionState.HadException()) |
1420 return; | 1514 return; |
1421 | 1515 |
1422 bool isNull = IsUndefinedOrNull(v8Value); | 1516 bool isNull = IsUndefinedOrNull(v8Value); |
1423 impl->setLongOrNullAttribute(cppValue, isNull); | 1517 impl->setLongOrNullAttribute(cppValue, isNull); |
1424 } | 1518 } |
1425 | 1519 |
1426 static void testInterfaceOrNullAttributeAttributeGetter(const v8::FunctionCallba
ckInfo<v8::Value>& info) { | 1520 static void testInterfaceOrNullAttributeAttributeGetter(const v8::FunctionCallba
ckInfo<v8::Value>& info) { |
1427 v8::Local<v8::Object> holder = info.Holder(); | 1521 v8::Local<v8::Object> holder = info.Holder(); |
1428 | 1522 |
1429 TestObject* impl = V8TestObject::toImpl(holder); | 1523 TestObject* impl = V8TestObject::toImpl(holder); |
1430 | 1524 |
1431 V8SetReturnValueFast(info, WTF::GetPtr(impl->testInterfaceOrNullAttribute()),
impl); | 1525 V8SetReturnValueFast(info, WTF::GetPtr(impl->testInterfaceOrNullAttribute()),
impl); |
1432 } | 1526 } |
1433 | 1527 |
1434 static void testInterfaceOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8V
alue, const v8::FunctionCallbackInfo<v8::Value>& info) { | 1528 static void testInterfaceOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8V
alue, const v8::FunctionCallbackInfo<v8::Value>& info) { |
1435 v8::Isolate* isolate = info.GetIsolate(); | 1529 v8::Isolate* isolate = info.GetIsolate(); |
1436 ALLOW_UNUSED_LOCAL(isolate); | 1530 ALLOW_UNUSED_LOCAL(isolate); |
1437 | 1531 |
1438 v8::Local<v8::Object> holder = info.Holder(); | 1532 v8::Local<v8::Object> holder = info.Holder(); |
| 1533 ALLOW_UNUSED_LOCAL(holder); |
| 1534 |
1439 TestObject* impl = V8TestObject::toImpl(holder); | 1535 TestObject* impl = V8TestObject::toImpl(holder); |
1440 | 1536 |
1441 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "testInterfaceOrNullAttribute"); | 1537 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "testInterfaceOrNullAttribute"); |
1442 | 1538 |
1443 // Prepare the value to be set. | 1539 // Prepare the value to be set. |
1444 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck(i
nfo.GetIsolate(), v8Value); | 1540 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck(i
nfo.GetIsolate(), v8Value); |
1445 | 1541 |
1446 // Type check per: http://heycam.github.io/webidl/#es-interface | 1542 // Type check per: http://heycam.github.io/webidl/#es-interface |
1447 if (!cppValue && !IsUndefinedOrNull(v8Value)) { | 1543 if (!cppValue && !IsUndefinedOrNull(v8Value)) { |
1448 exceptionState.ThrowTypeError("The provided value is not of type 'TestInterf
ace'."); | 1544 exceptionState.ThrowTypeError("The provided value is not of type 'TestInterf
ace'."); |
1449 return; | 1545 return; |
1450 } | 1546 } |
1451 | 1547 |
1452 impl->setTestInterfaceOrNullAttribute(cppValue); | 1548 impl->setTestInterfaceOrNullAttribute(cppValue); |
1453 } | 1549 } |
1454 | 1550 |
1455 static void testEnumAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::
Value>& info) { | 1551 static void testEnumAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::
Value>& info) { |
1456 v8::Local<v8::Object> holder = info.Holder(); | 1552 v8::Local<v8::Object> holder = info.Holder(); |
1457 | 1553 |
1458 TestObject* impl = V8TestObject::toImpl(holder); | 1554 TestObject* impl = V8TestObject::toImpl(holder); |
1459 | 1555 |
1460 V8SetReturnValueString(info, impl->testEnumAttribute(), info.GetIsolate()); | 1556 V8SetReturnValueString(info, impl->testEnumAttribute(), info.GetIsolate()); |
1461 } | 1557 } |
1462 | 1558 |
1463 static void testEnumAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::FunctionCallbackInfo<v8::Value>& info) { | 1559 static void testEnumAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::FunctionCallbackInfo<v8::Value>& info) { |
1464 v8::Isolate* isolate = info.GetIsolate(); | 1560 v8::Isolate* isolate = info.GetIsolate(); |
1465 ALLOW_UNUSED_LOCAL(isolate); | 1561 ALLOW_UNUSED_LOCAL(isolate); |
1466 | 1562 |
1467 v8::Local<v8::Object> holder = info.Holder(); | 1563 v8::Local<v8::Object> holder = info.Holder(); |
| 1564 ALLOW_UNUSED_LOCAL(holder); |
| 1565 |
1468 TestObject* impl = V8TestObject::toImpl(holder); | 1566 TestObject* impl = V8TestObject::toImpl(holder); |
1469 | 1567 |
1470 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "testEnumAttribute"); | 1568 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "testEnumAttribute"); |
1471 | 1569 |
1472 // Prepare the value to be set. | 1570 // Prepare the value to be set. |
1473 V8StringResource<> cppValue = v8Value; | 1571 V8StringResource<> cppValue = v8Value; |
1474 if (!cppValue.Prepare()) | 1572 if (!cppValue.Prepare()) |
1475 return; | 1573 return; |
1476 | 1574 |
1477 // Type check per: http://heycam.github.io/webidl/#dfn-attribute-setter | 1575 // Type check per: http://heycam.github.io/webidl/#dfn-attribute-setter |
(...skipping 19 matching lines...) Expand all Loading... |
1497 TestObject* impl = V8TestObject::toImpl(holder); | 1595 TestObject* impl = V8TestObject::toImpl(holder); |
1498 | 1596 |
1499 V8SetReturnValueStringOrNull(info, impl->testEnumOrNullAttribute(), info.GetIs
olate()); | 1597 V8SetReturnValueStringOrNull(info, impl->testEnumOrNullAttribute(), info.GetIs
olate()); |
1500 } | 1598 } |
1501 | 1599 |
1502 static void testEnumOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) { | 1600 static void testEnumOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) { |
1503 v8::Isolate* isolate = info.GetIsolate(); | 1601 v8::Isolate* isolate = info.GetIsolate(); |
1504 ALLOW_UNUSED_LOCAL(isolate); | 1602 ALLOW_UNUSED_LOCAL(isolate); |
1505 | 1603 |
1506 v8::Local<v8::Object> holder = info.Holder(); | 1604 v8::Local<v8::Object> holder = info.Holder(); |
| 1605 ALLOW_UNUSED_LOCAL(holder); |
| 1606 |
1507 TestObject* impl = V8TestObject::toImpl(holder); | 1607 TestObject* impl = V8TestObject::toImpl(holder); |
1508 | 1608 |
1509 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "testEnumOrNullAttribute"); | 1609 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "testEnumOrNullAttribute"); |
1510 | 1610 |
1511 // Prepare the value to be set. | 1611 // Prepare the value to be set. |
1512 V8StringResource<kTreatNullAndUndefinedAsNullString> cppValue = v8Value; | 1612 V8StringResource<kTreatNullAndUndefinedAsNullString> cppValue = v8Value; |
1513 if (!cppValue.Prepare()) | 1613 if (!cppValue.Prepare()) |
1514 return; | 1614 return; |
1515 | 1615 |
1516 // Type check per: http://heycam.github.io/webidl/#dfn-attribute-setter | 1616 // Type check per: http://heycam.github.io/webidl/#dfn-attribute-setter |
(...skipping 14 matching lines...) Expand all Loading... |
1531 } | 1631 } |
1532 | 1632 |
1533 static void staticStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<
v8::Value>& info) { | 1633 static void staticStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<
v8::Value>& info) { |
1534 V8SetReturnValueString(info, TestObject::staticStringAttribute(), info.GetIsol
ate()); | 1634 V8SetReturnValueString(info, TestObject::staticStringAttribute(), info.GetIsol
ate()); |
1535 } | 1635 } |
1536 | 1636 |
1537 static void staticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::FunctionCallbackInfo<v8::Value>& info) { | 1637 static void staticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::FunctionCallbackInfo<v8::Value>& info) { |
1538 v8::Isolate* isolate = info.GetIsolate(); | 1638 v8::Isolate* isolate = info.GetIsolate(); |
1539 ALLOW_UNUSED_LOCAL(isolate); | 1639 ALLOW_UNUSED_LOCAL(isolate); |
1540 | 1640 |
| 1641 v8::Local<v8::Object> holder = info.Holder(); |
| 1642 ALLOW_UNUSED_LOCAL(holder); |
| 1643 |
1541 // Prepare the value to be set. | 1644 // Prepare the value to be set. |
1542 V8StringResource<> cppValue = v8Value; | 1645 V8StringResource<> cppValue = v8Value; |
1543 if (!cppValue.Prepare()) | 1646 if (!cppValue.Prepare()) |
1544 return; | 1647 return; |
1545 | 1648 |
1546 TestObject::setStaticStringAttribute(cppValue); | 1649 TestObject::setStaticStringAttribute(cppValue); |
1547 } | 1650 } |
1548 | 1651 |
1549 static void staticLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8
::Value>& info) { | 1652 static void staticLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8
::Value>& info) { |
1550 V8SetReturnValueInt(info, TestObject::staticLongAttribute()); | 1653 V8SetReturnValueInt(info, TestObject::staticLongAttribute()); |
1551 } | 1654 } |
1552 | 1655 |
1553 static void staticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::FunctionCallbackInfo<v8::Value>& info) { | 1656 static void staticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::FunctionCallbackInfo<v8::Value>& info) { |
1554 v8::Isolate* isolate = info.GetIsolate(); | 1657 v8::Isolate* isolate = info.GetIsolate(); |
1555 ALLOW_UNUSED_LOCAL(isolate); | 1658 ALLOW_UNUSED_LOCAL(isolate); |
1556 | 1659 |
| 1660 v8::Local<v8::Object> holder = info.Holder(); |
| 1661 ALLOW_UNUSED_LOCAL(holder); |
| 1662 |
1557 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "staticLongAttribute"); | 1663 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "staticLongAttribute"); |
1558 | 1664 |
1559 // Prepare the value to be set. | 1665 // Prepare the value to be set. |
1560 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); | 1666 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); |
1561 if (exceptionState.HadException()) | 1667 if (exceptionState.HadException()) |
1562 return; | 1668 return; |
1563 | 1669 |
1564 TestObject::setStaticLongAttribute(cppValue); | 1670 TestObject::setStaticLongAttribute(cppValue); |
1565 } | 1671 } |
1566 | 1672 |
1567 static void eventHandlerAttributeAttributeGetter(const v8::FunctionCallbackInfo<
v8::Value>& info) { | 1673 static void eventHandlerAttributeAttributeGetter(const v8::FunctionCallbackInfo<
v8::Value>& info) { |
1568 v8::Local<v8::Object> holder = info.Holder(); | 1674 v8::Local<v8::Object> holder = info.Holder(); |
1569 | 1675 |
1570 TestObject* impl = V8TestObject::toImpl(holder); | 1676 TestObject* impl = V8TestObject::toImpl(holder); |
1571 | 1677 |
1572 EventListener* cppValue(WTF::GetPtr(impl->eventHandlerAttribute())); | 1678 EventListener* cppValue(WTF::GetPtr(impl->eventHandlerAttribute())); |
1573 | 1679 |
1574 V8SetReturnValue(info, cppValue ? V8AbstractEventListener::Cast(cppValue)->Get
ListenerOrNull(info.GetIsolate(), impl->GetExecutionContext()) : v8::Null(info.G
etIsolate()).As<v8::Value>()); | 1680 V8SetReturnValue(info, cppValue ? V8AbstractEventListener::Cast(cppValue)->Get
ListenerOrNull(info.GetIsolate(), impl->GetExecutionContext()) : v8::Null(info.G
etIsolate()).As<v8::Value>()); |
1575 } | 1681 } |
1576 | 1682 |
1577 static void eventHandlerAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::FunctionCallbackInfo<v8::Value>& info) { | 1683 static void eventHandlerAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::FunctionCallbackInfo<v8::Value>& info) { |
1578 v8::Isolate* isolate = info.GetIsolate(); | 1684 v8::Isolate* isolate = info.GetIsolate(); |
1579 ALLOW_UNUSED_LOCAL(isolate); | 1685 ALLOW_UNUSED_LOCAL(isolate); |
1580 | 1686 |
1581 v8::Local<v8::Object> holder = info.Holder(); | 1687 v8::Local<v8::Object> holder = info.Holder(); |
| 1688 ALLOW_UNUSED_LOCAL(holder); |
| 1689 |
1582 TestObject* impl = V8TestObject::toImpl(holder); | 1690 TestObject* impl = V8TestObject::toImpl(holder); |
1583 | 1691 |
1584 // Prepare the value to be set. | 1692 // Prepare the value to be set. |
1585 MoveEventListenerToNewWrapper(isolate, holder, impl->eventHandlerAttribute(),
v8Value, V8TestObject::eventListenerCacheIndex); | 1693 MoveEventListenerToNewWrapper(isolate, holder, impl->eventHandlerAttribute(),
v8Value, V8TestObject::eventListenerCacheIndex); |
1586 | 1694 |
1587 impl->setEventHandlerAttribute(V8EventListenerHelper::GetEventListener(ScriptS
tate::ForReceiverObject(info), v8Value, true, kListenerFindOrCreate)); | 1695 impl->setEventHandlerAttribute(V8EventListenerHelper::GetEventListener(ScriptS
tate::ForReceiverObject(info), v8Value, true, kListenerFindOrCreate)); |
1588 } | 1696 } |
1589 | 1697 |
1590 static void doubleOrStringAttributeAttributeGetter(const v8::FunctionCallbackInf
o<v8::Value>& info) { | 1698 static void doubleOrStringAttributeAttributeGetter(const v8::FunctionCallbackInf
o<v8::Value>& info) { |
1591 v8::Local<v8::Object> holder = info.Holder(); | 1699 v8::Local<v8::Object> holder = info.Holder(); |
1592 | 1700 |
1593 TestObject* impl = V8TestObject::toImpl(holder); | 1701 TestObject* impl = V8TestObject::toImpl(holder); |
1594 | 1702 |
1595 DoubleOrString result; | 1703 DoubleOrString result; |
1596 impl->doubleOrStringAttribute(result); | 1704 impl->doubleOrStringAttribute(result); |
1597 | 1705 |
1598 V8SetReturnValue(info, result); | 1706 V8SetReturnValue(info, result); |
1599 } | 1707 } |
1600 | 1708 |
1601 static void doubleOrStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) { | 1709 static void doubleOrStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) { |
1602 v8::Isolate* isolate = info.GetIsolate(); | 1710 v8::Isolate* isolate = info.GetIsolate(); |
1603 ALLOW_UNUSED_LOCAL(isolate); | 1711 ALLOW_UNUSED_LOCAL(isolate); |
1604 | 1712 |
1605 v8::Local<v8::Object> holder = info.Holder(); | 1713 v8::Local<v8::Object> holder = info.Holder(); |
| 1714 ALLOW_UNUSED_LOCAL(holder); |
| 1715 |
1606 TestObject* impl = V8TestObject::toImpl(holder); | 1716 TestObject* impl = V8TestObject::toImpl(holder); |
1607 | 1717 |
1608 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "doubleOrStringAttribute"); | 1718 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "doubleOrStringAttribute"); |
1609 | 1719 |
1610 // Prepare the value to be set. | 1720 // Prepare the value to be set. |
1611 DoubleOrString cppValue; | 1721 DoubleOrString cppValue; |
1612 V8DoubleOrString::toImpl(info.GetIsolate(), v8Value, cppValue, UnionTypeConver
sionMode::kNotNullable, exceptionState); | 1722 V8DoubleOrString::toImpl(info.GetIsolate(), v8Value, cppValue, UnionTypeConver
sionMode::kNotNullable, exceptionState); |
1613 if (exceptionState.HadException()) | 1723 if (exceptionState.HadException()) |
1614 return; | 1724 return; |
1615 | 1725 |
1616 impl->setDoubleOrStringAttribute(cppValue); | 1726 impl->setDoubleOrStringAttribute(cppValue); |
1617 } | 1727 } |
1618 | 1728 |
1619 static void doubleOrStringOrNullAttributeAttributeGetter(const v8::FunctionCallb
ackInfo<v8::Value>& info) { | 1729 static void doubleOrStringOrNullAttributeAttributeGetter(const v8::FunctionCallb
ackInfo<v8::Value>& info) { |
1620 v8::Local<v8::Object> holder = info.Holder(); | 1730 v8::Local<v8::Object> holder = info.Holder(); |
1621 | 1731 |
1622 TestObject* impl = V8TestObject::toImpl(holder); | 1732 TestObject* impl = V8TestObject::toImpl(holder); |
1623 | 1733 |
1624 DoubleOrString result; | 1734 DoubleOrString result; |
1625 impl->doubleOrStringOrNullAttribute(result); | 1735 impl->doubleOrStringOrNullAttribute(result); |
1626 | 1736 |
1627 V8SetReturnValue(info, result); | 1737 V8SetReturnValue(info, result); |
1628 } | 1738 } |
1629 | 1739 |
1630 static void doubleOrStringOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::FunctionCallbackInfo<v8::Value>& info) { | 1740 static void doubleOrStringOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::FunctionCallbackInfo<v8::Value>& info) { |
1631 v8::Isolate* isolate = info.GetIsolate(); | 1741 v8::Isolate* isolate = info.GetIsolate(); |
1632 ALLOW_UNUSED_LOCAL(isolate); | 1742 ALLOW_UNUSED_LOCAL(isolate); |
1633 | 1743 |
1634 v8::Local<v8::Object> holder = info.Holder(); | 1744 v8::Local<v8::Object> holder = info.Holder(); |
| 1745 ALLOW_UNUSED_LOCAL(holder); |
| 1746 |
1635 TestObject* impl = V8TestObject::toImpl(holder); | 1747 TestObject* impl = V8TestObject::toImpl(holder); |
1636 | 1748 |
1637 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "doubleOrStringOrNullAttribute"); | 1749 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "doubleOrStringOrNullAttribute"); |
1638 | 1750 |
1639 // Prepare the value to be set. | 1751 // Prepare the value to be set. |
1640 DoubleOrString cppValue; | 1752 DoubleOrString cppValue; |
1641 V8DoubleOrString::toImpl(info.GetIsolate(), v8Value, cppValue, UnionTypeConver
sionMode::kNullable, exceptionState); | 1753 V8DoubleOrString::toImpl(info.GetIsolate(), v8Value, cppValue, UnionTypeConver
sionMode::kNullable, exceptionState); |
1642 if (exceptionState.HadException()) | 1754 if (exceptionState.HadException()) |
1643 return; | 1755 return; |
1644 | 1756 |
1645 impl->setDoubleOrStringOrNullAttribute(cppValue); | 1757 impl->setDoubleOrStringOrNullAttribute(cppValue); |
1646 } | 1758 } |
1647 | 1759 |
1648 static void doubleOrNullStringAttributeAttributeGetter(const v8::FunctionCallbac
kInfo<v8::Value>& info) { | 1760 static void doubleOrNullStringAttributeAttributeGetter(const v8::FunctionCallbac
kInfo<v8::Value>& info) { |
1649 v8::Local<v8::Object> holder = info.Holder(); | 1761 v8::Local<v8::Object> holder = info.Holder(); |
1650 | 1762 |
1651 TestObject* impl = V8TestObject::toImpl(holder); | 1763 TestObject* impl = V8TestObject::toImpl(holder); |
1652 | 1764 |
1653 DoubleOrString result; | 1765 DoubleOrString result; |
1654 impl->doubleOrNullStringAttribute(result); | 1766 impl->doubleOrNullStringAttribute(result); |
1655 | 1767 |
1656 V8SetReturnValue(info, result); | 1768 V8SetReturnValue(info, result); |
1657 } | 1769 } |
1658 | 1770 |
1659 static void doubleOrNullStringAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::FunctionCallbackInfo<v8::Value>& info) { | 1771 static void doubleOrNullStringAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::FunctionCallbackInfo<v8::Value>& info) { |
1660 v8::Isolate* isolate = info.GetIsolate(); | 1772 v8::Isolate* isolate = info.GetIsolate(); |
1661 ALLOW_UNUSED_LOCAL(isolate); | 1773 ALLOW_UNUSED_LOCAL(isolate); |
1662 | 1774 |
1663 v8::Local<v8::Object> holder = info.Holder(); | 1775 v8::Local<v8::Object> holder = info.Holder(); |
| 1776 ALLOW_UNUSED_LOCAL(holder); |
| 1777 |
1664 TestObject* impl = V8TestObject::toImpl(holder); | 1778 TestObject* impl = V8TestObject::toImpl(holder); |
1665 | 1779 |
1666 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "doubleOrNullStringAttribute"); | 1780 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "doubleOrNullStringAttribute"); |
1667 | 1781 |
1668 // Prepare the value to be set. | 1782 // Prepare the value to be set. |
1669 DoubleOrString cppValue; | 1783 DoubleOrString cppValue; |
1670 V8DoubleOrNullOrString::toImpl(info.GetIsolate(), v8Value, cppValue, UnionType
ConversionMode::kNullable, exceptionState); | 1784 V8DoubleOrNullOrString::toImpl(info.GetIsolate(), v8Value, cppValue, UnionType
ConversionMode::kNullable, exceptionState); |
1671 if (exceptionState.HadException()) | 1785 if (exceptionState.HadException()) |
1672 return; | 1786 return; |
1673 | 1787 |
1674 impl->setDoubleOrNullStringAttribute(cppValue); | 1788 impl->setDoubleOrNullStringAttribute(cppValue); |
1675 } | 1789 } |
1676 | 1790 |
1677 static void stringOrStringSequenceAttributeAttributeGetter(const v8::FunctionCal
lbackInfo<v8::Value>& info) { | 1791 static void stringOrStringSequenceAttributeAttributeGetter(const v8::FunctionCal
lbackInfo<v8::Value>& info) { |
1678 v8::Local<v8::Object> holder = info.Holder(); | 1792 v8::Local<v8::Object> holder = info.Holder(); |
1679 | 1793 |
1680 TestObject* impl = V8TestObject::toImpl(holder); | 1794 TestObject* impl = V8TestObject::toImpl(holder); |
1681 | 1795 |
1682 StringOrStringSequence result; | 1796 StringOrStringSequence result; |
1683 impl->stringOrStringSequenceAttribute(result); | 1797 impl->stringOrStringSequenceAttribute(result); |
1684 | 1798 |
1685 V8SetReturnValue(info, result); | 1799 V8SetReturnValue(info, result); |
1686 } | 1800 } |
1687 | 1801 |
1688 static void stringOrStringSequenceAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { | 1802 static void stringOrStringSequenceAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { |
1689 v8::Isolate* isolate = info.GetIsolate(); | 1803 v8::Isolate* isolate = info.GetIsolate(); |
1690 ALLOW_UNUSED_LOCAL(isolate); | 1804 ALLOW_UNUSED_LOCAL(isolate); |
1691 | 1805 |
1692 v8::Local<v8::Object> holder = info.Holder(); | 1806 v8::Local<v8::Object> holder = info.Holder(); |
| 1807 ALLOW_UNUSED_LOCAL(holder); |
| 1808 |
1693 TestObject* impl = V8TestObject::toImpl(holder); | 1809 TestObject* impl = V8TestObject::toImpl(holder); |
1694 | 1810 |
1695 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "stringOrStringSequenceAttribute"); | 1811 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "stringOrStringSequenceAttribute"); |
1696 | 1812 |
1697 // Prepare the value to be set. | 1813 // Prepare the value to be set. |
1698 StringOrStringSequence cppValue; | 1814 StringOrStringSequence cppValue; |
1699 V8StringOrStringSequence::toImpl(info.GetIsolate(), v8Value, cppValue, UnionTy
peConversionMode::kNotNullable, exceptionState); | 1815 V8StringOrStringSequence::toImpl(info.GetIsolate(), v8Value, cppValue, UnionTy
peConversionMode::kNotNullable, exceptionState); |
1700 if (exceptionState.HadException()) | 1816 if (exceptionState.HadException()) |
1701 return; | 1817 return; |
1702 | 1818 |
1703 impl->setStringOrStringSequenceAttribute(cppValue); | 1819 impl->setStringOrStringSequenceAttribute(cppValue); |
1704 } | 1820 } |
1705 | 1821 |
1706 static void testEnumOrDoubleAttributeAttributeGetter(const v8::FunctionCallbackI
nfo<v8::Value>& info) { | 1822 static void testEnumOrDoubleAttributeAttributeGetter(const v8::FunctionCallbackI
nfo<v8::Value>& info) { |
1707 v8::Local<v8::Object> holder = info.Holder(); | 1823 v8::Local<v8::Object> holder = info.Holder(); |
1708 | 1824 |
1709 TestObject* impl = V8TestObject::toImpl(holder); | 1825 TestObject* impl = V8TestObject::toImpl(holder); |
1710 | 1826 |
1711 TestEnumOrDouble result; | 1827 TestEnumOrDouble result; |
1712 impl->testEnumOrDoubleAttribute(result); | 1828 impl->testEnumOrDoubleAttribute(result); |
1713 | 1829 |
1714 V8SetReturnValue(info, result); | 1830 V8SetReturnValue(info, result); |
1715 } | 1831 } |
1716 | 1832 |
1717 static void testEnumOrDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::FunctionCallbackInfo<v8::Value>& info) { | 1833 static void testEnumOrDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::FunctionCallbackInfo<v8::Value>& info) { |
1718 v8::Isolate* isolate = info.GetIsolate(); | 1834 v8::Isolate* isolate = info.GetIsolate(); |
1719 ALLOW_UNUSED_LOCAL(isolate); | 1835 ALLOW_UNUSED_LOCAL(isolate); |
1720 | 1836 |
1721 v8::Local<v8::Object> holder = info.Holder(); | 1837 v8::Local<v8::Object> holder = info.Holder(); |
| 1838 ALLOW_UNUSED_LOCAL(holder); |
| 1839 |
1722 TestObject* impl = V8TestObject::toImpl(holder); | 1840 TestObject* impl = V8TestObject::toImpl(holder); |
1723 | 1841 |
1724 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "testEnumOrDoubleAttribute"); | 1842 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "testEnumOrDoubleAttribute"); |
1725 | 1843 |
1726 // Prepare the value to be set. | 1844 // Prepare the value to be set. |
1727 TestEnumOrDouble cppValue; | 1845 TestEnumOrDouble cppValue; |
1728 V8TestEnumOrDouble::toImpl(info.GetIsolate(), v8Value, cppValue, UnionTypeConv
ersionMode::kNotNullable, exceptionState); | 1846 V8TestEnumOrDouble::toImpl(info.GetIsolate(), v8Value, cppValue, UnionTypeConv
ersionMode::kNotNullable, exceptionState); |
1729 if (exceptionState.HadException()) | 1847 if (exceptionState.HadException()) |
1730 return; | 1848 return; |
1731 | 1849 |
1732 impl->setTestEnumOrDoubleAttribute(cppValue); | 1850 impl->setTestEnumOrDoubleAttribute(cppValue); |
1733 } | 1851 } |
1734 | 1852 |
1735 static void unrestrictedDoubleOrStringAttributeAttributeGetter(const v8::Functio
nCallbackInfo<v8::Value>& info) { | 1853 static void unrestrictedDoubleOrStringAttributeAttributeGetter(const v8::Functio
nCallbackInfo<v8::Value>& info) { |
1736 v8::Local<v8::Object> holder = info.Holder(); | 1854 v8::Local<v8::Object> holder = info.Holder(); |
1737 | 1855 |
1738 TestObject* impl = V8TestObject::toImpl(holder); | 1856 TestObject* impl = V8TestObject::toImpl(holder); |
1739 | 1857 |
1740 UnrestrictedDoubleOrString result; | 1858 UnrestrictedDoubleOrString result; |
1741 impl->unrestrictedDoubleOrStringAttribute(result); | 1859 impl->unrestrictedDoubleOrStringAttribute(result); |
1742 | 1860 |
1743 V8SetReturnValue(info, result); | 1861 V8SetReturnValue(info, result); |
1744 } | 1862 } |
1745 | 1863 |
1746 static void unrestrictedDoubleOrStringAttributeAttributeSetter(v8::Local<v8::Val
ue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { | 1864 static void unrestrictedDoubleOrStringAttributeAttributeSetter(v8::Local<v8::Val
ue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { |
1747 v8::Isolate* isolate = info.GetIsolate(); | 1865 v8::Isolate* isolate = info.GetIsolate(); |
1748 ALLOW_UNUSED_LOCAL(isolate); | 1866 ALLOW_UNUSED_LOCAL(isolate); |
1749 | 1867 |
1750 v8::Local<v8::Object> holder = info.Holder(); | 1868 v8::Local<v8::Object> holder = info.Holder(); |
| 1869 ALLOW_UNUSED_LOCAL(holder); |
| 1870 |
1751 TestObject* impl = V8TestObject::toImpl(holder); | 1871 TestObject* impl = V8TestObject::toImpl(holder); |
1752 | 1872 |
1753 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "unrestrictedDoubleOrStringAttribute"); | 1873 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "unrestrictedDoubleOrStringAttribute"); |
1754 | 1874 |
1755 // Prepare the value to be set. | 1875 // Prepare the value to be set. |
1756 UnrestrictedDoubleOrString cppValue; | 1876 UnrestrictedDoubleOrString cppValue; |
1757 V8UnrestrictedDoubleOrString::toImpl(info.GetIsolate(), v8Value, cppValue, Uni
onTypeConversionMode::kNotNullable, exceptionState); | 1877 V8UnrestrictedDoubleOrString::toImpl(info.GetIsolate(), v8Value, cppValue, Uni
onTypeConversionMode::kNotNullable, exceptionState); |
1758 if (exceptionState.HadException()) | 1878 if (exceptionState.HadException()) |
1759 return; | 1879 return; |
1760 | 1880 |
1761 impl->setUnrestrictedDoubleOrStringAttribute(cppValue); | 1881 impl->setUnrestrictedDoubleOrStringAttribute(cppValue); |
1762 } | 1882 } |
1763 | 1883 |
1764 static void nestedUnionAtributeAttributeGetter(const v8::FunctionCallbackInfo<v8
::Value>& info) { | 1884 static void nestedUnionAtributeAttributeGetter(const v8::FunctionCallbackInfo<v8
::Value>& info) { |
1765 v8::Local<v8::Object> holder = info.Holder(); | 1885 v8::Local<v8::Object> holder = info.Holder(); |
1766 | 1886 |
1767 TestObject* impl = V8TestObject::toImpl(holder); | 1887 TestObject* impl = V8TestObject::toImpl(holder); |
1768 | 1888 |
1769 DoubleOrStringOrDoubleOrStringSequence result; | 1889 DoubleOrStringOrDoubleOrStringSequence result; |
1770 impl->nestedUnionAtribute(result); | 1890 impl->nestedUnionAtribute(result); |
1771 | 1891 |
1772 V8SetReturnValue(info, result); | 1892 V8SetReturnValue(info, result); |
1773 } | 1893 } |
1774 | 1894 |
1775 static void nestedUnionAtributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::FunctionCallbackInfo<v8::Value>& info) { | 1895 static void nestedUnionAtributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::FunctionCallbackInfo<v8::Value>& info) { |
1776 v8::Isolate* isolate = info.GetIsolate(); | 1896 v8::Isolate* isolate = info.GetIsolate(); |
1777 ALLOW_UNUSED_LOCAL(isolate); | 1897 ALLOW_UNUSED_LOCAL(isolate); |
1778 | 1898 |
1779 v8::Local<v8::Object> holder = info.Holder(); | 1899 v8::Local<v8::Object> holder = info.Holder(); |
| 1900 ALLOW_UNUSED_LOCAL(holder); |
| 1901 |
1780 TestObject* impl = V8TestObject::toImpl(holder); | 1902 TestObject* impl = V8TestObject::toImpl(holder); |
1781 | 1903 |
1782 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "nestedUnionAtribute"); | 1904 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "nestedUnionAtribute"); |
1783 | 1905 |
1784 // Prepare the value to be set. | 1906 // Prepare the value to be set. |
1785 DoubleOrStringOrDoubleOrStringSequence cppValue; | 1907 DoubleOrStringOrDoubleOrStringSequence cppValue; |
1786 V8DoubleOrStringOrDoubleOrStringSequence::toImpl(info.GetIsolate(), v8Value, c
ppValue, UnionTypeConversionMode::kNotNullable, exceptionState); | 1908 V8DoubleOrStringOrDoubleOrStringSequence::toImpl(info.GetIsolate(), v8Value, c
ppValue, UnionTypeConversionMode::kNotNullable, exceptionState); |
1787 if (exceptionState.HadException()) | 1909 if (exceptionState.HadException()) |
1788 return; | 1910 return; |
1789 | 1911 |
1790 impl->setNestedUnionAtribute(cppValue); | 1912 impl->setNestedUnionAtribute(cppValue); |
1791 } | 1913 } |
1792 | 1914 |
1793 static void activityLoggingAccessForAllWorldsLongAttributeAttributeGetter(const
v8::FunctionCallbackInfo<v8::Value>& info) { | 1915 static void activityLoggingAccessForAllWorldsLongAttributeAttributeGetter(const
v8::FunctionCallbackInfo<v8::Value>& info) { |
1794 v8::Local<v8::Object> holder = info.Holder(); | 1916 v8::Local<v8::Object> holder = info.Holder(); |
1795 | 1917 |
1796 TestObject* impl = V8TestObject::toImpl(holder); | 1918 TestObject* impl = V8TestObject::toImpl(holder); |
1797 | 1919 |
1798 V8SetReturnValueInt(info, impl->activityLoggingAccessForAllWorldsLongAttribute
()); | 1920 V8SetReturnValueInt(info, impl->activityLoggingAccessForAllWorldsLongAttribute
()); |
1799 } | 1921 } |
1800 | 1922 |
1801 static void activityLoggingAccessForAllWorldsLongAttributeAttributeSetter(v8::Lo
cal<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { | 1923 static void activityLoggingAccessForAllWorldsLongAttributeAttributeSetter(v8::Lo
cal<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { |
1802 v8::Isolate* isolate = info.GetIsolate(); | 1924 v8::Isolate* isolate = info.GetIsolate(); |
1803 ALLOW_UNUSED_LOCAL(isolate); | 1925 ALLOW_UNUSED_LOCAL(isolate); |
1804 | 1926 |
1805 v8::Local<v8::Object> holder = info.Holder(); | 1927 v8::Local<v8::Object> holder = info.Holder(); |
| 1928 ALLOW_UNUSED_LOCAL(holder); |
| 1929 |
1806 TestObject* impl = V8TestObject::toImpl(holder); | 1930 TestObject* impl = V8TestObject::toImpl(holder); |
1807 | 1931 |
1808 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "activityLoggingAccessForAllWorldsLongAttribute"); | 1932 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "activityLoggingAccessForAllWorldsLongAttribute"); |
1809 | 1933 |
1810 // Prepare the value to be set. | 1934 // Prepare the value to be set. |
1811 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); | 1935 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); |
1812 if (exceptionState.HadException()) | 1936 if (exceptionState.HadException()) |
1813 return; | 1937 return; |
1814 | 1938 |
1815 impl->setActivityLoggingAccessForAllWorldsLongAttribute(cppValue); | 1939 impl->setActivityLoggingAccessForAllWorldsLongAttribute(cppValue); |
1816 } | 1940 } |
1817 | 1941 |
1818 static void activityLoggingGetterForAllWorldsLongAttributeAttributeGetter(const
v8::FunctionCallbackInfo<v8::Value>& info) { | 1942 static void activityLoggingGetterForAllWorldsLongAttributeAttributeGetter(const
v8::FunctionCallbackInfo<v8::Value>& info) { |
1819 v8::Local<v8::Object> holder = info.Holder(); | 1943 v8::Local<v8::Object> holder = info.Holder(); |
1820 | 1944 |
1821 TestObject* impl = V8TestObject::toImpl(holder); | 1945 TestObject* impl = V8TestObject::toImpl(holder); |
1822 | 1946 |
1823 V8SetReturnValueInt(info, impl->activityLoggingGetterForAllWorldsLongAttribute
()); | 1947 V8SetReturnValueInt(info, impl->activityLoggingGetterForAllWorldsLongAttribute
()); |
1824 } | 1948 } |
1825 | 1949 |
1826 static void activityLoggingGetterForAllWorldsLongAttributeAttributeSetter(v8::Lo
cal<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { | 1950 static void activityLoggingGetterForAllWorldsLongAttributeAttributeSetter(v8::Lo
cal<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { |
1827 v8::Isolate* isolate = info.GetIsolate(); | 1951 v8::Isolate* isolate = info.GetIsolate(); |
1828 ALLOW_UNUSED_LOCAL(isolate); | 1952 ALLOW_UNUSED_LOCAL(isolate); |
1829 | 1953 |
1830 v8::Local<v8::Object> holder = info.Holder(); | 1954 v8::Local<v8::Object> holder = info.Holder(); |
| 1955 ALLOW_UNUSED_LOCAL(holder); |
| 1956 |
1831 TestObject* impl = V8TestObject::toImpl(holder); | 1957 TestObject* impl = V8TestObject::toImpl(holder); |
1832 | 1958 |
1833 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "activityLoggingGetterForAllWorldsLongAttribute"); | 1959 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "activityLoggingGetterForAllWorldsLongAttribute"); |
1834 | 1960 |
1835 // Prepare the value to be set. | 1961 // Prepare the value to be set. |
1836 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); | 1962 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); |
1837 if (exceptionState.HadException()) | 1963 if (exceptionState.HadException()) |
1838 return; | 1964 return; |
1839 | 1965 |
1840 impl->setActivityLoggingGetterForAllWorldsLongAttribute(cppValue); | 1966 impl->setActivityLoggingGetterForAllWorldsLongAttribute(cppValue); |
1841 } | 1967 } |
1842 | 1968 |
1843 static void activityLoggingSetterForAllWorldsLongAttributeAttributeGetter(const
v8::FunctionCallbackInfo<v8::Value>& info) { | 1969 static void activityLoggingSetterForAllWorldsLongAttributeAttributeGetter(const
v8::FunctionCallbackInfo<v8::Value>& info) { |
1844 v8::Local<v8::Object> holder = info.Holder(); | 1970 v8::Local<v8::Object> holder = info.Holder(); |
1845 | 1971 |
1846 TestObject* impl = V8TestObject::toImpl(holder); | 1972 TestObject* impl = V8TestObject::toImpl(holder); |
1847 | 1973 |
1848 V8SetReturnValueInt(info, impl->activityLoggingSetterForAllWorldsLongAttribute
()); | 1974 V8SetReturnValueInt(info, impl->activityLoggingSetterForAllWorldsLongAttribute
()); |
1849 } | 1975 } |
1850 | 1976 |
1851 static void activityLoggingSetterForAllWorldsLongAttributeAttributeSetter(v8::Lo
cal<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { | 1977 static void activityLoggingSetterForAllWorldsLongAttributeAttributeSetter(v8::Lo
cal<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { |
1852 v8::Isolate* isolate = info.GetIsolate(); | 1978 v8::Isolate* isolate = info.GetIsolate(); |
1853 ALLOW_UNUSED_LOCAL(isolate); | 1979 ALLOW_UNUSED_LOCAL(isolate); |
1854 | 1980 |
1855 v8::Local<v8::Object> holder = info.Holder(); | 1981 v8::Local<v8::Object> holder = info.Holder(); |
| 1982 ALLOW_UNUSED_LOCAL(holder); |
| 1983 |
1856 TestObject* impl = V8TestObject::toImpl(holder); | 1984 TestObject* impl = V8TestObject::toImpl(holder); |
1857 | 1985 |
1858 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "activityLoggingSetterForAllWorldsLongAttribute"); | 1986 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "activityLoggingSetterForAllWorldsLongAttribute"); |
1859 | 1987 |
1860 // Prepare the value to be set. | 1988 // Prepare the value to be set. |
1861 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); | 1989 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); |
1862 if (exceptionState.HadException()) | 1990 if (exceptionState.HadException()) |
1863 return; | 1991 return; |
1864 | 1992 |
1865 impl->setActivityLoggingSetterForAllWorldsLongAttribute(cppValue); | 1993 impl->setActivityLoggingSetterForAllWorldsLongAttribute(cppValue); |
(...skipping 23 matching lines...) Expand all Loading... |
1889 propertySymbol.Set(holder, v8Value); | 2017 propertySymbol.Set(holder, v8Value); |
1890 | 2018 |
1891 V8SetReturnValue(info, v8Value); | 2019 V8SetReturnValue(info, v8Value); |
1892 } | 2020 } |
1893 | 2021 |
1894 static void cachedAttributeAnyAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::FunctionCallbackInfo<v8::Value>& info) { | 2022 static void cachedAttributeAnyAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::FunctionCallbackInfo<v8::Value>& info) { |
1895 v8::Isolate* isolate = info.GetIsolate(); | 2023 v8::Isolate* isolate = info.GetIsolate(); |
1896 ALLOW_UNUSED_LOCAL(isolate); | 2024 ALLOW_UNUSED_LOCAL(isolate); |
1897 | 2025 |
1898 v8::Local<v8::Object> holder = info.Holder(); | 2026 v8::Local<v8::Object> holder = info.Holder(); |
| 2027 ALLOW_UNUSED_LOCAL(holder); |
| 2028 |
1899 TestObject* impl = V8TestObject::toImpl(holder); | 2029 TestObject* impl = V8TestObject::toImpl(holder); |
1900 | 2030 |
1901 // Prepare the value to be set. | 2031 // Prepare the value to be set. |
1902 ScriptValue cppValue = ScriptValue(ScriptState::Current(info.GetIsolate()), v8
Value); | 2032 ScriptValue cppValue = ScriptValue(ScriptState::Current(info.GetIsolate()), v8
Value); |
1903 | 2033 |
1904 impl->setCachedAttributeAnyAttribute(cppValue); | 2034 impl->setCachedAttributeAnyAttribute(cppValue); |
1905 | 2035 |
1906 // [CachedAttribute] | 2036 // [CachedAttribute] |
1907 // Invalidate the cached value. | 2037 // Invalidate the cached value. |
1908 V8PrivateProperty::GetSymbol( | 2038 V8PrivateProperty::GetSymbol( |
(...skipping 25 matching lines...) Expand all Loading... |
1934 propertySymbol.Set(holder, v8Value); | 2064 propertySymbol.Set(holder, v8Value); |
1935 | 2065 |
1936 V8SetReturnValue(info, v8Value); | 2066 V8SetReturnValue(info, v8Value); |
1937 } | 2067 } |
1938 | 2068 |
1939 static void cachedArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::FunctionCallbackInfo<v8::Value>& info) { | 2069 static void cachedArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::FunctionCallbackInfo<v8::Value>& info) { |
1940 v8::Isolate* isolate = info.GetIsolate(); | 2070 v8::Isolate* isolate = info.GetIsolate(); |
1941 ALLOW_UNUSED_LOCAL(isolate); | 2071 ALLOW_UNUSED_LOCAL(isolate); |
1942 | 2072 |
1943 v8::Local<v8::Object> holder = info.Holder(); | 2073 v8::Local<v8::Object> holder = info.Holder(); |
| 2074 ALLOW_UNUSED_LOCAL(holder); |
| 2075 |
1944 TestObject* impl = V8TestObject::toImpl(holder); | 2076 TestObject* impl = V8TestObject::toImpl(holder); |
1945 | 2077 |
1946 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "cachedArrayAttribute"); | 2078 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "cachedArrayAttribute"); |
1947 | 2079 |
1948 // Prepare the value to be set. | 2080 // Prepare the value to be set. |
1949 Vector<String> cppValue = NativeValueTraits<IDLSequence<IDLString>>::NativeVal
ue(info.GetIsolate(), v8Value, exceptionState); | 2081 Vector<String> cppValue = NativeValueTraits<IDLSequence<IDLString>>::NativeVal
ue(info.GetIsolate(), v8Value, exceptionState); |
1950 if (exceptionState.HadException()) | 2082 if (exceptionState.HadException()) |
1951 return; | 2083 return; |
1952 | 2084 |
1953 impl->setCachedArrayAttribute(cppValue); | 2085 impl->setCachedArrayAttribute(cppValue); |
(...skipping 29 matching lines...) Expand all Loading... |
1983 propertySymbol.Set(holder, v8Value); | 2115 propertySymbol.Set(holder, v8Value); |
1984 | 2116 |
1985 V8SetReturnValue(info, v8Value); | 2117 V8SetReturnValue(info, v8Value); |
1986 } | 2118 } |
1987 | 2119 |
1988 static void cachedStringOrNoneAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::FunctionCallbackInfo<v8::Value>& info) { | 2120 static void cachedStringOrNoneAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::FunctionCallbackInfo<v8::Value>& info) { |
1989 v8::Isolate* isolate = info.GetIsolate(); | 2121 v8::Isolate* isolate = info.GetIsolate(); |
1990 ALLOW_UNUSED_LOCAL(isolate); | 2122 ALLOW_UNUSED_LOCAL(isolate); |
1991 | 2123 |
1992 v8::Local<v8::Object> holder = info.Holder(); | 2124 v8::Local<v8::Object> holder = info.Holder(); |
| 2125 ALLOW_UNUSED_LOCAL(holder); |
| 2126 |
1993 TestObject* impl = V8TestObject::toImpl(holder); | 2127 TestObject* impl = V8TestObject::toImpl(holder); |
1994 | 2128 |
1995 // Prepare the value to be set. | 2129 // Prepare the value to be set. |
1996 V8StringResource<kTreatNullAndUndefinedAsNullString> cppValue = v8Value; | 2130 V8StringResource<kTreatNullAndUndefinedAsNullString> cppValue = v8Value; |
1997 if (!cppValue.Prepare()) | 2131 if (!cppValue.Prepare()) |
1998 return; | 2132 return; |
1999 | 2133 |
2000 impl->setCachedStringOrNoneAttribute(cppValue); | 2134 impl->setCachedStringOrNoneAttribute(cppValue); |
2001 | 2135 |
2002 // [CachedAttribute] | 2136 // [CachedAttribute] |
(...skipping 11 matching lines...) Expand all Loading... |
2014 ExecutionContext* executionContext = CurrentExecutionContext(info.GetIsolate()
); | 2148 ExecutionContext* executionContext = CurrentExecutionContext(info.GetIsolate()
); |
2015 | 2149 |
2016 V8SetReturnValue(info, impl->callWithExecutionContextAnyAttribute(executionCon
text).V8Value()); | 2150 V8SetReturnValue(info, impl->callWithExecutionContextAnyAttribute(executionCon
text).V8Value()); |
2017 } | 2151 } |
2018 | 2152 |
2019 static void callWithExecutionContextAnyAttributeAttributeSetter(v8::Local<v8::Va
lue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { | 2153 static void callWithExecutionContextAnyAttributeAttributeSetter(v8::Local<v8::Va
lue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { |
2020 v8::Isolate* isolate = info.GetIsolate(); | 2154 v8::Isolate* isolate = info.GetIsolate(); |
2021 ALLOW_UNUSED_LOCAL(isolate); | 2155 ALLOW_UNUSED_LOCAL(isolate); |
2022 | 2156 |
2023 v8::Local<v8::Object> holder = info.Holder(); | 2157 v8::Local<v8::Object> holder = info.Holder(); |
| 2158 ALLOW_UNUSED_LOCAL(holder); |
| 2159 |
2024 TestObject* impl = V8TestObject::toImpl(holder); | 2160 TestObject* impl = V8TestObject::toImpl(holder); |
2025 | 2161 |
2026 // Prepare the value to be set. | 2162 // Prepare the value to be set. |
2027 ScriptValue cppValue = ScriptValue(ScriptState::Current(info.GetIsolate()), v8
Value); | 2163 ScriptValue cppValue = ScriptValue(ScriptState::Current(info.GetIsolate()), v8
Value); |
2028 | 2164 |
2029 ExecutionContext* executionContext = CurrentExecutionContext(isolate); | 2165 ExecutionContext* executionContext = CurrentExecutionContext(isolate); |
2030 | 2166 |
2031 impl->setCallWithExecutionContextAnyAttribute(executionContext, cppValue); | 2167 impl->setCallWithExecutionContextAnyAttribute(executionContext, cppValue); |
2032 } | 2168 } |
2033 | 2169 |
2034 static void callWithScriptStateAnyAttributeAttributeGetter(const v8::FunctionCal
lbackInfo<v8::Value>& info) { | 2170 static void callWithScriptStateAnyAttributeAttributeGetter(const v8::FunctionCal
lbackInfo<v8::Value>& info) { |
2035 v8::Local<v8::Object> holder = info.Holder(); | 2171 v8::Local<v8::Object> holder = info.Holder(); |
2036 | 2172 |
2037 TestObject* impl = V8TestObject::toImpl(holder); | 2173 TestObject* impl = V8TestObject::toImpl(holder); |
2038 | 2174 |
2039 ScriptState* scriptState = ScriptState::ForReceiverObject(info); | 2175 ScriptState* scriptState = ScriptState::ForReceiverObject(info); |
2040 | 2176 |
2041 V8SetReturnValue(info, impl->callWithScriptStateAnyAttribute(scriptState).V8Va
lue()); | 2177 V8SetReturnValue(info, impl->callWithScriptStateAnyAttribute(scriptState).V8Va
lue()); |
2042 } | 2178 } |
2043 | 2179 |
2044 static void callWithScriptStateAnyAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { | 2180 static void callWithScriptStateAnyAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { |
2045 v8::Isolate* isolate = info.GetIsolate(); | 2181 v8::Isolate* isolate = info.GetIsolate(); |
2046 ALLOW_UNUSED_LOCAL(isolate); | 2182 ALLOW_UNUSED_LOCAL(isolate); |
2047 | 2183 |
2048 v8::Local<v8::Object> holder = info.Holder(); | 2184 v8::Local<v8::Object> holder = info.Holder(); |
| 2185 ALLOW_UNUSED_LOCAL(holder); |
| 2186 |
2049 TestObject* impl = V8TestObject::toImpl(holder); | 2187 TestObject* impl = V8TestObject::toImpl(holder); |
2050 | 2188 |
2051 // Prepare the value to be set. | 2189 // Prepare the value to be set. |
2052 ScriptValue cppValue = ScriptValue(ScriptState::Current(info.GetIsolate()), v8
Value); | 2190 ScriptValue cppValue = ScriptValue(ScriptState::Current(info.GetIsolate()), v8
Value); |
2053 | 2191 |
2054 ScriptState* scriptState = ScriptState::ForReceiverObject(info); | 2192 ScriptState* scriptState = ScriptState::ForReceiverObject(info); |
2055 | 2193 |
2056 impl->setCallWithScriptStateAnyAttribute(scriptState, cppValue); | 2194 impl->setCallWithScriptStateAnyAttribute(scriptState, cppValue); |
2057 } | 2195 } |
2058 | 2196 |
2059 static void callWithExecutionContextAndScriptStateAnyAttributeAttributeGetter(co
nst v8::FunctionCallbackInfo<v8::Value>& info) { | 2197 static void callWithExecutionContextAndScriptStateAnyAttributeAttributeGetter(co
nst v8::FunctionCallbackInfo<v8::Value>& info) { |
2060 v8::Local<v8::Object> holder = info.Holder(); | 2198 v8::Local<v8::Object> holder = info.Holder(); |
2061 | 2199 |
2062 TestObject* impl = V8TestObject::toImpl(holder); | 2200 TestObject* impl = V8TestObject::toImpl(holder); |
2063 | 2201 |
2064 ExecutionContext* executionContext = CurrentExecutionContext(info.GetIsolate()
); | 2202 ExecutionContext* executionContext = CurrentExecutionContext(info.GetIsolate()
); |
2065 ScriptState* scriptState = ScriptState::ForReceiverObject(info); | 2203 ScriptState* scriptState = ScriptState::ForReceiverObject(info); |
2066 | 2204 |
2067 V8SetReturnValue(info, impl->callWithExecutionContextAndScriptStateAnyAttribut
e(scriptState, executionContext).V8Value()); | 2205 V8SetReturnValue(info, impl->callWithExecutionContextAndScriptStateAnyAttribut
e(scriptState, executionContext).V8Value()); |
2068 } | 2206 } |
2069 | 2207 |
2070 static void callWithExecutionContextAndScriptStateAnyAttributeAttributeSetter(v8
::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { | 2208 static void callWithExecutionContextAndScriptStateAnyAttributeAttributeSetter(v8
::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { |
2071 v8::Isolate* isolate = info.GetIsolate(); | 2209 v8::Isolate* isolate = info.GetIsolate(); |
2072 ALLOW_UNUSED_LOCAL(isolate); | 2210 ALLOW_UNUSED_LOCAL(isolate); |
2073 | 2211 |
2074 v8::Local<v8::Object> holder = info.Holder(); | 2212 v8::Local<v8::Object> holder = info.Holder(); |
| 2213 ALLOW_UNUSED_LOCAL(holder); |
| 2214 |
2075 TestObject* impl = V8TestObject::toImpl(holder); | 2215 TestObject* impl = V8TestObject::toImpl(holder); |
2076 | 2216 |
2077 // Prepare the value to be set. | 2217 // Prepare the value to be set. |
2078 ScriptValue cppValue = ScriptValue(ScriptState::Current(info.GetIsolate()), v8
Value); | 2218 ScriptValue cppValue = ScriptValue(ScriptState::Current(info.GetIsolate()), v8
Value); |
2079 | 2219 |
2080 ExecutionContext* executionContext = CurrentExecutionContext(isolate); | 2220 ExecutionContext* executionContext = CurrentExecutionContext(isolate); |
2081 | 2221 |
2082 ScriptState* scriptState = ScriptState::ForReceiverObject(info); | 2222 ScriptState* scriptState = ScriptState::ForReceiverObject(info); |
2083 | 2223 |
2084 impl->setCallWithExecutionContextAndScriptStateAnyAttribute(scriptState, execu
tionContext, cppValue); | 2224 impl->setCallWithExecutionContextAndScriptStateAnyAttribute(scriptState, execu
tionContext, cppValue); |
(...skipping 12 matching lines...) Expand all Loading... |
2097 } | 2237 } |
2098 | 2238 |
2099 V8SetReturnValue(info, ToV8(WTF::GetPtr(impl->checkSecurityForNodeReadonlyDocu
mentAttribute()), ToV8(impl->contentWindow(), v8::Local<v8::Object>(), info.GetI
solate()).As<v8::Object>(), info.GetIsolate())); | 2239 V8SetReturnValue(info, ToV8(WTF::GetPtr(impl->checkSecurityForNodeReadonlyDocu
mentAttribute()), ToV8(impl->contentWindow(), v8::Local<v8::Object>(), info.GetI
solate()).As<v8::Object>(), info.GetIsolate())); |
2100 } | 2240 } |
2101 | 2241 |
2102 static void customGetterLongAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::FunctionCallbackInfo<v8::Value>& info) { | 2242 static void customGetterLongAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::FunctionCallbackInfo<v8::Value>& info) { |
2103 v8::Isolate* isolate = info.GetIsolate(); | 2243 v8::Isolate* isolate = info.GetIsolate(); |
2104 ALLOW_UNUSED_LOCAL(isolate); | 2244 ALLOW_UNUSED_LOCAL(isolate); |
2105 | 2245 |
2106 v8::Local<v8::Object> holder = info.Holder(); | 2246 v8::Local<v8::Object> holder = info.Holder(); |
| 2247 ALLOW_UNUSED_LOCAL(holder); |
| 2248 |
2107 TestObject* impl = V8TestObject::toImpl(holder); | 2249 TestObject* impl = V8TestObject::toImpl(holder); |
2108 | 2250 |
2109 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "customGetterLongAttribute"); | 2251 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "customGetterLongAttribute"); |
2110 | 2252 |
2111 // Prepare the value to be set. | 2253 // Prepare the value to be set. |
2112 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); | 2254 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); |
2113 if (exceptionState.HadException()) | 2255 if (exceptionState.HadException()) |
2114 return; | 2256 return; |
2115 | 2257 |
2116 impl->setCustomGetterLongAttribute(cppValue); | 2258 impl->setCustomGetterLongAttribute(cppValue); |
(...skipping 13 matching lines...) Expand all Loading... |
2130 TestObject* impl = V8TestObject::toImpl(holder); | 2272 TestObject* impl = V8TestObject::toImpl(holder); |
2131 | 2273 |
2132 V8SetReturnValueInt(info, impl->deprecatedLongAttribute()); | 2274 V8SetReturnValueInt(info, impl->deprecatedLongAttribute()); |
2133 } | 2275 } |
2134 | 2276 |
2135 static void deprecatedLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) { | 2277 static void deprecatedLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) { |
2136 v8::Isolate* isolate = info.GetIsolate(); | 2278 v8::Isolate* isolate = info.GetIsolate(); |
2137 ALLOW_UNUSED_LOCAL(isolate); | 2279 ALLOW_UNUSED_LOCAL(isolate); |
2138 | 2280 |
2139 v8::Local<v8::Object> holder = info.Holder(); | 2281 v8::Local<v8::Object> holder = info.Holder(); |
| 2282 ALLOW_UNUSED_LOCAL(holder); |
| 2283 |
2140 TestObject* impl = V8TestObject::toImpl(holder); | 2284 TestObject* impl = V8TestObject::toImpl(holder); |
2141 | 2285 |
2142 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "deprecatedLongAttribute"); | 2286 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "deprecatedLongAttribute"); |
2143 | 2287 |
2144 // Prepare the value to be set. | 2288 // Prepare the value to be set. |
2145 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); | 2289 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); |
2146 if (exceptionState.HadException()) | 2290 if (exceptionState.HadException()) |
2147 return; | 2291 return; |
2148 | 2292 |
2149 impl->setDeprecatedLongAttribute(cppValue); | 2293 impl->setDeprecatedLongAttribute(cppValue); |
2150 } | 2294 } |
2151 | 2295 |
2152 static void enforceRangeLongAttributeAttributeGetter(const v8::FunctionCallbackI
nfo<v8::Value>& info) { | 2296 static void enforceRangeLongAttributeAttributeGetter(const v8::FunctionCallbackI
nfo<v8::Value>& info) { |
2153 v8::Local<v8::Object> holder = info.Holder(); | 2297 v8::Local<v8::Object> holder = info.Holder(); |
2154 | 2298 |
2155 TestObject* impl = V8TestObject::toImpl(holder); | 2299 TestObject* impl = V8TestObject::toImpl(holder); |
2156 | 2300 |
2157 V8SetReturnValueInt(info, impl->enforceRangeLongAttribute()); | 2301 V8SetReturnValueInt(info, impl->enforceRangeLongAttribute()); |
2158 } | 2302 } |
2159 | 2303 |
2160 static void enforceRangeLongAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::FunctionCallbackInfo<v8::Value>& info) { | 2304 static void enforceRangeLongAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::FunctionCallbackInfo<v8::Value>& info) { |
2161 v8::Isolate* isolate = info.GetIsolate(); | 2305 v8::Isolate* isolate = info.GetIsolate(); |
2162 ALLOW_UNUSED_LOCAL(isolate); | 2306 ALLOW_UNUSED_LOCAL(isolate); |
2163 | 2307 |
2164 v8::Local<v8::Object> holder = info.Holder(); | 2308 v8::Local<v8::Object> holder = info.Holder(); |
| 2309 ALLOW_UNUSED_LOCAL(holder); |
| 2310 |
2165 TestObject* impl = V8TestObject::toImpl(holder); | 2311 TestObject* impl = V8TestObject::toImpl(holder); |
2166 | 2312 |
2167 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "enforceRangeLongAttribute"); | 2313 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "enforceRangeLongAttribute"); |
2168 | 2314 |
2169 // Prepare the value to be set. | 2315 // Prepare the value to be set. |
2170 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kEnforceRange); | 2316 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kEnforceRange); |
2171 if (exceptionState.HadException()) | 2317 if (exceptionState.HadException()) |
2172 return; | 2318 return; |
2173 | 2319 |
2174 impl->setEnforceRangeLongAttribute(cppValue); | 2320 impl->setEnforceRangeLongAttribute(cppValue); |
2175 } | 2321 } |
2176 | 2322 |
2177 static void implementedAsLongAttributeAttributeGetter(const v8::FunctionCallback
Info<v8::Value>& info) { | 2323 static void implementedAsLongAttributeAttributeGetter(const v8::FunctionCallback
Info<v8::Value>& info) { |
2178 v8::Local<v8::Object> holder = info.Holder(); | 2324 v8::Local<v8::Object> holder = info.Holder(); |
2179 | 2325 |
2180 TestObject* impl = V8TestObject::toImpl(holder); | 2326 TestObject* impl = V8TestObject::toImpl(holder); |
2181 | 2327 |
2182 V8SetReturnValueInt(info, impl->implementedAsName()); | 2328 V8SetReturnValueInt(info, impl->implementedAsName()); |
2183 } | 2329 } |
2184 | 2330 |
2185 static void implementedAsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::FunctionCallbackInfo<v8::Value>& info) { | 2331 static void implementedAsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::FunctionCallbackInfo<v8::Value>& info) { |
2186 v8::Isolate* isolate = info.GetIsolate(); | 2332 v8::Isolate* isolate = info.GetIsolate(); |
2187 ALLOW_UNUSED_LOCAL(isolate); | 2333 ALLOW_UNUSED_LOCAL(isolate); |
2188 | 2334 |
2189 v8::Local<v8::Object> holder = info.Holder(); | 2335 v8::Local<v8::Object> holder = info.Holder(); |
| 2336 ALLOW_UNUSED_LOCAL(holder); |
| 2337 |
2190 TestObject* impl = V8TestObject::toImpl(holder); | 2338 TestObject* impl = V8TestObject::toImpl(holder); |
2191 | 2339 |
2192 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "implementedAsLongAttribute"); | 2340 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "implementedAsLongAttribute"); |
2193 | 2341 |
2194 // Prepare the value to be set. | 2342 // Prepare the value to be set. |
2195 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); | 2343 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); |
2196 if (exceptionState.HadException()) | 2344 if (exceptionState.HadException()) |
2197 return; | 2345 return; |
2198 | 2346 |
2199 impl->setImplementedAsName(cppValue); | 2347 impl->setImplementedAsName(cppValue); |
2200 } | 2348 } |
2201 | 2349 |
2202 static void customGetterImplementedAsLongAttributeAttributeSetter(v8::Local<v8::
Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { | 2350 static void customGetterImplementedAsLongAttributeAttributeSetter(v8::Local<v8::
Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { |
2203 v8::Isolate* isolate = info.GetIsolate(); | 2351 v8::Isolate* isolate = info.GetIsolate(); |
2204 ALLOW_UNUSED_LOCAL(isolate); | 2352 ALLOW_UNUSED_LOCAL(isolate); |
2205 | 2353 |
2206 v8::Local<v8::Object> holder = info.Holder(); | 2354 v8::Local<v8::Object> holder = info.Holder(); |
| 2355 ALLOW_UNUSED_LOCAL(holder); |
| 2356 |
2207 TestObject* impl = V8TestObject::toImpl(holder); | 2357 TestObject* impl = V8TestObject::toImpl(holder); |
2208 | 2358 |
2209 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "customGetterImplementedAsLongAttribute"); | 2359 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "customGetterImplementedAsLongAttribute"); |
2210 | 2360 |
2211 // Prepare the value to be set. | 2361 // Prepare the value to be set. |
2212 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); | 2362 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); |
2213 if (exceptionState.HadException()) | 2363 if (exceptionState.HadException()) |
2214 return; | 2364 return; |
2215 | 2365 |
2216 impl->setImplementedAsNameWithCustomGetter(cppValue); | 2366 impl->setImplementedAsNameWithCustomGetter(cppValue); |
(...skipping 13 matching lines...) Expand all Loading... |
2230 TestObject* impl = V8TestObject::toImpl(holder); | 2380 TestObject* impl = V8TestObject::toImpl(holder); |
2231 | 2381 |
2232 V8SetReturnValueInt(info, impl->measureAsLongAttribute()); | 2382 V8SetReturnValueInt(info, impl->measureAsLongAttribute()); |
2233 } | 2383 } |
2234 | 2384 |
2235 static void measureAsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) { | 2385 static void measureAsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) { |
2236 v8::Isolate* isolate = info.GetIsolate(); | 2386 v8::Isolate* isolate = info.GetIsolate(); |
2237 ALLOW_UNUSED_LOCAL(isolate); | 2387 ALLOW_UNUSED_LOCAL(isolate); |
2238 | 2388 |
2239 v8::Local<v8::Object> holder = info.Holder(); | 2389 v8::Local<v8::Object> holder = info.Holder(); |
| 2390 ALLOW_UNUSED_LOCAL(holder); |
| 2391 |
2240 TestObject* impl = V8TestObject::toImpl(holder); | 2392 TestObject* impl = V8TestObject::toImpl(holder); |
2241 | 2393 |
2242 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "measureAsLongAttribute"); | 2394 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "measureAsLongAttribute"); |
2243 | 2395 |
2244 // Prepare the value to be set. | 2396 // Prepare the value to be set. |
2245 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); | 2397 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); |
2246 if (exceptionState.HadException()) | 2398 if (exceptionState.HadException()) |
2247 return; | 2399 return; |
2248 | 2400 |
2249 impl->setMeasureAsLongAttribute(cppValue); | 2401 impl->setMeasureAsLongAttribute(cppValue); |
2250 } | 2402 } |
2251 | 2403 |
2252 static void notEnumerableLongAttributeAttributeGetter(const v8::FunctionCallback
Info<v8::Value>& info) { | 2404 static void notEnumerableLongAttributeAttributeGetter(const v8::FunctionCallback
Info<v8::Value>& info) { |
2253 v8::Local<v8::Object> holder = info.Holder(); | 2405 v8::Local<v8::Object> holder = info.Holder(); |
2254 | 2406 |
2255 TestObject* impl = V8TestObject::toImpl(holder); | 2407 TestObject* impl = V8TestObject::toImpl(holder); |
2256 | 2408 |
2257 V8SetReturnValueInt(info, impl->notEnumerableLongAttribute()); | 2409 V8SetReturnValueInt(info, impl->notEnumerableLongAttribute()); |
2258 } | 2410 } |
2259 | 2411 |
2260 static void notEnumerableLongAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::FunctionCallbackInfo<v8::Value>& info) { | 2412 static void notEnumerableLongAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::FunctionCallbackInfo<v8::Value>& info) { |
2261 v8::Isolate* isolate = info.GetIsolate(); | 2413 v8::Isolate* isolate = info.GetIsolate(); |
2262 ALLOW_UNUSED_LOCAL(isolate); | 2414 ALLOW_UNUSED_LOCAL(isolate); |
2263 | 2415 |
2264 v8::Local<v8::Object> holder = info.Holder(); | 2416 v8::Local<v8::Object> holder = info.Holder(); |
| 2417 ALLOW_UNUSED_LOCAL(holder); |
| 2418 |
2265 TestObject* impl = V8TestObject::toImpl(holder); | 2419 TestObject* impl = V8TestObject::toImpl(holder); |
2266 | 2420 |
2267 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "notEnumerableLongAttribute"); | 2421 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "notEnumerableLongAttribute"); |
2268 | 2422 |
2269 // Prepare the value to be set. | 2423 // Prepare the value to be set. |
2270 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); | 2424 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); |
2271 if (exceptionState.HadException()) | 2425 if (exceptionState.HadException()) |
2272 return; | 2426 return; |
2273 | 2427 |
2274 impl->setNotEnumerableLongAttribute(cppValue); | 2428 impl->setNotEnumerableLongAttribute(cppValue); |
2275 } | 2429 } |
2276 | 2430 |
2277 static void originTrialEnabledLongAttributeAttributeGetter(const v8::FunctionCal
lbackInfo<v8::Value>& info) { | 2431 static void originTrialEnabledLongAttributeAttributeGetter(const v8::FunctionCal
lbackInfo<v8::Value>& info) { |
2278 v8::Local<v8::Object> holder = info.Holder(); | 2432 v8::Local<v8::Object> holder = info.Holder(); |
2279 | 2433 |
2280 TestObject* impl = V8TestObject::toImpl(holder); | 2434 TestObject* impl = V8TestObject::toImpl(holder); |
2281 | 2435 |
2282 V8SetReturnValueInt(info, impl->originTrialEnabledLongAttribute()); | 2436 V8SetReturnValueInt(info, impl->originTrialEnabledLongAttribute()); |
2283 } | 2437 } |
2284 | 2438 |
2285 static void originTrialEnabledLongAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { | 2439 static void originTrialEnabledLongAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { |
2286 v8::Isolate* isolate = info.GetIsolate(); | 2440 v8::Isolate* isolate = info.GetIsolate(); |
2287 ALLOW_UNUSED_LOCAL(isolate); | 2441 ALLOW_UNUSED_LOCAL(isolate); |
2288 | 2442 |
2289 v8::Local<v8::Object> holder = info.Holder(); | 2443 v8::Local<v8::Object> holder = info.Holder(); |
| 2444 ALLOW_UNUSED_LOCAL(holder); |
| 2445 |
2290 TestObject* impl = V8TestObject::toImpl(holder); | 2446 TestObject* impl = V8TestObject::toImpl(holder); |
2291 | 2447 |
2292 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "originTrialEnabledLongAttribute"); | 2448 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "originTrialEnabledLongAttribute"); |
2293 | 2449 |
2294 // Prepare the value to be set. | 2450 // Prepare the value to be set. |
2295 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); | 2451 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); |
2296 if (exceptionState.HadException()) | 2452 if (exceptionState.HadException()) |
2297 return; | 2453 return; |
2298 | 2454 |
2299 impl->setOriginTrialEnabledLongAttribute(cppValue); | 2455 impl->setOriginTrialEnabledLongAttribute(cppValue); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2343 TestObject* impl = V8TestObject::toImpl(holder); | 2499 TestObject* impl = V8TestObject::toImpl(holder); |
2344 | 2500 |
2345 V8SetReturnValueInt(info, impl->activityLoggingAccessPerWorldBindingsLongAttri
bute()); | 2501 V8SetReturnValueInt(info, impl->activityLoggingAccessPerWorldBindingsLongAttri
bute()); |
2346 } | 2502 } |
2347 | 2503 |
2348 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetter(v8
::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { | 2504 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetter(v8
::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { |
2349 v8::Isolate* isolate = info.GetIsolate(); | 2505 v8::Isolate* isolate = info.GetIsolate(); |
2350 ALLOW_UNUSED_LOCAL(isolate); | 2506 ALLOW_UNUSED_LOCAL(isolate); |
2351 | 2507 |
2352 v8::Local<v8::Object> holder = info.Holder(); | 2508 v8::Local<v8::Object> holder = info.Holder(); |
| 2509 ALLOW_UNUSED_LOCAL(holder); |
| 2510 |
2353 TestObject* impl = V8TestObject::toImpl(holder); | 2511 TestObject* impl = V8TestObject::toImpl(holder); |
2354 | 2512 |
2355 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "activityLoggingAccessPerWorldBindingsLongAttribute"); | 2513 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "activityLoggingAccessPerWorldBindingsLongAttribute"); |
2356 | 2514 |
2357 // Prepare the value to be set. | 2515 // Prepare the value to be set. |
2358 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); | 2516 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); |
2359 if (exceptionState.HadException()) | 2517 if (exceptionState.HadException()) |
2360 return; | 2518 return; |
2361 | 2519 |
2362 impl->setActivityLoggingAccessPerWorldBindingsLongAttribute(cppValue); | 2520 impl->setActivityLoggingAccessPerWorldBindingsLongAttribute(cppValue); |
2363 } | 2521 } |
2364 | 2522 |
2365 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterFor
MainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) { | 2523 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterFor
MainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) { |
2366 v8::Local<v8::Object> holder = info.Holder(); | 2524 v8::Local<v8::Object> holder = info.Holder(); |
2367 | 2525 |
2368 TestObject* impl = V8TestObject::toImpl(holder); | 2526 TestObject* impl = V8TestObject::toImpl(holder); |
2369 | 2527 |
2370 V8SetReturnValueInt(info, impl->activityLoggingAccessPerWorldBindingsLongAttri
bute()); | 2528 V8SetReturnValueInt(info, impl->activityLoggingAccessPerWorldBindingsLongAttri
bute()); |
2371 } | 2529 } |
2372 | 2530 |
2373 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterFor
MainWorld(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value
>& info) { | 2531 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterFor
MainWorld(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value
>& info) { |
2374 v8::Isolate* isolate = info.GetIsolate(); | 2532 v8::Isolate* isolate = info.GetIsolate(); |
2375 ALLOW_UNUSED_LOCAL(isolate); | 2533 ALLOW_UNUSED_LOCAL(isolate); |
2376 | 2534 |
2377 v8::Local<v8::Object> holder = info.Holder(); | 2535 v8::Local<v8::Object> holder = info.Holder(); |
| 2536 ALLOW_UNUSED_LOCAL(holder); |
| 2537 |
2378 TestObject* impl = V8TestObject::toImpl(holder); | 2538 TestObject* impl = V8TestObject::toImpl(holder); |
2379 | 2539 |
2380 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "activityLoggingAccessPerWorldBindingsLongAttribute"); | 2540 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "activityLoggingAccessPerWorldBindingsLongAttribute"); |
2381 | 2541 |
2382 // Prepare the value to be set. | 2542 // Prepare the value to be set. |
2383 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); | 2543 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); |
2384 if (exceptionState.HadException()) | 2544 if (exceptionState.HadException()) |
2385 return; | 2545 return; |
2386 | 2546 |
2387 impl->setActivityLoggingAccessPerWorldBindingsLongAttribute(cppValue); | 2547 impl->setActivityLoggingAccessPerWorldBindingsLongAttribute(cppValue); |
2388 } | 2548 } |
2389 | 2549 |
2390 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) { | 2550 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) { |
2391 v8::Local<v8::Object> holder = info.Holder(); | 2551 v8::Local<v8::Object> holder = info.Holder(); |
2392 | 2552 |
2393 TestObject* impl = V8TestObject::toImpl(holder); | 2553 TestObject* impl = V8TestObject::toImpl(holder); |
2394 | 2554 |
2395 V8SetReturnValueInt(info, impl->activityLoggingAccessForIsolatedWorldsPerWorld
BindingsLongAttribute()); | 2555 V8SetReturnValueInt(info, impl->activityLoggingAccessForIsolatedWorldsPerWorld
BindingsLongAttribute()); |
2396 } | 2556 } |
2397 | 2557 |
2398 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::
Value>& info) { | 2558 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::
Value>& info) { |
2399 v8::Isolate* isolate = info.GetIsolate(); | 2559 v8::Isolate* isolate = info.GetIsolate(); |
2400 ALLOW_UNUSED_LOCAL(isolate); | 2560 ALLOW_UNUSED_LOCAL(isolate); |
2401 | 2561 |
2402 v8::Local<v8::Object> holder = info.Holder(); | 2562 v8::Local<v8::Object> holder = info.Holder(); |
| 2563 ALLOW_UNUSED_LOCAL(holder); |
| 2564 |
2403 TestObject* impl = V8TestObject::toImpl(holder); | 2565 TestObject* impl = V8TestObject::toImpl(holder); |
2404 | 2566 |
2405 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute"); | 2567 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute"); |
2406 | 2568 |
2407 // Prepare the value to be set. | 2569 // Prepare the value to be set. |
2408 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); | 2570 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); |
2409 if (exceptionState.HadException()) | 2571 if (exceptionState.HadException()) |
2410 return; | 2572 return; |
2411 | 2573 |
2412 impl->setActivityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute(c
ppValue); | 2574 impl->setActivityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute(c
ppValue); |
2413 } | 2575 } |
2414 | 2576 |
2415 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetterForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) { | 2577 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetterForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) { |
2416 v8::Local<v8::Object> holder = info.Holder(); | 2578 v8::Local<v8::Object> holder = info.Holder(); |
2417 | 2579 |
2418 TestObject* impl = V8TestObject::toImpl(holder); | 2580 TestObject* impl = V8TestObject::toImpl(holder); |
2419 | 2581 |
2420 V8SetReturnValueInt(info, impl->activityLoggingAccessForIsolatedWorldsPerWorld
BindingsLongAttribute()); | 2582 V8SetReturnValueInt(info, impl->activityLoggingAccessForIsolatedWorldsPerWorld
BindingsLongAttribute()); |
2421 } | 2583 } |
2422 | 2584 |
2423 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterForMainWorld(v8::Local<v8::Value> v8Value, const v8::FunctionCallb
ackInfo<v8::Value>& info) { | 2585 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterForMainWorld(v8::Local<v8::Value> v8Value, const v8::FunctionCallb
ackInfo<v8::Value>& info) { |
2424 v8::Isolate* isolate = info.GetIsolate(); | 2586 v8::Isolate* isolate = info.GetIsolate(); |
2425 ALLOW_UNUSED_LOCAL(isolate); | 2587 ALLOW_UNUSED_LOCAL(isolate); |
2426 | 2588 |
2427 v8::Local<v8::Object> holder = info.Holder(); | 2589 v8::Local<v8::Object> holder = info.Holder(); |
| 2590 ALLOW_UNUSED_LOCAL(holder); |
| 2591 |
2428 TestObject* impl = V8TestObject::toImpl(holder); | 2592 TestObject* impl = V8TestObject::toImpl(holder); |
2429 | 2593 |
2430 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute"); | 2594 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute"); |
2431 | 2595 |
2432 // Prepare the value to be set. | 2596 // Prepare the value to be set. |
2433 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); | 2597 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); |
2434 if (exceptionState.HadException()) | 2598 if (exceptionState.HadException()) |
2435 return; | 2599 return; |
2436 | 2600 |
2437 impl->setActivityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute(c
ppValue); | 2601 impl->setActivityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute(c
ppValue); |
2438 } | 2602 } |
2439 | 2603 |
2440 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetter(co
nst v8::FunctionCallbackInfo<v8::Value>& info) { | 2604 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetter(co
nst v8::FunctionCallbackInfo<v8::Value>& info) { |
2441 v8::Local<v8::Object> holder = info.Holder(); | 2605 v8::Local<v8::Object> holder = info.Holder(); |
2442 | 2606 |
2443 TestObject* impl = V8TestObject::toImpl(holder); | 2607 TestObject* impl = V8TestObject::toImpl(holder); |
2444 | 2608 |
2445 V8SetReturnValueInt(info, impl->activityLoggingGetterPerWorldBindingsLongAttri
bute()); | 2609 V8SetReturnValueInt(info, impl->activityLoggingGetterPerWorldBindingsLongAttri
bute()); |
2446 } | 2610 } |
2447 | 2611 |
2448 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetter(v8
::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { | 2612 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetter(v8
::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { |
2449 v8::Isolate* isolate = info.GetIsolate(); | 2613 v8::Isolate* isolate = info.GetIsolate(); |
2450 ALLOW_UNUSED_LOCAL(isolate); | 2614 ALLOW_UNUSED_LOCAL(isolate); |
2451 | 2615 |
2452 v8::Local<v8::Object> holder = info.Holder(); | 2616 v8::Local<v8::Object> holder = info.Holder(); |
| 2617 ALLOW_UNUSED_LOCAL(holder); |
| 2618 |
2453 TestObject* impl = V8TestObject::toImpl(holder); | 2619 TestObject* impl = V8TestObject::toImpl(holder); |
2454 | 2620 |
2455 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "activityLoggingGetterPerWorldBindingsLongAttribute"); | 2621 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "activityLoggingGetterPerWorldBindingsLongAttribute"); |
2456 | 2622 |
2457 // Prepare the value to be set. | 2623 // Prepare the value to be set. |
2458 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); | 2624 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); |
2459 if (exceptionState.HadException()) | 2625 if (exceptionState.HadException()) |
2460 return; | 2626 return; |
2461 | 2627 |
2462 impl->setActivityLoggingGetterPerWorldBindingsLongAttribute(cppValue); | 2628 impl->setActivityLoggingGetterPerWorldBindingsLongAttribute(cppValue); |
2463 } | 2629 } |
2464 | 2630 |
2465 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterFor
MainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) { | 2631 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterFor
MainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) { |
2466 v8::Local<v8::Object> holder = info.Holder(); | 2632 v8::Local<v8::Object> holder = info.Holder(); |
2467 | 2633 |
2468 TestObject* impl = V8TestObject::toImpl(holder); | 2634 TestObject* impl = V8TestObject::toImpl(holder); |
2469 | 2635 |
2470 V8SetReturnValueInt(info, impl->activityLoggingGetterPerWorldBindingsLongAttri
bute()); | 2636 V8SetReturnValueInt(info, impl->activityLoggingGetterPerWorldBindingsLongAttri
bute()); |
2471 } | 2637 } |
2472 | 2638 |
2473 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterFor
MainWorld(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value
>& info) { | 2639 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterFor
MainWorld(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value
>& info) { |
2474 v8::Isolate* isolate = info.GetIsolate(); | 2640 v8::Isolate* isolate = info.GetIsolate(); |
2475 ALLOW_UNUSED_LOCAL(isolate); | 2641 ALLOW_UNUSED_LOCAL(isolate); |
2476 | 2642 |
2477 v8::Local<v8::Object> holder = info.Holder(); | 2643 v8::Local<v8::Object> holder = info.Holder(); |
| 2644 ALLOW_UNUSED_LOCAL(holder); |
| 2645 |
2478 TestObject* impl = V8TestObject::toImpl(holder); | 2646 TestObject* impl = V8TestObject::toImpl(holder); |
2479 | 2647 |
2480 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "activityLoggingGetterPerWorldBindingsLongAttribute"); | 2648 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "activityLoggingGetterPerWorldBindingsLongAttribute"); |
2481 | 2649 |
2482 // Prepare the value to be set. | 2650 // Prepare the value to be set. |
2483 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); | 2651 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); |
2484 if (exceptionState.HadException()) | 2652 if (exceptionState.HadException()) |
2485 return; | 2653 return; |
2486 | 2654 |
2487 impl->setActivityLoggingGetterPerWorldBindingsLongAttribute(cppValue); | 2655 impl->setActivityLoggingGetterPerWorldBindingsLongAttribute(cppValue); |
2488 } | 2656 } |
2489 | 2657 |
2490 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) { | 2658 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) { |
2491 v8::Local<v8::Object> holder = info.Holder(); | 2659 v8::Local<v8::Object> holder = info.Holder(); |
2492 | 2660 |
2493 TestObject* impl = V8TestObject::toImpl(holder); | 2661 TestObject* impl = V8TestObject::toImpl(holder); |
2494 | 2662 |
2495 V8SetReturnValueInt(info, impl->activityLoggingGetterForIsolatedWorldsPerWorld
BindingsLongAttribute()); | 2663 V8SetReturnValueInt(info, impl->activityLoggingGetterForIsolatedWorldsPerWorld
BindingsLongAttribute()); |
2496 } | 2664 } |
2497 | 2665 |
2498 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::
Value>& info) { | 2666 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::
Value>& info) { |
2499 v8::Isolate* isolate = info.GetIsolate(); | 2667 v8::Isolate* isolate = info.GetIsolate(); |
2500 ALLOW_UNUSED_LOCAL(isolate); | 2668 ALLOW_UNUSED_LOCAL(isolate); |
2501 | 2669 |
2502 v8::Local<v8::Object> holder = info.Holder(); | 2670 v8::Local<v8::Object> holder = info.Holder(); |
| 2671 ALLOW_UNUSED_LOCAL(holder); |
| 2672 |
2503 TestObject* impl = V8TestObject::toImpl(holder); | 2673 TestObject* impl = V8TestObject::toImpl(holder); |
2504 | 2674 |
2505 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute"); | 2675 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute"); |
2506 | 2676 |
2507 // Prepare the value to be set. | 2677 // Prepare the value to be set. |
2508 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); | 2678 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); |
2509 if (exceptionState.HadException()) | 2679 if (exceptionState.HadException()) |
2510 return; | 2680 return; |
2511 | 2681 |
2512 impl->setActivityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute(c
ppValue); | 2682 impl->setActivityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute(c
ppValue); |
2513 } | 2683 } |
2514 | 2684 |
2515 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetterForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) { | 2685 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetterForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) { |
2516 v8::Local<v8::Object> holder = info.Holder(); | 2686 v8::Local<v8::Object> holder = info.Holder(); |
2517 | 2687 |
2518 TestObject* impl = V8TestObject::toImpl(holder); | 2688 TestObject* impl = V8TestObject::toImpl(holder); |
2519 | 2689 |
2520 V8SetReturnValueInt(info, impl->activityLoggingGetterForIsolatedWorldsPerWorld
BindingsLongAttribute()); | 2690 V8SetReturnValueInt(info, impl->activityLoggingGetterForIsolatedWorldsPerWorld
BindingsLongAttribute()); |
2521 } | 2691 } |
2522 | 2692 |
2523 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterForMainWorld(v8::Local<v8::Value> v8Value, const v8::FunctionCallb
ackInfo<v8::Value>& info) { | 2693 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterForMainWorld(v8::Local<v8::Value> v8Value, const v8::FunctionCallb
ackInfo<v8::Value>& info) { |
2524 v8::Isolate* isolate = info.GetIsolate(); | 2694 v8::Isolate* isolate = info.GetIsolate(); |
2525 ALLOW_UNUSED_LOCAL(isolate); | 2695 ALLOW_UNUSED_LOCAL(isolate); |
2526 | 2696 |
2527 v8::Local<v8::Object> holder = info.Holder(); | 2697 v8::Local<v8::Object> holder = info.Holder(); |
| 2698 ALLOW_UNUSED_LOCAL(holder); |
| 2699 |
2528 TestObject* impl = V8TestObject::toImpl(holder); | 2700 TestObject* impl = V8TestObject::toImpl(holder); |
2529 | 2701 |
2530 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute"); | 2702 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute"); |
2531 | 2703 |
2532 // Prepare the value to be set. | 2704 // Prepare the value to be set. |
2533 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); | 2705 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); |
2534 if (exceptionState.HadException()) | 2706 if (exceptionState.HadException()) |
2535 return; | 2707 return; |
2536 | 2708 |
2537 impl->setActivityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute(c
ppValue); | 2709 impl->setActivityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute(c
ppValue); |
2538 } | 2710 } |
2539 | 2711 |
2540 static void locationAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) { | 2712 static void locationAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) { |
2541 v8::Local<v8::Object> holder = info.Holder(); | 2713 v8::Local<v8::Object> holder = info.Holder(); |
2542 | 2714 |
2543 TestObject* impl = V8TestObject::toImpl(holder); | 2715 TestObject* impl = V8TestObject::toImpl(holder); |
2544 | 2716 |
2545 V8SetReturnValueFast(info, WTF::GetPtr(impl->location()), impl); | 2717 V8SetReturnValueFast(info, WTF::GetPtr(impl->location()), impl); |
2546 } | 2718 } |
2547 | 2719 |
2548 static void locationAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Func
tionCallbackInfo<v8::Value>& info) { | 2720 static void locationAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Func
tionCallbackInfo<v8::Value>& info) { |
2549 v8::Isolate* isolate = info.GetIsolate(); | 2721 v8::Isolate* isolate = info.GetIsolate(); |
2550 ALLOW_UNUSED_LOCAL(isolate); | 2722 ALLOW_UNUSED_LOCAL(isolate); |
2551 | 2723 |
2552 v8::Local<v8::Object> holder = info.Holder(); | 2724 v8::Local<v8::Object> holder = info.Holder(); |
2553 TestObject* proxyImpl = V8TestObject::toImpl(holder); | 2725 ALLOW_UNUSED_LOCAL(holder); |
2554 TestNode* impl = WTF::GetPtr(proxyImpl->location()); | 2726 |
2555 if (!impl) | 2727 // [PutForwards] => location.href |
| 2728 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "location"); |
| 2729 v8::Local<v8::Value> target; |
| 2730 if (!holder->Get(isolate->GetCurrentContext(), V8String(isolate, "location")).
ToLocal(&target)) |
2556 return; | 2731 return; |
2557 | 2732 if (!target->IsObject()) { |
2558 // Prepare the value to be set. | 2733 exceptionState.ThrowTypeError("The attribute value is not an object"); |
2559 V8StringResource<> cppValue = v8Value; | |
2560 if (!cppValue.Prepare()) | |
2561 return; | 2734 return; |
2562 | 2735 } |
2563 impl->setHref(cppValue); | 2736 bool result; |
| 2737 if (!target.As<v8::Object>()->Set(isolate->GetCurrentContext(), V8String(isola
te, "href"), v8Value).To(&result)) |
| 2738 return; |
| 2739 if (!result) |
| 2740 return; |
2564 } | 2741 } |
2565 | 2742 |
2566 static void locationWithExceptionAttributeGetter(const v8::FunctionCallbackInfo<
v8::Value>& info) { | 2743 static void locationWithExceptionAttributeGetter(const v8::FunctionCallbackInfo<
v8::Value>& info) { |
2567 v8::Local<v8::Object> holder = info.Holder(); | 2744 v8::Local<v8::Object> holder = info.Holder(); |
2568 | 2745 |
2569 TestObject* impl = V8TestObject::toImpl(holder); | 2746 TestObject* impl = V8TestObject::toImpl(holder); |
2570 | 2747 |
2571 V8SetReturnValueFast(info, WTF::GetPtr(impl->locationWithException()), impl); | 2748 V8SetReturnValueFast(info, WTF::GetPtr(impl->locationWithException()), impl); |
2572 } | 2749 } |
2573 | 2750 |
2574 static void locationWithExceptionAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::FunctionCallbackInfo<v8::Value>& info) { | 2751 static void locationWithExceptionAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::FunctionCallbackInfo<v8::Value>& info) { |
2575 v8::Isolate* isolate = info.GetIsolate(); | 2752 v8::Isolate* isolate = info.GetIsolate(); |
2576 ALLOW_UNUSED_LOCAL(isolate); | 2753 ALLOW_UNUSED_LOCAL(isolate); |
2577 | 2754 |
2578 v8::Local<v8::Object> holder = info.Holder(); | 2755 v8::Local<v8::Object> holder = info.Holder(); |
2579 TestObject* proxyImpl = V8TestObject::toImpl(holder); | 2756 ALLOW_UNUSED_LOCAL(holder); |
2580 TestNode* impl = WTF::GetPtr(proxyImpl->locationWithException()); | 2757 |
2581 if (!impl) | 2758 // [PutForwards] => locationWithException.hrefThrows |
| 2759 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "locationWithException"); |
| 2760 v8::Local<v8::Value> target; |
| 2761 if (!holder->Get(isolate->GetCurrentContext(), V8String(isolate, "locationWith
Exception")).ToLocal(&target)) |
2582 return; | 2762 return; |
2583 | 2763 if (!target->IsObject()) { |
2584 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "locationWithException"); | 2764 exceptionState.ThrowTypeError("The attribute value is not an object"); |
2585 | |
2586 // Prepare the value to be set. | |
2587 V8StringResource<> cppValue = v8Value; | |
2588 if (!cppValue.Prepare()) | |
2589 return; | 2765 return; |
2590 | 2766 } |
2591 impl->setHrefThrows(cppValue, exceptionState); | 2767 bool result; |
| 2768 if (!target.As<v8::Object>()->Set(isolate->GetCurrentContext(), V8String(isola
te, "hrefThrows"), v8Value).To(&result)) |
| 2769 return; |
| 2770 if (!result) |
| 2771 return; |
2592 } | 2772 } |
2593 | 2773 |
2594 static void locationWithCallWithAttributeGetter(const v8::FunctionCallbackInfo<v
8::Value>& info) { | 2774 static void locationWithCallWithAttributeGetter(const v8::FunctionCallbackInfo<v
8::Value>& info) { |
2595 v8::Local<v8::Object> holder = info.Holder(); | 2775 v8::Local<v8::Object> holder = info.Holder(); |
2596 | 2776 |
2597 TestObject* impl = V8TestObject::toImpl(holder); | 2777 TestObject* impl = V8TestObject::toImpl(holder); |
2598 | 2778 |
2599 V8SetReturnValueFast(info, WTF::GetPtr(impl->locationWithCallWith()), impl); | 2779 V8SetReturnValueFast(info, WTF::GetPtr(impl->locationWithCallWith()), impl); |
2600 } | 2780 } |
2601 | 2781 |
2602 static void locationWithCallWithAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::FunctionCallbackInfo<v8::Value>& info) { | 2782 static void locationWithCallWithAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::FunctionCallbackInfo<v8::Value>& info) { |
2603 v8::Isolate* isolate = info.GetIsolate(); | 2783 v8::Isolate* isolate = info.GetIsolate(); |
2604 ALLOW_UNUSED_LOCAL(isolate); | 2784 ALLOW_UNUSED_LOCAL(isolate); |
2605 | 2785 |
2606 v8::Local<v8::Object> holder = info.Holder(); | 2786 v8::Local<v8::Object> holder = info.Holder(); |
2607 TestObject* proxyImpl = V8TestObject::toImpl(holder); | 2787 ALLOW_UNUSED_LOCAL(holder); |
2608 TestNode* impl = WTF::GetPtr(proxyImpl->locationWithCallWith()); | 2788 |
2609 if (!impl) | 2789 // [PutForwards] => locationWithCallWith.hrefCallWith |
| 2790 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "locationWithCallWith"); |
| 2791 v8::Local<v8::Value> target; |
| 2792 if (!holder->Get(isolate->GetCurrentContext(), V8String(isolate, "locationWith
CallWith")).ToLocal(&target)) |
2610 return; | 2793 return; |
2611 | 2794 if (!target->IsObject()) { |
2612 // Prepare the value to be set. | 2795 exceptionState.ThrowTypeError("The attribute value is not an object"); |
2613 V8StringResource<> cppValue = v8Value; | |
2614 if (!cppValue.Prepare()) | |
2615 return; | 2796 return; |
2616 | 2797 } |
2617 ExecutionContext* executionContext = CurrentExecutionContext(isolate); | 2798 bool result; |
2618 | 2799 if (!target.As<v8::Object>()->Set(isolate->GetCurrentContext(), V8String(isola
te, "hrefCallWith"), v8Value).To(&result)) |
2619 impl->setHrefCallWith(executionContext, CurrentDOMWindow(info.GetIsolate()), E
nteredDOMWindow(info.GetIsolate()), cppValue); | 2800 return; |
| 2801 if (!result) |
| 2802 return; |
2620 } | 2803 } |
2621 | 2804 |
2622 static void locationByteStringAttributeGetter(const v8::FunctionCallbackInfo<v8:
:Value>& info) { | 2805 static void locationByteStringAttributeGetter(const v8::FunctionCallbackInfo<v8:
:Value>& info) { |
2623 v8::Local<v8::Object> holder = info.Holder(); | 2806 v8::Local<v8::Object> holder = info.Holder(); |
2624 | 2807 |
2625 TestObject* impl = V8TestObject::toImpl(holder); | 2808 TestObject* impl = V8TestObject::toImpl(holder); |
2626 | 2809 |
2627 V8SetReturnValueFast(info, WTF::GetPtr(impl->locationByteString()), impl); | 2810 V8SetReturnValueFast(info, WTF::GetPtr(impl->locationByteString()), impl); |
2628 } | 2811 } |
2629 | 2812 |
2630 static void locationByteStringAttributeSetter(v8::Local<v8::Value> v8Value, cons
t v8::FunctionCallbackInfo<v8::Value>& info) { | 2813 static void locationByteStringAttributeSetter(v8::Local<v8::Value> v8Value, cons
t v8::FunctionCallbackInfo<v8::Value>& info) { |
2631 v8::Isolate* isolate = info.GetIsolate(); | 2814 v8::Isolate* isolate = info.GetIsolate(); |
2632 ALLOW_UNUSED_LOCAL(isolate); | 2815 ALLOW_UNUSED_LOCAL(isolate); |
2633 | 2816 |
2634 v8::Local<v8::Object> holder = info.Holder(); | 2817 v8::Local<v8::Object> holder = info.Holder(); |
2635 TestObject* proxyImpl = V8TestObject::toImpl(holder); | 2818 ALLOW_UNUSED_LOCAL(holder); |
2636 TestNode* impl = WTF::GetPtr(proxyImpl->locationByteString()); | 2819 |
2637 if (!impl) | 2820 // [PutForwards] => locationByteString.hrefByteString |
| 2821 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "locationByteString"); |
| 2822 v8::Local<v8::Value> target; |
| 2823 if (!holder->Get(isolate->GetCurrentContext(), V8String(isolate, "locationByte
String")).ToLocal(&target)) |
2638 return; | 2824 return; |
2639 | 2825 if (!target->IsObject()) { |
2640 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "locationByteString"); | 2826 exceptionState.ThrowTypeError("The attribute value is not an object"); |
2641 | |
2642 // Prepare the value to be set. | |
2643 V8StringResource<> cppValue = NativeValueTraits<IDLByteString>::NativeValue(in
fo.GetIsolate(), v8Value, exceptionState); | |
2644 if (exceptionState.HadException()) | |
2645 return; | 2827 return; |
2646 | 2828 } |
2647 impl->setHrefByteString(cppValue); | 2829 bool result; |
| 2830 if (!target.As<v8::Object>()->Set(isolate->GetCurrentContext(), V8String(isola
te, "hrefByteString"), v8Value).To(&result)) |
| 2831 return; |
| 2832 if (!result) |
| 2833 return; |
2648 } | 2834 } |
2649 | 2835 |
2650 static void locationWithPerWorldBindingsAttributeGetter(const v8::FunctionCallba
ckInfo<v8::Value>& info) { | 2836 static void locationWithPerWorldBindingsAttributeGetter(const v8::FunctionCallba
ckInfo<v8::Value>& info) { |
2651 v8::Local<v8::Object> holder = info.Holder(); | 2837 v8::Local<v8::Object> holder = info.Holder(); |
2652 | 2838 |
2653 TestObject* impl = V8TestObject::toImpl(holder); | 2839 TestObject* impl = V8TestObject::toImpl(holder); |
2654 | 2840 |
2655 V8SetReturnValueFast(info, WTF::GetPtr(impl->locationWithPerWorldBindings()),
impl); | 2841 V8SetReturnValueFast(info, WTF::GetPtr(impl->locationWithPerWorldBindings()),
impl); |
2656 } | 2842 } |
2657 | 2843 |
2658 static void locationWithPerWorldBindingsAttributeSetter(v8::Local<v8::Value> v8V
alue, const v8::FunctionCallbackInfo<v8::Value>& info) { | 2844 static void locationWithPerWorldBindingsAttributeSetter(v8::Local<v8::Value> v8V
alue, const v8::FunctionCallbackInfo<v8::Value>& info) { |
2659 v8::Isolate* isolate = info.GetIsolate(); | 2845 v8::Isolate* isolate = info.GetIsolate(); |
2660 ALLOW_UNUSED_LOCAL(isolate); | 2846 ALLOW_UNUSED_LOCAL(isolate); |
2661 | 2847 |
2662 v8::Local<v8::Object> holder = info.Holder(); | 2848 v8::Local<v8::Object> holder = info.Holder(); |
2663 TestObject* proxyImpl = V8TestObject::toImpl(holder); | 2849 ALLOW_UNUSED_LOCAL(holder); |
2664 TestNode* impl = WTF::GetPtr(proxyImpl->locationWithPerWorldBindings()); | 2850 |
2665 if (!impl) | 2851 // [PutForwards] => locationWithPerWorldBindings.href |
| 2852 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "locationWithPerWorldBindings"); |
| 2853 v8::Local<v8::Value> target; |
| 2854 if (!holder->Get(isolate->GetCurrentContext(), V8String(isolate, "locationWith
PerWorldBindings")).ToLocal(&target)) |
2666 return; | 2855 return; |
2667 | 2856 if (!target->IsObject()) { |
2668 // Prepare the value to be set. | 2857 exceptionState.ThrowTypeError("The attribute value is not an object"); |
2669 V8StringResource<> cppValue = v8Value; | |
2670 if (!cppValue.Prepare()) | |
2671 return; | 2858 return; |
2672 | 2859 } |
2673 impl->setHref(cppValue); | 2860 bool result; |
| 2861 if (!target.As<v8::Object>()->Set(isolate->GetCurrentContext(), V8String(isola
te, "href"), v8Value).To(&result)) |
| 2862 return; |
| 2863 if (!result) |
| 2864 return; |
2674 } | 2865 } |
2675 | 2866 |
2676 static void locationWithPerWorldBindingsAttributeGetterForMainWorld(const v8::Fu
nctionCallbackInfo<v8::Value>& info) { | 2867 static void locationWithPerWorldBindingsAttributeGetterForMainWorld(const v8::Fu
nctionCallbackInfo<v8::Value>& info) { |
2677 v8::Local<v8::Object> holder = info.Holder(); | 2868 v8::Local<v8::Object> holder = info.Holder(); |
2678 | 2869 |
2679 TestObject* impl = V8TestObject::toImpl(holder); | 2870 TestObject* impl = V8TestObject::toImpl(holder); |
2680 | 2871 |
2681 V8SetReturnValueForMainWorld(info, WTF::GetPtr(impl->locationWithPerWorldBindi
ngs())); | 2872 V8SetReturnValueForMainWorld(info, WTF::GetPtr(impl->locationWithPerWorldBindi
ngs())); |
2682 } | 2873 } |
2683 | 2874 |
2684 static void locationWithPerWorldBindingsAttributeSetterForMainWorld(v8::Local<v8
::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { | 2875 static void locationWithPerWorldBindingsAttributeSetterForMainWorld(v8::Local<v8
::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { |
2685 v8::Isolate* isolate = info.GetIsolate(); | 2876 v8::Isolate* isolate = info.GetIsolate(); |
2686 ALLOW_UNUSED_LOCAL(isolate); | 2877 ALLOW_UNUSED_LOCAL(isolate); |
2687 | 2878 |
2688 v8::Local<v8::Object> holder = info.Holder(); | 2879 v8::Local<v8::Object> holder = info.Holder(); |
2689 TestObject* proxyImpl = V8TestObject::toImpl(holder); | 2880 ALLOW_UNUSED_LOCAL(holder); |
2690 TestNode* impl = WTF::GetPtr(proxyImpl->locationWithPerWorldBindings()); | 2881 |
2691 if (!impl) | 2882 // [PutForwards] => locationWithPerWorldBindings.href |
| 2883 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "locationWithPerWorldBindings"); |
| 2884 v8::Local<v8::Value> target; |
| 2885 if (!holder->Get(isolate->GetCurrentContext(), V8String(isolate, "locationWith
PerWorldBindings")).ToLocal(&target)) |
2692 return; | 2886 return; |
2693 | 2887 if (!target->IsObject()) { |
2694 // Prepare the value to be set. | 2888 exceptionState.ThrowTypeError("The attribute value is not an object"); |
2695 V8StringResource<> cppValue = v8Value; | |
2696 if (!cppValue.Prepare()) | |
2697 return; | 2889 return; |
2698 | 2890 } |
2699 impl->setHref(cppValue); | 2891 bool result; |
| 2892 if (!target.As<v8::Object>()->Set(isolate->GetCurrentContext(), V8String(isola
te, "href"), v8Value).To(&result)) |
| 2893 return; |
| 2894 if (!result) |
| 2895 return; |
2700 } | 2896 } |
2701 | 2897 |
2702 static void locationLegacyInterfaceTypeCheckingAttributeGetter(const v8::Functio
nCallbackInfo<v8::Value>& info) { | 2898 static void locationLegacyInterfaceTypeCheckingAttributeGetter(const v8::Functio
nCallbackInfo<v8::Value>& info) { |
2703 v8::Local<v8::Object> holder = info.Holder(); | 2899 v8::Local<v8::Object> holder = info.Holder(); |
2704 | 2900 |
2705 TestObject* impl = V8TestObject::toImpl(holder); | 2901 TestObject* impl = V8TestObject::toImpl(holder); |
2706 | 2902 |
2707 V8SetReturnValueFast(info, WTF::GetPtr(impl->locationLegacyInterfaceTypeChecki
ng()), impl); | 2903 V8SetReturnValueFast(info, WTF::GetPtr(impl->locationLegacyInterfaceTypeChecki
ng()), impl); |
2708 } | 2904 } |
2709 | 2905 |
2710 static void locationLegacyInterfaceTypeCheckingAttributeSetter(v8::Local<v8::Val
ue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { | 2906 static void locationLegacyInterfaceTypeCheckingAttributeSetter(v8::Local<v8::Val
ue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { |
2711 v8::Isolate* isolate = info.GetIsolate(); | 2907 v8::Isolate* isolate = info.GetIsolate(); |
2712 ALLOW_UNUSED_LOCAL(isolate); | 2908 ALLOW_UNUSED_LOCAL(isolate); |
2713 | 2909 |
2714 v8::Local<v8::Object> holder = info.Holder(); | 2910 v8::Local<v8::Object> holder = info.Holder(); |
2715 TestObject* proxyImpl = V8TestObject::toImpl(holder); | 2911 ALLOW_UNUSED_LOCAL(holder); |
2716 TestNode* impl = WTF::GetPtr(proxyImpl->locationLegacyInterfaceTypeChecking())
; | 2912 |
2717 if (!impl) | 2913 // [PutForwards] => locationLegacyInterfaceTypeChecking.href |
| 2914 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "locationLegacyInterfaceTypeChecking"); |
| 2915 v8::Local<v8::Value> target; |
| 2916 if (!holder->Get(isolate->GetCurrentContext(), V8String(isolate, "locationLega
cyInterfaceTypeChecking")).ToLocal(&target)) |
2718 return; | 2917 return; |
2719 | 2918 if (!target->IsObject()) { |
2720 // Prepare the value to be set. | 2919 exceptionState.ThrowTypeError("The attribute value is not an object"); |
2721 V8StringResource<> cppValue = v8Value; | |
2722 if (!cppValue.Prepare()) | |
2723 return; | 2920 return; |
2724 | 2921 } |
2725 impl->setHref(cppValue); | 2922 bool result; |
| 2923 if (!target.As<v8::Object>()->Set(isolate->GetCurrentContext(), V8String(isola
te, "href"), v8Value).To(&result)) |
| 2924 return; |
| 2925 if (!result) |
| 2926 return; |
2726 } | 2927 } |
2727 | 2928 |
2728 static void locationGarbageCollectedAttributeGetter(const v8::FunctionCallbackIn
fo<v8::Value>& info) { | 2929 static void locationGarbageCollectedAttributeGetter(const v8::FunctionCallbackIn
fo<v8::Value>& info) { |
2729 v8::Local<v8::Object> holder = info.Holder(); | 2930 v8::Local<v8::Object> holder = info.Holder(); |
2730 | 2931 |
2731 TestObject* impl = V8TestObject::toImpl(holder); | 2932 TestObject* impl = V8TestObject::toImpl(holder); |
2732 | 2933 |
2733 TestInterfaceGarbageCollected* cppValue(WTF::GetPtr(impl->locationGarbageColle
cted())); | 2934 TestInterfaceGarbageCollected* cppValue(WTF::GetPtr(impl->locationGarbageColle
cted())); |
2734 | 2935 |
2735 // Keep the wrapper object for the return value alive as long as |this| | 2936 // Keep the wrapper object for the return value alive as long as |this| |
2736 // object is alive in order to save creation time of the wrapper object. | 2937 // object is alive in order to save creation time of the wrapper object. |
2737 if (cppValue && DOMDataStore::SetReturnValue(info.GetReturnValue(), cppValue)) | 2938 if (cppValue && DOMDataStore::SetReturnValue(info.GetReturnValue(), cppValue)) |
2738 return; | 2939 return; |
2739 v8::Local<v8::Value> v8Value(ToV8(cppValue, holder, info.GetIsolate())); | 2940 v8::Local<v8::Value> v8Value(ToV8(cppValue, holder, info.GetIsolate())); |
2740 V8PrivateProperty::GetSymbol( | 2941 V8PrivateProperty::GetSymbol( |
2741 info.GetIsolate(), "KeepAlive#TestObject#locationGarbageCollected") | 2942 info.GetIsolate(), "KeepAlive#TestObject#locationGarbageCollected") |
2742 .Set(holder, v8Value); | 2943 .Set(holder, v8Value); |
2743 | 2944 |
2744 V8SetReturnValue(info, v8Value); | 2945 V8SetReturnValue(info, v8Value); |
2745 } | 2946 } |
2746 | 2947 |
2747 static void locationGarbageCollectedAttributeSetter(v8::Local<v8::Value> v8Value
, const v8::FunctionCallbackInfo<v8::Value>& info) { | 2948 static void locationGarbageCollectedAttributeSetter(v8::Local<v8::Value> v8Value
, const v8::FunctionCallbackInfo<v8::Value>& info) { |
2748 v8::Isolate* isolate = info.GetIsolate(); | 2949 v8::Isolate* isolate = info.GetIsolate(); |
2749 ALLOW_UNUSED_LOCAL(isolate); | 2950 ALLOW_UNUSED_LOCAL(isolate); |
2750 | 2951 |
2751 v8::Local<v8::Object> holder = info.Holder(); | 2952 v8::Local<v8::Object> holder = info.Holder(); |
2752 TestObject* proxyImpl = V8TestObject::toImpl(holder); | 2953 ALLOW_UNUSED_LOCAL(holder); |
2753 TestInterfaceGarbageCollected* impl = WTF::GetPtr(proxyImpl->locationGarbageCo
llected()); | 2954 |
2754 if (!impl) | 2955 // [PutForwards] => locationGarbageCollected.attr1 |
| 2956 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "locationGarbageCollected"); |
| 2957 v8::Local<v8::Value> target; |
| 2958 if (!holder->Get(isolate->GetCurrentContext(), V8String(isolate, "locationGarb
ageCollected")).ToLocal(&target)) |
2755 return; | 2959 return; |
2756 | 2960 if (!target->IsObject()) { |
2757 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "locationGarbageCollected"); | 2961 exceptionState.ThrowTypeError("The attribute value is not an object"); |
2758 | |
2759 // Prepare the value to be set. | |
2760 TestInterfaceGarbageCollected* cppValue = V8TestInterfaceGarbageCollected::toI
mplWithTypeCheck(info.GetIsolate(), v8Value); | |
2761 | |
2762 // Type check per: http://heycam.github.io/webidl/#es-interface | |
2763 if (!cppValue) { | |
2764 exceptionState.ThrowTypeError("The provided value is not of type 'TestInterf
aceGarbageCollected'."); | |
2765 return; | 2962 return; |
2766 } | 2963 } |
2767 | 2964 bool result; |
2768 impl->setAttr1(cppValue); | 2965 if (!target.As<v8::Object>()->Set(isolate->GetCurrentContext(), V8String(isola
te, "attr1"), v8Value).To(&result)) |
| 2966 return; |
| 2967 if (!result) |
| 2968 return; |
2769 } | 2969 } |
2770 | 2970 |
2771 static void raisesExceptionLongAttributeAttributeGetter(const v8::FunctionCallba
ckInfo<v8::Value>& info) { | 2971 static void raisesExceptionLongAttributeAttributeGetter(const v8::FunctionCallba
ckInfo<v8::Value>& info) { |
2772 v8::Local<v8::Object> holder = info.Holder(); | 2972 v8::Local<v8::Object> holder = info.Holder(); |
2773 | 2973 |
2774 TestObject* impl = V8TestObject::toImpl(holder); | 2974 TestObject* impl = V8TestObject::toImpl(holder); |
2775 | 2975 |
2776 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::kGetterContex
t, "TestObject", "raisesExceptionLongAttribute"); | 2976 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::kGetterContex
t, "TestObject", "raisesExceptionLongAttribute"); |
2777 | 2977 |
2778 int32_t cppValue(impl->raisesExceptionLongAttribute(exceptionState)); | 2978 int32_t cppValue(impl->raisesExceptionLongAttribute(exceptionState)); |
2779 | 2979 |
2780 if (UNLIKELY(exceptionState.HadException())) | 2980 if (UNLIKELY(exceptionState.HadException())) |
2781 return; | 2981 return; |
2782 | 2982 |
2783 V8SetReturnValueInt(info, cppValue); | 2983 V8SetReturnValueInt(info, cppValue); |
2784 } | 2984 } |
2785 | 2985 |
2786 static void raisesExceptionLongAttributeAttributeSetter(v8::Local<v8::Value> v8V
alue, const v8::FunctionCallbackInfo<v8::Value>& info) { | 2986 static void raisesExceptionLongAttributeAttributeSetter(v8::Local<v8::Value> v8V
alue, const v8::FunctionCallbackInfo<v8::Value>& info) { |
2787 v8::Isolate* isolate = info.GetIsolate(); | 2987 v8::Isolate* isolate = info.GetIsolate(); |
2788 ALLOW_UNUSED_LOCAL(isolate); | 2988 ALLOW_UNUSED_LOCAL(isolate); |
2789 | 2989 |
2790 v8::Local<v8::Object> holder = info.Holder(); | 2990 v8::Local<v8::Object> holder = info.Holder(); |
| 2991 ALLOW_UNUSED_LOCAL(holder); |
| 2992 |
2791 TestObject* impl = V8TestObject::toImpl(holder); | 2993 TestObject* impl = V8TestObject::toImpl(holder); |
2792 | 2994 |
2793 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "raisesExceptionLongAttribute"); | 2995 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "raisesExceptionLongAttribute"); |
2794 | 2996 |
2795 // Prepare the value to be set. | 2997 // Prepare the value to be set. |
2796 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); | 2998 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); |
2797 if (exceptionState.HadException()) | 2999 if (exceptionState.HadException()) |
2798 return; | 3000 return; |
2799 | 3001 |
2800 impl->setRaisesExceptionLongAttribute(cppValue, exceptionState); | 3002 impl->setRaisesExceptionLongAttribute(cppValue, exceptionState); |
(...skipping 12 matching lines...) Expand all Loading... |
2813 return; | 3015 return; |
2814 | 3016 |
2815 V8SetReturnValueInt(info, cppValue); | 3017 V8SetReturnValueInt(info, cppValue); |
2816 } | 3018 } |
2817 | 3019 |
2818 static void raisesExceptionGetterLongAttributeAttributeSetter(v8::Local<v8::Valu
e> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { | 3020 static void raisesExceptionGetterLongAttributeAttributeSetter(v8::Local<v8::Valu
e> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { |
2819 v8::Isolate* isolate = info.GetIsolate(); | 3021 v8::Isolate* isolate = info.GetIsolate(); |
2820 ALLOW_UNUSED_LOCAL(isolate); | 3022 ALLOW_UNUSED_LOCAL(isolate); |
2821 | 3023 |
2822 v8::Local<v8::Object> holder = info.Holder(); | 3024 v8::Local<v8::Object> holder = info.Holder(); |
| 3025 ALLOW_UNUSED_LOCAL(holder); |
| 3026 |
2823 TestObject* impl = V8TestObject::toImpl(holder); | 3027 TestObject* impl = V8TestObject::toImpl(holder); |
2824 | 3028 |
2825 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "raisesExceptionGetterLongAttribute"); | 3029 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "raisesExceptionGetterLongAttribute"); |
2826 | 3030 |
2827 // Prepare the value to be set. | 3031 // Prepare the value to be set. |
2828 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); | 3032 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); |
2829 if (exceptionState.HadException()) | 3033 if (exceptionState.HadException()) |
2830 return; | 3034 return; |
2831 | 3035 |
2832 impl->setRaisesExceptionGetterLongAttribute(cppValue); | 3036 impl->setRaisesExceptionGetterLongAttribute(cppValue); |
2833 } | 3037 } |
2834 | 3038 |
2835 static void setterRaisesExceptionLongAttributeAttributeGetter(const v8::Function
CallbackInfo<v8::Value>& info) { | 3039 static void setterRaisesExceptionLongAttributeAttributeGetter(const v8::Function
CallbackInfo<v8::Value>& info) { |
2836 v8::Local<v8::Object> holder = info.Holder(); | 3040 v8::Local<v8::Object> holder = info.Holder(); |
2837 | 3041 |
2838 TestObject* impl = V8TestObject::toImpl(holder); | 3042 TestObject* impl = V8TestObject::toImpl(holder); |
2839 | 3043 |
2840 V8SetReturnValueInt(info, impl->setterRaisesExceptionLongAttribute()); | 3044 V8SetReturnValueInt(info, impl->setterRaisesExceptionLongAttribute()); |
2841 } | 3045 } |
2842 | 3046 |
2843 static void setterRaisesExceptionLongAttributeAttributeSetter(v8::Local<v8::Valu
e> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { | 3047 static void setterRaisesExceptionLongAttributeAttributeSetter(v8::Local<v8::Valu
e> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { |
2844 v8::Isolate* isolate = info.GetIsolate(); | 3048 v8::Isolate* isolate = info.GetIsolate(); |
2845 ALLOW_UNUSED_LOCAL(isolate); | 3049 ALLOW_UNUSED_LOCAL(isolate); |
2846 | 3050 |
2847 v8::Local<v8::Object> holder = info.Holder(); | 3051 v8::Local<v8::Object> holder = info.Holder(); |
| 3052 ALLOW_UNUSED_LOCAL(holder); |
| 3053 |
2848 TestObject* impl = V8TestObject::toImpl(holder); | 3054 TestObject* impl = V8TestObject::toImpl(holder); |
2849 | 3055 |
2850 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "setterRaisesExceptionLongAttribute"); | 3056 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "setterRaisesExceptionLongAttribute"); |
2851 | 3057 |
2852 // Prepare the value to be set. | 3058 // Prepare the value to be set. |
2853 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); | 3059 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); |
2854 if (exceptionState.HadException()) | 3060 if (exceptionState.HadException()) |
2855 return; | 3061 return; |
2856 | 3062 |
2857 impl->setSetterRaisesExceptionLongAttribute(cppValue, exceptionState); | 3063 impl->setSetterRaisesExceptionLongAttribute(cppValue, exceptionState); |
(...skipping 12 matching lines...) Expand all Loading... |
2870 return; | 3076 return; |
2871 | 3077 |
2872 V8SetReturnValueFast(info, cppValue, impl); | 3078 V8SetReturnValueFast(info, cppValue, impl); |
2873 } | 3079 } |
2874 | 3080 |
2875 static void raisesExceptionTestInterfaceEmptyAttributeAttributeSetter(v8::Local<
v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { | 3081 static void raisesExceptionTestInterfaceEmptyAttributeAttributeSetter(v8::Local<
v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { |
2876 v8::Isolate* isolate = info.GetIsolate(); | 3082 v8::Isolate* isolate = info.GetIsolate(); |
2877 ALLOW_UNUSED_LOCAL(isolate); | 3083 ALLOW_UNUSED_LOCAL(isolate); |
2878 | 3084 |
2879 v8::Local<v8::Object> holder = info.Holder(); | 3085 v8::Local<v8::Object> holder = info.Holder(); |
| 3086 ALLOW_UNUSED_LOCAL(holder); |
| 3087 |
2880 TestObject* impl = V8TestObject::toImpl(holder); | 3088 TestObject* impl = V8TestObject::toImpl(holder); |
2881 | 3089 |
2882 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "raisesExceptionTestInterfaceEmptyAttribute"); | 3090 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "raisesExceptionTestInterfaceEmptyAttribute"); |
2883 | 3091 |
2884 // Prepare the value to be set. | 3092 // Prepare the value to be set. |
2885 TestInterfaceEmpty* cppValue = V8TestInterfaceEmpty::toImplWithTypeCheck(info.
GetIsolate(), v8Value); | 3093 TestInterfaceEmpty* cppValue = V8TestInterfaceEmpty::toImplWithTypeCheck(info.
GetIsolate(), v8Value); |
2886 | 3094 |
2887 // Type check per: http://heycam.github.io/webidl/#es-interface | 3095 // Type check per: http://heycam.github.io/webidl/#es-interface |
2888 if (!cppValue) { | 3096 if (!cppValue) { |
2889 exceptionState.ThrowTypeError("The provided value is not of type 'TestInterf
aceEmpty'."); | 3097 exceptionState.ThrowTypeError("The provided value is not of type 'TestInterf
aceEmpty'."); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2922 propertySymbol.Set(holder, v8Value); | 3130 propertySymbol.Set(holder, v8Value); |
2923 | 3131 |
2924 V8SetReturnValue(info, v8Value); | 3132 V8SetReturnValue(info, v8Value); |
2925 } | 3133 } |
2926 | 3134 |
2927 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetter(v8::
Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { | 3135 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetter(v8::
Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { |
2928 v8::Isolate* isolate = info.GetIsolate(); | 3136 v8::Isolate* isolate = info.GetIsolate(); |
2929 ALLOW_UNUSED_LOCAL(isolate); | 3137 ALLOW_UNUSED_LOCAL(isolate); |
2930 | 3138 |
2931 v8::Local<v8::Object> holder = info.Holder(); | 3139 v8::Local<v8::Object> holder = info.Holder(); |
| 3140 ALLOW_UNUSED_LOCAL(holder); |
| 3141 |
2932 TestObject* impl = V8TestObject::toImpl(holder); | 3142 TestObject* impl = V8TestObject::toImpl(holder); |
2933 | 3143 |
2934 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "cachedAttributeRaisesExceptionGetterAnyAttribute"); | 3144 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "cachedAttributeRaisesExceptionGetterAnyAttribute"); |
2935 | 3145 |
2936 // Prepare the value to be set. | 3146 // Prepare the value to be set. |
2937 ScriptValue cppValue = ScriptValue(ScriptState::Current(info.GetIsolate()), v8
Value); | 3147 ScriptValue cppValue = ScriptValue(ScriptState::Current(info.GetIsolate()), v8
Value); |
2938 | 3148 |
2939 impl->setCachedAttributeRaisesExceptionGetterAnyAttribute(cppValue, exceptionS
tate); | 3149 impl->setCachedAttributeRaisesExceptionGetterAnyAttribute(cppValue, exceptionS
tate); |
2940 | 3150 |
2941 // [CachedAttribute] | 3151 // [CachedAttribute] |
2942 // Invalidate the cached value. | 3152 // Invalidate the cached value. |
2943 V8PrivateProperty::GetSymbol( | 3153 V8PrivateProperty::GetSymbol( |
2944 isolate, "TestObject#Cachedattributeraisesexceptiongetteranyattribute") | 3154 isolate, "TestObject#Cachedattributeraisesexceptiongetteranyattribute") |
2945 .DeleteProperty(holder, v8::Undefined(isolate)); | 3155 .DeleteProperty(holder, v8::Undefined(isolate)); |
2946 } | 3156 } |
2947 | 3157 |
2948 static void reflectTestInterfaceAttributeAttributeGetter(const v8::FunctionCallb
ackInfo<v8::Value>& info) { | 3158 static void reflectTestInterfaceAttributeAttributeGetter(const v8::FunctionCallb
ackInfo<v8::Value>& info) { |
2949 v8::Local<v8::Object> holder = info.Holder(); | 3159 v8::Local<v8::Object> holder = info.Holder(); |
2950 | 3160 |
2951 TestObject* impl = V8TestObject::toImpl(holder); | 3161 TestObject* impl = V8TestObject::toImpl(holder); |
2952 | 3162 |
2953 V8SetReturnValueFast(info, impl->FastGetAttribute(HTMLNames::reflecttestinterf
aceattributeAttr), impl); | 3163 V8SetReturnValueFast(info, impl->FastGetAttribute(HTMLNames::reflecttestinterf
aceattributeAttr), impl); |
2954 } | 3164 } |
2955 | 3165 |
2956 static void reflectTestInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::FunctionCallbackInfo<v8::Value>& info) { | 3166 static void reflectTestInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::FunctionCallbackInfo<v8::Value>& info) { |
2957 v8::Isolate* isolate = info.GetIsolate(); | 3167 v8::Isolate* isolate = info.GetIsolate(); |
2958 ALLOW_UNUSED_LOCAL(isolate); | 3168 ALLOW_UNUSED_LOCAL(isolate); |
2959 | 3169 |
2960 v8::Local<v8::Object> holder = info.Holder(); | 3170 v8::Local<v8::Object> holder = info.Holder(); |
| 3171 ALLOW_UNUSED_LOCAL(holder); |
| 3172 |
2961 TestObject* impl = V8TestObject::toImpl(holder); | 3173 TestObject* impl = V8TestObject::toImpl(holder); |
2962 | 3174 |
2963 // Skip on compact node DOMString getters. | 3175 // Skip on compact node DOMString getters. |
2964 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3176 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
2965 | 3177 |
2966 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "reflectTestInterfaceAttribute"); | 3178 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "reflectTestInterfaceAttribute"); |
2967 | 3179 |
2968 // Prepare the value to be set. | 3180 // Prepare the value to be set. |
2969 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck(i
nfo.GetIsolate(), v8Value); | 3181 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck(i
nfo.GetIsolate(), v8Value); |
2970 | 3182 |
(...skipping 12 matching lines...) Expand all Loading... |
2983 TestObject* impl = V8TestObject::toImpl(holder); | 3195 TestObject* impl = V8TestObject::toImpl(holder); |
2984 | 3196 |
2985 V8SetReturnValueFast(info, impl->FastGetAttribute(HTMLNames::reflectedNameAttr
ibuteAttr), impl); | 3197 V8SetReturnValueFast(info, impl->FastGetAttribute(HTMLNames::reflectedNameAttr
ibuteAttr), impl); |
2986 } | 3198 } |
2987 | 3199 |
2988 static void reflectReflectedNameAttributeTestAttributeAttributeSetter(v8::Local<
v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { | 3200 static void reflectReflectedNameAttributeTestAttributeAttributeSetter(v8::Local<
v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { |
2989 v8::Isolate* isolate = info.GetIsolate(); | 3201 v8::Isolate* isolate = info.GetIsolate(); |
2990 ALLOW_UNUSED_LOCAL(isolate); | 3202 ALLOW_UNUSED_LOCAL(isolate); |
2991 | 3203 |
2992 v8::Local<v8::Object> holder = info.Holder(); | 3204 v8::Local<v8::Object> holder = info.Holder(); |
| 3205 ALLOW_UNUSED_LOCAL(holder); |
| 3206 |
2993 TestObject* impl = V8TestObject::toImpl(holder); | 3207 TestObject* impl = V8TestObject::toImpl(holder); |
2994 | 3208 |
2995 // Skip on compact node DOMString getters. | 3209 // Skip on compact node DOMString getters. |
2996 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3210 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
2997 | 3211 |
2998 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "reflectReflectedNameAttributeTestAttribute"); | 3212 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "reflectReflectedNameAttributeTestAttribute"); |
2999 | 3213 |
3000 // Prepare the value to be set. | 3214 // Prepare the value to be set. |
3001 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck(i
nfo.GetIsolate(), v8Value); | 3215 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck(i
nfo.GetIsolate(), v8Value); |
3002 | 3216 |
(...skipping 12 matching lines...) Expand all Loading... |
3015 TestObject* impl = V8TestObject::toImpl(holder); | 3229 TestObject* impl = V8TestObject::toImpl(holder); |
3016 | 3230 |
3017 V8SetReturnValueBool(info, impl->FastHasAttribute(HTMLNames::reflectbooleanatt
ributeAttr)); | 3231 V8SetReturnValueBool(info, impl->FastHasAttribute(HTMLNames::reflectbooleanatt
ributeAttr)); |
3018 } | 3232 } |
3019 | 3233 |
3020 static void reflectBooleanAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) { | 3234 static void reflectBooleanAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) { |
3021 v8::Isolate* isolate = info.GetIsolate(); | 3235 v8::Isolate* isolate = info.GetIsolate(); |
3022 ALLOW_UNUSED_LOCAL(isolate); | 3236 ALLOW_UNUSED_LOCAL(isolate); |
3023 | 3237 |
3024 v8::Local<v8::Object> holder = info.Holder(); | 3238 v8::Local<v8::Object> holder = info.Holder(); |
| 3239 ALLOW_UNUSED_LOCAL(holder); |
| 3240 |
3025 TestObject* impl = V8TestObject::toImpl(holder); | 3241 TestObject* impl = V8TestObject::toImpl(holder); |
3026 | 3242 |
3027 // Skip on compact node DOMString getters. | 3243 // Skip on compact node DOMString getters. |
3028 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3244 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
3029 | 3245 |
3030 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "reflectBooleanAttribute"); | 3246 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "reflectBooleanAttribute"); |
3031 | 3247 |
3032 // Prepare the value to be set. | 3248 // Prepare the value to be set. |
3033 bool cppValue = NativeValueTraits<IDLBoolean>::NativeValue(info.GetIsolate(),
v8Value, exceptionState); | 3249 bool cppValue = NativeValueTraits<IDLBoolean>::NativeValue(info.GetIsolate(),
v8Value, exceptionState); |
3034 if (exceptionState.HadException()) | 3250 if (exceptionState.HadException()) |
3035 return; | 3251 return; |
3036 | 3252 |
3037 impl->SetBooleanAttribute(HTMLNames::reflectbooleanattributeAttr, cppValue); | 3253 impl->SetBooleanAttribute(HTMLNames::reflectbooleanattributeAttr, cppValue); |
3038 } | 3254 } |
3039 | 3255 |
3040 static void reflectLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v
8::Value>& info) { | 3256 static void reflectLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v
8::Value>& info) { |
3041 v8::Local<v8::Object> holder = info.Holder(); | 3257 v8::Local<v8::Object> holder = info.Holder(); |
3042 | 3258 |
3043 TestObject* impl = V8TestObject::toImpl(holder); | 3259 TestObject* impl = V8TestObject::toImpl(holder); |
3044 | 3260 |
3045 V8SetReturnValueInt(info, impl->GetIntegralAttribute(HTMLNames::reflectlongatt
ributeAttr)); | 3261 V8SetReturnValueInt(info, impl->GetIntegralAttribute(HTMLNames::reflectlongatt
ributeAttr)); |
3046 } | 3262 } |
3047 | 3263 |
3048 static void reflectLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::FunctionCallbackInfo<v8::Value>& info) { | 3264 static void reflectLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::FunctionCallbackInfo<v8::Value>& info) { |
3049 v8::Isolate* isolate = info.GetIsolate(); | 3265 v8::Isolate* isolate = info.GetIsolate(); |
3050 ALLOW_UNUSED_LOCAL(isolate); | 3266 ALLOW_UNUSED_LOCAL(isolate); |
3051 | 3267 |
3052 v8::Local<v8::Object> holder = info.Holder(); | 3268 v8::Local<v8::Object> holder = info.Holder(); |
| 3269 ALLOW_UNUSED_LOCAL(holder); |
| 3270 |
3053 TestObject* impl = V8TestObject::toImpl(holder); | 3271 TestObject* impl = V8TestObject::toImpl(holder); |
3054 | 3272 |
3055 // Skip on compact node DOMString getters. | 3273 // Skip on compact node DOMString getters. |
3056 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3274 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
3057 | 3275 |
3058 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "reflectLongAttribute"); | 3276 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "reflectLongAttribute"); |
3059 | 3277 |
3060 // Prepare the value to be set. | 3278 // Prepare the value to be set. |
3061 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); | 3279 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); |
3062 if (exceptionState.HadException()) | 3280 if (exceptionState.HadException()) |
3063 return; | 3281 return; |
3064 | 3282 |
3065 impl->SetIntegralAttribute(HTMLNames::reflectlongattributeAttr, cppValue); | 3283 impl->SetIntegralAttribute(HTMLNames::reflectlongattributeAttr, cppValue); |
3066 } | 3284 } |
3067 | 3285 |
3068 static void reflectUnsignedShortAttributeAttributeGetter(const v8::FunctionCallb
ackInfo<v8::Value>& info) { | 3286 static void reflectUnsignedShortAttributeAttributeGetter(const v8::FunctionCallb
ackInfo<v8::Value>& info) { |
3069 v8::Local<v8::Object> holder = info.Holder(); | 3287 v8::Local<v8::Object> holder = info.Holder(); |
3070 | 3288 |
3071 TestObject* impl = V8TestObject::toImpl(holder); | 3289 TestObject* impl = V8TestObject::toImpl(holder); |
3072 | 3290 |
3073 V8SetReturnValueUnsigned(info, std::max(0, static_cast<int>(impl->FastGetAttri
bute(HTMLNames::reflectunsignedshortattributeAttr)))); | 3291 V8SetReturnValueUnsigned(info, std::max(0, static_cast<int>(impl->FastGetAttri
bute(HTMLNames::reflectunsignedshortattributeAttr)))); |
3074 } | 3292 } |
3075 | 3293 |
3076 static void reflectUnsignedShortAttributeAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::FunctionCallbackInfo<v8::Value>& info) { | 3294 static void reflectUnsignedShortAttributeAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::FunctionCallbackInfo<v8::Value>& info) { |
3077 v8::Isolate* isolate = info.GetIsolate(); | 3295 v8::Isolate* isolate = info.GetIsolate(); |
3078 ALLOW_UNUSED_LOCAL(isolate); | 3296 ALLOW_UNUSED_LOCAL(isolate); |
3079 | 3297 |
3080 v8::Local<v8::Object> holder = info.Holder(); | 3298 v8::Local<v8::Object> holder = info.Holder(); |
| 3299 ALLOW_UNUSED_LOCAL(holder); |
| 3300 |
3081 TestObject* impl = V8TestObject::toImpl(holder); | 3301 TestObject* impl = V8TestObject::toImpl(holder); |
3082 | 3302 |
3083 // Skip on compact node DOMString getters. | 3303 // Skip on compact node DOMString getters. |
3084 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3304 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
3085 | 3305 |
3086 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "reflectUnsignedShortAttribute"); | 3306 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "reflectUnsignedShortAttribute"); |
3087 | 3307 |
3088 // Prepare the value to be set. | 3308 // Prepare the value to be set. |
3089 uint16_t cppValue = NativeValueTraits<IDLUnsignedShort>::NativeValue(info.GetI
solate(), v8Value, exceptionState, kNormalConversion); | 3309 uint16_t cppValue = NativeValueTraits<IDLUnsignedShort>::NativeValue(info.GetI
solate(), v8Value, exceptionState, kNormalConversion); |
3090 if (exceptionState.HadException()) | 3310 if (exceptionState.HadException()) |
3091 return; | 3311 return; |
3092 | 3312 |
3093 impl->setAttribute(HTMLNames::reflectunsignedshortattributeAttr, cppValue); | 3313 impl->setAttribute(HTMLNames::reflectunsignedshortattributeAttr, cppValue); |
3094 } | 3314 } |
3095 | 3315 |
3096 static void reflectUnsignedLongAttributeAttributeGetter(const v8::FunctionCallba
ckInfo<v8::Value>& info) { | 3316 static void reflectUnsignedLongAttributeAttributeGetter(const v8::FunctionCallba
ckInfo<v8::Value>& info) { |
3097 v8::Local<v8::Object> holder = info.Holder(); | 3317 v8::Local<v8::Object> holder = info.Holder(); |
3098 | 3318 |
3099 TestObject* impl = V8TestObject::toImpl(holder); | 3319 TestObject* impl = V8TestObject::toImpl(holder); |
3100 | 3320 |
3101 V8SetReturnValueUnsigned(info, std::max(0, static_cast<int>(impl->GetIntegralA
ttribute(HTMLNames::reflectunsignedlongattributeAttr)))); | 3321 V8SetReturnValueUnsigned(info, std::max(0, static_cast<int>(impl->GetIntegralA
ttribute(HTMLNames::reflectunsignedlongattributeAttr)))); |
3102 } | 3322 } |
3103 | 3323 |
3104 static void reflectUnsignedLongAttributeAttributeSetter(v8::Local<v8::Value> v8V
alue, const v8::FunctionCallbackInfo<v8::Value>& info) { | 3324 static void reflectUnsignedLongAttributeAttributeSetter(v8::Local<v8::Value> v8V
alue, const v8::FunctionCallbackInfo<v8::Value>& info) { |
3105 v8::Isolate* isolate = info.GetIsolate(); | 3325 v8::Isolate* isolate = info.GetIsolate(); |
3106 ALLOW_UNUSED_LOCAL(isolate); | 3326 ALLOW_UNUSED_LOCAL(isolate); |
3107 | 3327 |
3108 v8::Local<v8::Object> holder = info.Holder(); | 3328 v8::Local<v8::Object> holder = info.Holder(); |
| 3329 ALLOW_UNUSED_LOCAL(holder); |
| 3330 |
3109 TestObject* impl = V8TestObject::toImpl(holder); | 3331 TestObject* impl = V8TestObject::toImpl(holder); |
3110 | 3332 |
3111 // Skip on compact node DOMString getters. | 3333 // Skip on compact node DOMString getters. |
3112 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3334 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
3113 | 3335 |
3114 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "reflectUnsignedLongAttribute"); | 3336 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "reflectUnsignedLongAttribute"); |
3115 | 3337 |
3116 // Prepare the value to be set. | 3338 // Prepare the value to be set. |
3117 uint32_t cppValue = NativeValueTraits<IDLUnsignedLong>::NativeValue(info.GetIs
olate(), v8Value, exceptionState, kNormalConversion); | 3339 uint32_t cppValue = NativeValueTraits<IDLUnsignedLong>::NativeValue(info.GetIs
olate(), v8Value, exceptionState, kNormalConversion); |
3118 if (exceptionState.HadException()) | 3340 if (exceptionState.HadException()) |
3119 return; | 3341 return; |
3120 | 3342 |
3121 impl->SetUnsignedIntegralAttribute(HTMLNames::reflectunsignedlongattributeAttr
, cppValue); | 3343 impl->SetUnsignedIntegralAttribute(HTMLNames::reflectunsignedlongattributeAttr
, cppValue); |
3122 } | 3344 } |
3123 | 3345 |
3124 static void idAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) { | 3346 static void idAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) { |
3125 v8::Local<v8::Object> holder = info.Holder(); | 3347 v8::Local<v8::Object> holder = info.Holder(); |
3126 | 3348 |
3127 TestObject* impl = V8TestObject::toImpl(holder); | 3349 TestObject* impl = V8TestObject::toImpl(holder); |
3128 | 3350 |
3129 V8SetReturnValueString(info, impl->GetIdAttribute(), info.GetIsolate()); | 3351 V8SetReturnValueString(info, impl->GetIdAttribute(), info.GetIsolate()); |
3130 } | 3352 } |
3131 | 3353 |
3132 static void idAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCa
llbackInfo<v8::Value>& info) { | 3354 static void idAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCa
llbackInfo<v8::Value>& info) { |
3133 v8::Isolate* isolate = info.GetIsolate(); | 3355 v8::Isolate* isolate = info.GetIsolate(); |
3134 ALLOW_UNUSED_LOCAL(isolate); | 3356 ALLOW_UNUSED_LOCAL(isolate); |
3135 | 3357 |
3136 v8::Local<v8::Object> holder = info.Holder(); | 3358 v8::Local<v8::Object> holder = info.Holder(); |
| 3359 ALLOW_UNUSED_LOCAL(holder); |
| 3360 |
3137 TestObject* impl = V8TestObject::toImpl(holder); | 3361 TestObject* impl = V8TestObject::toImpl(holder); |
3138 | 3362 |
3139 // Skip on compact node DOMString getters. | 3363 // Skip on compact node DOMString getters. |
3140 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3364 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
3141 | 3365 |
3142 // Prepare the value to be set. | 3366 // Prepare the value to be set. |
3143 V8StringResource<> cppValue = v8Value; | 3367 V8StringResource<> cppValue = v8Value; |
3144 if (!cppValue.Prepare()) | 3368 if (!cppValue.Prepare()) |
3145 return; | 3369 return; |
3146 | 3370 |
3147 impl->setAttribute(HTMLNames::idAttr, cppValue); | 3371 impl->setAttribute(HTMLNames::idAttr, cppValue); |
3148 } | 3372 } |
3149 | 3373 |
3150 static void nameAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{ | 3374 static void nameAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{ |
3151 v8::Local<v8::Object> holder = info.Holder(); | 3375 v8::Local<v8::Object> holder = info.Holder(); |
3152 | 3376 |
3153 TestObject* impl = V8TestObject::toImpl(holder); | 3377 TestObject* impl = V8TestObject::toImpl(holder); |
3154 | 3378 |
3155 V8SetReturnValueString(info, impl->GetNameAttribute(), info.GetIsolate()); | 3379 V8SetReturnValueString(info, impl->GetNameAttribute(), info.GetIsolate()); |
3156 } | 3380 } |
3157 | 3381 |
3158 static void nameAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Function
CallbackInfo<v8::Value>& info) { | 3382 static void nameAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Function
CallbackInfo<v8::Value>& info) { |
3159 v8::Isolate* isolate = info.GetIsolate(); | 3383 v8::Isolate* isolate = info.GetIsolate(); |
3160 ALLOW_UNUSED_LOCAL(isolate); | 3384 ALLOW_UNUSED_LOCAL(isolate); |
3161 | 3385 |
3162 v8::Local<v8::Object> holder = info.Holder(); | 3386 v8::Local<v8::Object> holder = info.Holder(); |
| 3387 ALLOW_UNUSED_LOCAL(holder); |
| 3388 |
3163 TestObject* impl = V8TestObject::toImpl(holder); | 3389 TestObject* impl = V8TestObject::toImpl(holder); |
3164 | 3390 |
3165 // Skip on compact node DOMString getters. | 3391 // Skip on compact node DOMString getters. |
3166 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3392 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
3167 | 3393 |
3168 // Prepare the value to be set. | 3394 // Prepare the value to be set. |
3169 V8StringResource<> cppValue = v8Value; | 3395 V8StringResource<> cppValue = v8Value; |
3170 if (!cppValue.Prepare()) | 3396 if (!cppValue.Prepare()) |
3171 return; | 3397 return; |
3172 | 3398 |
3173 impl->setAttribute(HTMLNames::nameAttr, cppValue); | 3399 impl->setAttribute(HTMLNames::nameAttr, cppValue); |
3174 } | 3400 } |
3175 | 3401 |
3176 static void classAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info
) { | 3402 static void classAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info
) { |
3177 v8::Local<v8::Object> holder = info.Holder(); | 3403 v8::Local<v8::Object> holder = info.Holder(); |
3178 | 3404 |
3179 TestObject* impl = V8TestObject::toImpl(holder); | 3405 TestObject* impl = V8TestObject::toImpl(holder); |
3180 | 3406 |
3181 V8SetReturnValueString(info, impl->GetClassAttribute(), info.GetIsolate()); | 3407 V8SetReturnValueString(info, impl->GetClassAttribute(), info.GetIsolate()); |
3182 } | 3408 } |
3183 | 3409 |
3184 static void classAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Functio
nCallbackInfo<v8::Value>& info) { | 3410 static void classAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Functio
nCallbackInfo<v8::Value>& info) { |
3185 v8::Isolate* isolate = info.GetIsolate(); | 3411 v8::Isolate* isolate = info.GetIsolate(); |
3186 ALLOW_UNUSED_LOCAL(isolate); | 3412 ALLOW_UNUSED_LOCAL(isolate); |
3187 | 3413 |
3188 v8::Local<v8::Object> holder = info.Holder(); | 3414 v8::Local<v8::Object> holder = info.Holder(); |
| 3415 ALLOW_UNUSED_LOCAL(holder); |
| 3416 |
3189 TestObject* impl = V8TestObject::toImpl(holder); | 3417 TestObject* impl = V8TestObject::toImpl(holder); |
3190 | 3418 |
3191 // Skip on compact node DOMString getters. | 3419 // Skip on compact node DOMString getters. |
3192 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3420 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
3193 | 3421 |
3194 // Prepare the value to be set. | 3422 // Prepare the value to be set. |
3195 V8StringResource<> cppValue = v8Value; | 3423 V8StringResource<> cppValue = v8Value; |
3196 if (!cppValue.Prepare()) | 3424 if (!cppValue.Prepare()) |
3197 return; | 3425 return; |
3198 | 3426 |
3199 impl->setAttribute(HTMLNames::classAttr, cppValue); | 3427 impl->setAttribute(HTMLNames::classAttr, cppValue); |
3200 } | 3428 } |
3201 | 3429 |
3202 static void reflectedIdAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>
& info) { | 3430 static void reflectedIdAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>
& info) { |
3203 v8::Local<v8::Object> holder = info.Holder(); | 3431 v8::Local<v8::Object> holder = info.Holder(); |
3204 | 3432 |
3205 TestObject* impl = V8TestObject::toImpl(holder); | 3433 TestObject* impl = V8TestObject::toImpl(holder); |
3206 | 3434 |
3207 V8SetReturnValueString(info, impl->GetIdAttribute(), info.GetIsolate()); | 3435 V8SetReturnValueString(info, impl->GetIdAttribute(), info.GetIsolate()); |
3208 } | 3436 } |
3209 | 3437 |
3210 static void reflectedIdAttributeSetter(v8::Local<v8::Value> v8Value, const v8::F
unctionCallbackInfo<v8::Value>& info) { | 3438 static void reflectedIdAttributeSetter(v8::Local<v8::Value> v8Value, const v8::F
unctionCallbackInfo<v8::Value>& info) { |
3211 v8::Isolate* isolate = info.GetIsolate(); | 3439 v8::Isolate* isolate = info.GetIsolate(); |
3212 ALLOW_UNUSED_LOCAL(isolate); | 3440 ALLOW_UNUSED_LOCAL(isolate); |
3213 | 3441 |
3214 v8::Local<v8::Object> holder = info.Holder(); | 3442 v8::Local<v8::Object> holder = info.Holder(); |
| 3443 ALLOW_UNUSED_LOCAL(holder); |
| 3444 |
3215 TestObject* impl = V8TestObject::toImpl(holder); | 3445 TestObject* impl = V8TestObject::toImpl(holder); |
3216 | 3446 |
3217 // Skip on compact node DOMString getters. | 3447 // Skip on compact node DOMString getters. |
3218 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3448 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
3219 | 3449 |
3220 // Prepare the value to be set. | 3450 // Prepare the value to be set. |
3221 V8StringResource<> cppValue = v8Value; | 3451 V8StringResource<> cppValue = v8Value; |
3222 if (!cppValue.Prepare()) | 3452 if (!cppValue.Prepare()) |
3223 return; | 3453 return; |
3224 | 3454 |
3225 impl->setAttribute(HTMLNames::idAttr, cppValue); | 3455 impl->setAttribute(HTMLNames::idAttr, cppValue); |
3226 } | 3456 } |
3227 | 3457 |
3228 static void reflectedNameAttributeGetter(const v8::FunctionCallbackInfo<v8::Valu
e>& info) { | 3458 static void reflectedNameAttributeGetter(const v8::FunctionCallbackInfo<v8::Valu
e>& info) { |
3229 v8::Local<v8::Object> holder = info.Holder(); | 3459 v8::Local<v8::Object> holder = info.Holder(); |
3230 | 3460 |
3231 TestObject* impl = V8TestObject::toImpl(holder); | 3461 TestObject* impl = V8TestObject::toImpl(holder); |
3232 | 3462 |
3233 V8SetReturnValueString(info, impl->GetNameAttribute(), info.GetIsolate()); | 3463 V8SetReturnValueString(info, impl->GetNameAttribute(), info.GetIsolate()); |
3234 } | 3464 } |
3235 | 3465 |
3236 static void reflectedNameAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:FunctionCallbackInfo<v8::Value>& info) { | 3466 static void reflectedNameAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:FunctionCallbackInfo<v8::Value>& info) { |
3237 v8::Isolate* isolate = info.GetIsolate(); | 3467 v8::Isolate* isolate = info.GetIsolate(); |
3238 ALLOW_UNUSED_LOCAL(isolate); | 3468 ALLOW_UNUSED_LOCAL(isolate); |
3239 | 3469 |
3240 v8::Local<v8::Object> holder = info.Holder(); | 3470 v8::Local<v8::Object> holder = info.Holder(); |
| 3471 ALLOW_UNUSED_LOCAL(holder); |
| 3472 |
3241 TestObject* impl = V8TestObject::toImpl(holder); | 3473 TestObject* impl = V8TestObject::toImpl(holder); |
3242 | 3474 |
3243 // Skip on compact node DOMString getters. | 3475 // Skip on compact node DOMString getters. |
3244 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3476 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
3245 | 3477 |
3246 // Prepare the value to be set. | 3478 // Prepare the value to be set. |
3247 V8StringResource<> cppValue = v8Value; | 3479 V8StringResource<> cppValue = v8Value; |
3248 if (!cppValue.Prepare()) | 3480 if (!cppValue.Prepare()) |
3249 return; | 3481 return; |
3250 | 3482 |
3251 impl->setAttribute(HTMLNames::nameAttr, cppValue); | 3483 impl->setAttribute(HTMLNames::nameAttr, cppValue); |
3252 } | 3484 } |
3253 | 3485 |
3254 static void reflectedClassAttributeGetter(const v8::FunctionCallbackInfo<v8::Val
ue>& info) { | 3486 static void reflectedClassAttributeGetter(const v8::FunctionCallbackInfo<v8::Val
ue>& info) { |
3255 v8::Local<v8::Object> holder = info.Holder(); | 3487 v8::Local<v8::Object> holder = info.Holder(); |
3256 | 3488 |
3257 TestObject* impl = V8TestObject::toImpl(holder); | 3489 TestObject* impl = V8TestObject::toImpl(holder); |
3258 | 3490 |
3259 V8SetReturnValueString(info, impl->GetClassAttribute(), info.GetIsolate()); | 3491 V8SetReturnValueString(info, impl->GetClassAttribute(), info.GetIsolate()); |
3260 } | 3492 } |
3261 | 3493 |
3262 static void reflectedClassAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::FunctionCallbackInfo<v8::Value>& info) { | 3494 static void reflectedClassAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::FunctionCallbackInfo<v8::Value>& info) { |
3263 v8::Isolate* isolate = info.GetIsolate(); | 3495 v8::Isolate* isolate = info.GetIsolate(); |
3264 ALLOW_UNUSED_LOCAL(isolate); | 3496 ALLOW_UNUSED_LOCAL(isolate); |
3265 | 3497 |
3266 v8::Local<v8::Object> holder = info.Holder(); | 3498 v8::Local<v8::Object> holder = info.Holder(); |
| 3499 ALLOW_UNUSED_LOCAL(holder); |
| 3500 |
3267 TestObject* impl = V8TestObject::toImpl(holder); | 3501 TestObject* impl = V8TestObject::toImpl(holder); |
3268 | 3502 |
3269 // Skip on compact node DOMString getters. | 3503 // Skip on compact node DOMString getters. |
3270 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3504 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
3271 | 3505 |
3272 // Prepare the value to be set. | 3506 // Prepare the value to be set. |
3273 V8StringResource<> cppValue = v8Value; | 3507 V8StringResource<> cppValue = v8Value; |
3274 if (!cppValue.Prepare()) | 3508 if (!cppValue.Prepare()) |
3275 return; | 3509 return; |
3276 | 3510 |
(...skipping 16 matching lines...) Expand all Loading... |
3293 } | 3527 } |
3294 | 3528 |
3295 V8SetReturnValueString(info, cppValue, info.GetIsolate()); | 3529 V8SetReturnValueString(info, cppValue, info.GetIsolate()); |
3296 } | 3530 } |
3297 | 3531 |
3298 static void limitedToOnlyOneAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::FunctionCallbackInfo<v8::Value>& info) { | 3532 static void limitedToOnlyOneAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::FunctionCallbackInfo<v8::Value>& info) { |
3299 v8::Isolate* isolate = info.GetIsolate(); | 3533 v8::Isolate* isolate = info.GetIsolate(); |
3300 ALLOW_UNUSED_LOCAL(isolate); | 3534 ALLOW_UNUSED_LOCAL(isolate); |
3301 | 3535 |
3302 v8::Local<v8::Object> holder = info.Holder(); | 3536 v8::Local<v8::Object> holder = info.Holder(); |
| 3537 ALLOW_UNUSED_LOCAL(holder); |
| 3538 |
3303 TestObject* impl = V8TestObject::toImpl(holder); | 3539 TestObject* impl = V8TestObject::toImpl(holder); |
3304 | 3540 |
3305 // Skip on compact node DOMString getters. | 3541 // Skip on compact node DOMString getters. |
3306 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3542 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
3307 | 3543 |
3308 // Prepare the value to be set. | 3544 // Prepare the value to be set. |
3309 V8StringResource<> cppValue = v8Value; | 3545 V8StringResource<> cppValue = v8Value; |
3310 if (!cppValue.Prepare()) | 3546 if (!cppValue.Prepare()) |
3311 return; | 3547 return; |
3312 | 3548 |
(...skipping 20 matching lines...) Expand all Loading... |
3333 } | 3569 } |
3334 | 3570 |
3335 V8SetReturnValueString(info, cppValue, info.GetIsolate()); | 3571 V8SetReturnValueString(info, cppValue, info.GetIsolate()); |
3336 } | 3572 } |
3337 | 3573 |
3338 static void limitedToOnlyAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) { | 3574 static void limitedToOnlyAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) { |
3339 v8::Isolate* isolate = info.GetIsolate(); | 3575 v8::Isolate* isolate = info.GetIsolate(); |
3340 ALLOW_UNUSED_LOCAL(isolate); | 3576 ALLOW_UNUSED_LOCAL(isolate); |
3341 | 3577 |
3342 v8::Local<v8::Object> holder = info.Holder(); | 3578 v8::Local<v8::Object> holder = info.Holder(); |
| 3579 ALLOW_UNUSED_LOCAL(holder); |
| 3580 |
3343 TestObject* impl = V8TestObject::toImpl(holder); | 3581 TestObject* impl = V8TestObject::toImpl(holder); |
3344 | 3582 |
3345 // Skip on compact node DOMString getters. | 3583 // Skip on compact node DOMString getters. |
3346 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3584 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
3347 | 3585 |
3348 // Prepare the value to be set. | 3586 // Prepare the value to be set. |
3349 V8StringResource<> cppValue = v8Value; | 3587 V8StringResource<> cppValue = v8Value; |
3350 if (!cppValue.Prepare()) | 3588 if (!cppValue.Prepare()) |
3351 return; | 3589 return; |
3352 | 3590 |
(...skipping 18 matching lines...) Expand all Loading... |
3371 } | 3609 } |
3372 | 3610 |
3373 V8SetReturnValueString(info, cppValue, info.GetIsolate()); | 3611 V8SetReturnValueString(info, cppValue, info.GetIsolate()); |
3374 } | 3612 } |
3375 | 3613 |
3376 static void limitedToOnlyOtherAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::FunctionCallbackInfo<v8::Value>& info) { | 3614 static void limitedToOnlyOtherAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::FunctionCallbackInfo<v8::Value>& info) { |
3377 v8::Isolate* isolate = info.GetIsolate(); | 3615 v8::Isolate* isolate = info.GetIsolate(); |
3378 ALLOW_UNUSED_LOCAL(isolate); | 3616 ALLOW_UNUSED_LOCAL(isolate); |
3379 | 3617 |
3380 v8::Local<v8::Object> holder = info.Holder(); | 3618 v8::Local<v8::Object> holder = info.Holder(); |
| 3619 ALLOW_UNUSED_LOCAL(holder); |
| 3620 |
3381 TestObject* impl = V8TestObject::toImpl(holder); | 3621 TestObject* impl = V8TestObject::toImpl(holder); |
3382 | 3622 |
3383 // Skip on compact node DOMString getters. | 3623 // Skip on compact node DOMString getters. |
3384 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3624 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
3385 | 3625 |
3386 // Prepare the value to be set. | 3626 // Prepare the value to be set. |
3387 V8StringResource<> cppValue = v8Value; | 3627 V8StringResource<> cppValue = v8Value; |
3388 if (!cppValue.Prepare()) | 3628 if (!cppValue.Prepare()) |
3389 return; | 3629 return; |
3390 | 3630 |
(...skipping 18 matching lines...) Expand all Loading... |
3409 } | 3649 } |
3410 | 3650 |
3411 V8SetReturnValueString(info, cppValue, info.GetIsolate()); | 3651 V8SetReturnValueString(info, cppValue, info.GetIsolate()); |
3412 } | 3652 } |
3413 | 3653 |
3414 static void limitedWithMissingDefaultAttributeAttributeSetter(v8::Local<v8::Valu
e> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { | 3654 static void limitedWithMissingDefaultAttributeAttributeSetter(v8::Local<v8::Valu
e> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { |
3415 v8::Isolate* isolate = info.GetIsolate(); | 3655 v8::Isolate* isolate = info.GetIsolate(); |
3416 ALLOW_UNUSED_LOCAL(isolate); | 3656 ALLOW_UNUSED_LOCAL(isolate); |
3417 | 3657 |
3418 v8::Local<v8::Object> holder = info.Holder(); | 3658 v8::Local<v8::Object> holder = info.Holder(); |
| 3659 ALLOW_UNUSED_LOCAL(holder); |
| 3660 |
3419 TestObject* impl = V8TestObject::toImpl(holder); | 3661 TestObject* impl = V8TestObject::toImpl(holder); |
3420 | 3662 |
3421 // Skip on compact node DOMString getters. | 3663 // Skip on compact node DOMString getters. |
3422 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3664 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
3423 | 3665 |
3424 // Prepare the value to be set. | 3666 // Prepare the value to be set. |
3425 V8StringResource<> cppValue = v8Value; | 3667 V8StringResource<> cppValue = v8Value; |
3426 if (!cppValue.Prepare()) | 3668 if (!cppValue.Prepare()) |
3427 return; | 3669 return; |
3428 | 3670 |
(...skipping 20 matching lines...) Expand all Loading... |
3449 } | 3691 } |
3450 | 3692 |
3451 V8SetReturnValueString(info, cppValue, info.GetIsolate()); | 3693 V8SetReturnValueString(info, cppValue, info.GetIsolate()); |
3452 } | 3694 } |
3453 | 3695 |
3454 static void limitedWithInvalidMissingDefaultAttributeAttributeSetter(v8::Local<v
8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { | 3696 static void limitedWithInvalidMissingDefaultAttributeAttributeSetter(v8::Local<v
8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { |
3455 v8::Isolate* isolate = info.GetIsolate(); | 3697 v8::Isolate* isolate = info.GetIsolate(); |
3456 ALLOW_UNUSED_LOCAL(isolate); | 3698 ALLOW_UNUSED_LOCAL(isolate); |
3457 | 3699 |
3458 v8::Local<v8::Object> holder = info.Holder(); | 3700 v8::Local<v8::Object> holder = info.Holder(); |
| 3701 ALLOW_UNUSED_LOCAL(holder); |
| 3702 |
3459 TestObject* impl = V8TestObject::toImpl(holder); | 3703 TestObject* impl = V8TestObject::toImpl(holder); |
3460 | 3704 |
3461 // Skip on compact node DOMString getters. | 3705 // Skip on compact node DOMString getters. |
3462 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3706 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
3463 | 3707 |
3464 // Prepare the value to be set. | 3708 // Prepare the value to be set. |
3465 V8StringResource<> cppValue = v8Value; | 3709 V8StringResource<> cppValue = v8Value; |
3466 if (!cppValue.Prepare()) | 3710 if (!cppValue.Prepare()) |
3467 return; | 3711 return; |
3468 | 3712 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3522 | 3766 |
3523 TestObject* impl = V8TestObject::toImpl(holder); | 3767 TestObject* impl = V8TestObject::toImpl(holder); |
3524 | 3768 |
3525 V8SetReturnValueInt(info, impl->replaceableReadonlyLongAttribute()); | 3769 V8SetReturnValueInt(info, impl->replaceableReadonlyLongAttribute()); |
3526 } | 3770 } |
3527 | 3771 |
3528 static void replaceableReadonlyLongAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { | 3772 static void replaceableReadonlyLongAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { |
3529 v8::Isolate* isolate = info.GetIsolate(); | 3773 v8::Isolate* isolate = info.GetIsolate(); |
3530 ALLOW_UNUSED_LOCAL(isolate); | 3774 ALLOW_UNUSED_LOCAL(isolate); |
3531 | 3775 |
| 3776 v8::Local<v8::Object> holder = info.Holder(); |
| 3777 ALLOW_UNUSED_LOCAL(holder); |
| 3778 |
3532 // Prepare the value to be set. | 3779 // Prepare the value to be set. |
3533 | 3780 |
3534 v8::Local<v8::String> propertyName = V8AtomicString(isolate, "replaceableReado
nlyLongAttribute"); | 3781 v8::Local<v8::String> propertyName = V8AtomicString(isolate, "replaceableReado
nlyLongAttribute"); |
3535 V8CallBoolean(info.Holder()->CreateDataProperty(info.GetIsolate()->GetCurrentC
ontext(), propertyName, v8Value)); | 3782 V8CallBoolean(info.Holder()->CreateDataProperty(info.GetIsolate()->GetCurrentC
ontext(), propertyName, v8Value)); |
3536 } | 3783 } |
3537 | 3784 |
3538 static void locationPutForwardsAttributeGetter(const v8::FunctionCallbackInfo<v8
::Value>& info) { | 3785 static void locationPutForwardsAttributeGetter(const v8::FunctionCallbackInfo<v8
::Value>& info) { |
3539 v8::Local<v8::Object> holder = info.Holder(); | 3786 v8::Local<v8::Object> holder = info.Holder(); |
3540 | 3787 |
3541 TestObject* impl = V8TestObject::toImpl(holder); | 3788 TestObject* impl = V8TestObject::toImpl(holder); |
3542 | 3789 |
3543 V8SetReturnValueFast(info, WTF::GetPtr(impl->locationPutForwards()), impl); | 3790 V8SetReturnValueFast(info, WTF::GetPtr(impl->locationPutForwards()), impl); |
3544 } | 3791 } |
3545 | 3792 |
3546 static void locationPutForwardsAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::FunctionCallbackInfo<v8::Value>& info) { | 3793 static void locationPutForwardsAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::FunctionCallbackInfo<v8::Value>& info) { |
3547 v8::Isolate* isolate = info.GetIsolate(); | 3794 v8::Isolate* isolate = info.GetIsolate(); |
3548 ALLOW_UNUSED_LOCAL(isolate); | 3795 ALLOW_UNUSED_LOCAL(isolate); |
3549 | 3796 |
3550 v8::Local<v8::Object> holder = info.Holder(); | 3797 v8::Local<v8::Object> holder = info.Holder(); |
3551 TestObject* proxyImpl = V8TestObject::toImpl(holder); | 3798 ALLOW_UNUSED_LOCAL(holder); |
3552 TestNode* impl = WTF::GetPtr(proxyImpl->locationPutForwards()); | 3799 |
3553 if (!impl) | 3800 // [PutForwards] => locationPutForwards.href |
| 3801 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "locationPutForwards"); |
| 3802 v8::Local<v8::Value> target; |
| 3803 if (!holder->Get(isolate->GetCurrentContext(), V8String(isolate, "locationPutF
orwards")).ToLocal(&target)) |
3554 return; | 3804 return; |
3555 | 3805 if (!target->IsObject()) { |
3556 // Prepare the value to be set. | 3806 exceptionState.ThrowTypeError("The attribute value is not an object"); |
3557 V8StringResource<> cppValue = v8Value; | |
3558 if (!cppValue.Prepare()) | |
3559 return; | 3807 return; |
3560 | 3808 } |
3561 impl->setHref(cppValue); | 3809 bool result; |
| 3810 if (!target.As<v8::Object>()->Set(isolate->GetCurrentContext(), V8String(isola
te, "href"), v8Value).To(&result)) |
| 3811 return; |
| 3812 if (!result) |
| 3813 return; |
3562 } | 3814 } |
3563 | 3815 |
3564 static void runtimeEnabledLongAttributeAttributeGetter(const v8::FunctionCallbac
kInfo<v8::Value>& info) { | 3816 static void runtimeEnabledLongAttributeAttributeGetter(const v8::FunctionCallbac
kInfo<v8::Value>& info) { |
3565 v8::Local<v8::Object> holder = info.Holder(); | 3817 v8::Local<v8::Object> holder = info.Holder(); |
3566 | 3818 |
3567 TestObject* impl = V8TestObject::toImpl(holder); | 3819 TestObject* impl = V8TestObject::toImpl(holder); |
3568 | 3820 |
3569 V8SetReturnValueInt(info, impl->runtimeEnabledLongAttribute()); | 3821 V8SetReturnValueInt(info, impl->runtimeEnabledLongAttribute()); |
3570 } | 3822 } |
3571 | 3823 |
3572 static void runtimeEnabledLongAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::FunctionCallbackInfo<v8::Value>& info) { | 3824 static void runtimeEnabledLongAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::FunctionCallbackInfo<v8::Value>& info) { |
3573 v8::Isolate* isolate = info.GetIsolate(); | 3825 v8::Isolate* isolate = info.GetIsolate(); |
3574 ALLOW_UNUSED_LOCAL(isolate); | 3826 ALLOW_UNUSED_LOCAL(isolate); |
3575 | 3827 |
3576 v8::Local<v8::Object> holder = info.Holder(); | 3828 v8::Local<v8::Object> holder = info.Holder(); |
| 3829 ALLOW_UNUSED_LOCAL(holder); |
| 3830 |
3577 TestObject* impl = V8TestObject::toImpl(holder); | 3831 TestObject* impl = V8TestObject::toImpl(holder); |
3578 | 3832 |
3579 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "runtimeEnabledLongAttribute"); | 3833 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "runtimeEnabledLongAttribute"); |
3580 | 3834 |
3581 // Prepare the value to be set. | 3835 // Prepare the value to be set. |
3582 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); | 3836 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); |
3583 if (exceptionState.HadException()) | 3837 if (exceptionState.HadException()) |
3584 return; | 3838 return; |
3585 | 3839 |
3586 impl->setRuntimeEnabledLongAttribute(cppValue); | 3840 impl->setRuntimeEnabledLongAttribute(cppValue); |
3587 } | 3841 } |
3588 | 3842 |
3589 static void setterCallWithCurrentWindowAndEnteredWindowStringAttributeAttributeG
etter(const v8::FunctionCallbackInfo<v8::Value>& info) { | 3843 static void setterCallWithCurrentWindowAndEnteredWindowStringAttributeAttributeG
etter(const v8::FunctionCallbackInfo<v8::Value>& info) { |
3590 v8::Local<v8::Object> holder = info.Holder(); | 3844 v8::Local<v8::Object> holder = info.Holder(); |
3591 | 3845 |
3592 TestObject* impl = V8TestObject::toImpl(holder); | 3846 TestObject* impl = V8TestObject::toImpl(holder); |
3593 | 3847 |
3594 V8SetReturnValueString(info, impl->setterCallWithCurrentWindowAndEnteredWindow
StringAttribute(), info.GetIsolate()); | 3848 V8SetReturnValueString(info, impl->setterCallWithCurrentWindowAndEnteredWindow
StringAttribute(), info.GetIsolate()); |
3595 } | 3849 } |
3596 | 3850 |
3597 static void setterCallWithCurrentWindowAndEnteredWindowStringAttributeAttributeS
etter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& i
nfo) { | 3851 static void setterCallWithCurrentWindowAndEnteredWindowStringAttributeAttributeS
etter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& i
nfo) { |
3598 v8::Isolate* isolate = info.GetIsolate(); | 3852 v8::Isolate* isolate = info.GetIsolate(); |
3599 ALLOW_UNUSED_LOCAL(isolate); | 3853 ALLOW_UNUSED_LOCAL(isolate); |
3600 | 3854 |
3601 v8::Local<v8::Object> holder = info.Holder(); | 3855 v8::Local<v8::Object> holder = info.Holder(); |
| 3856 ALLOW_UNUSED_LOCAL(holder); |
| 3857 |
3602 TestObject* impl = V8TestObject::toImpl(holder); | 3858 TestObject* impl = V8TestObject::toImpl(holder); |
3603 | 3859 |
3604 // Prepare the value to be set. | 3860 // Prepare the value to be set. |
3605 V8StringResource<> cppValue = v8Value; | 3861 V8StringResource<> cppValue = v8Value; |
3606 if (!cppValue.Prepare()) | 3862 if (!cppValue.Prepare()) |
3607 return; | 3863 return; |
3608 | 3864 |
3609 impl->setSetterCallWithCurrentWindowAndEnteredWindowStringAttribute(CurrentDOM
Window(info.GetIsolate()), EnteredDOMWindow(info.GetIsolate()), cppValue); | 3865 impl->setSetterCallWithCurrentWindowAndEnteredWindowStringAttribute(CurrentDOM
Window(info.GetIsolate()), EnteredDOMWindow(info.GetIsolate()), cppValue); |
3610 } | 3866 } |
3611 | 3867 |
3612 static void setterCallWithExecutionContextStringAttributeAttributeGetter(const v
8::FunctionCallbackInfo<v8::Value>& info) { | 3868 static void setterCallWithExecutionContextStringAttributeAttributeGetter(const v
8::FunctionCallbackInfo<v8::Value>& info) { |
3613 v8::Local<v8::Object> holder = info.Holder(); | 3869 v8::Local<v8::Object> holder = info.Holder(); |
3614 | 3870 |
3615 TestObject* impl = V8TestObject::toImpl(holder); | 3871 TestObject* impl = V8TestObject::toImpl(holder); |
3616 | 3872 |
3617 V8SetReturnValueString(info, impl->setterCallWithExecutionContextStringAttribu
te(), info.GetIsolate()); | 3873 V8SetReturnValueString(info, impl->setterCallWithExecutionContextStringAttribu
te(), info.GetIsolate()); |
3618 } | 3874 } |
3619 | 3875 |
3620 static void setterCallWithExecutionContextStringAttributeAttributeSetter(v8::Loc
al<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { | 3876 static void setterCallWithExecutionContextStringAttributeAttributeSetter(v8::Loc
al<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { |
3621 v8::Isolate* isolate = info.GetIsolate(); | 3877 v8::Isolate* isolate = info.GetIsolate(); |
3622 ALLOW_UNUSED_LOCAL(isolate); | 3878 ALLOW_UNUSED_LOCAL(isolate); |
3623 | 3879 |
3624 v8::Local<v8::Object> holder = info.Holder(); | 3880 v8::Local<v8::Object> holder = info.Holder(); |
| 3881 ALLOW_UNUSED_LOCAL(holder); |
| 3882 |
3625 TestObject* impl = V8TestObject::toImpl(holder); | 3883 TestObject* impl = V8TestObject::toImpl(holder); |
3626 | 3884 |
3627 // Prepare the value to be set. | 3885 // Prepare the value to be set. |
3628 V8StringResource<> cppValue = v8Value; | 3886 V8StringResource<> cppValue = v8Value; |
3629 if (!cppValue.Prepare()) | 3887 if (!cppValue.Prepare()) |
3630 return; | 3888 return; |
3631 | 3889 |
3632 ExecutionContext* executionContext = CurrentExecutionContext(isolate); | 3890 ExecutionContext* executionContext = CurrentExecutionContext(isolate); |
3633 | 3891 |
3634 impl->setSetterCallWithExecutionContextStringAttribute(executionContext, cppVa
lue); | 3892 impl->setSetterCallWithExecutionContextStringAttribute(executionContext, cppVa
lue); |
3635 } | 3893 } |
3636 | 3894 |
3637 static void treatNullAsEmptyStringStringAttributeAttributeGetter(const v8::Funct
ionCallbackInfo<v8::Value>& info) { | 3895 static void treatNullAsEmptyStringStringAttributeAttributeGetter(const v8::Funct
ionCallbackInfo<v8::Value>& info) { |
3638 v8::Local<v8::Object> holder = info.Holder(); | 3896 v8::Local<v8::Object> holder = info.Holder(); |
3639 | 3897 |
3640 TestObject* impl = V8TestObject::toImpl(holder); | 3898 TestObject* impl = V8TestObject::toImpl(holder); |
3641 | 3899 |
3642 V8SetReturnValueString(info, impl->treatNullAsEmptyStringStringAttribute(), in
fo.GetIsolate()); | 3900 V8SetReturnValueString(info, impl->treatNullAsEmptyStringStringAttribute(), in
fo.GetIsolate()); |
3643 } | 3901 } |
3644 | 3902 |
3645 static void treatNullAsEmptyStringStringAttributeAttributeSetter(v8::Local<v8::V
alue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { | 3903 static void treatNullAsEmptyStringStringAttributeAttributeSetter(v8::Local<v8::V
alue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { |
3646 v8::Isolate* isolate = info.GetIsolate(); | 3904 v8::Isolate* isolate = info.GetIsolate(); |
3647 ALLOW_UNUSED_LOCAL(isolate); | 3905 ALLOW_UNUSED_LOCAL(isolate); |
3648 | 3906 |
3649 v8::Local<v8::Object> holder = info.Holder(); | 3907 v8::Local<v8::Object> holder = info.Holder(); |
| 3908 ALLOW_UNUSED_LOCAL(holder); |
| 3909 |
3650 TestObject* impl = V8TestObject::toImpl(holder); | 3910 TestObject* impl = V8TestObject::toImpl(holder); |
3651 | 3911 |
3652 // Prepare the value to be set. | 3912 // Prepare the value to be set. |
3653 V8StringResource<kTreatNullAsEmptyString> cppValue = v8Value; | 3913 V8StringResource<kTreatNullAsEmptyString> cppValue = v8Value; |
3654 if (!cppValue.Prepare()) | 3914 if (!cppValue.Prepare()) |
3655 return; | 3915 return; |
3656 | 3916 |
3657 impl->setTreatNullAsEmptyStringStringAttribute(cppValue); | 3917 impl->setTreatNullAsEmptyStringStringAttribute(cppValue); |
3658 } | 3918 } |
3659 | 3919 |
3660 static void treatNullAsNullStringStringAttributeAttributeGetter(const v8::Functi
onCallbackInfo<v8::Value>& info) { | 3920 static void treatNullAsNullStringStringAttributeAttributeGetter(const v8::Functi
onCallbackInfo<v8::Value>& info) { |
3661 v8::Local<v8::Object> holder = info.Holder(); | 3921 v8::Local<v8::Object> holder = info.Holder(); |
3662 | 3922 |
3663 TestObject* impl = V8TestObject::toImpl(holder); | 3923 TestObject* impl = V8TestObject::toImpl(holder); |
3664 | 3924 |
3665 V8SetReturnValueString(info, impl->treatNullAsNullStringStringAttribute(), inf
o.GetIsolate()); | 3925 V8SetReturnValueString(info, impl->treatNullAsNullStringStringAttribute(), inf
o.GetIsolate()); |
3666 } | 3926 } |
3667 | 3927 |
3668 static void treatNullAsNullStringStringAttributeAttributeSetter(v8::Local<v8::Va
lue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { | 3928 static void treatNullAsNullStringStringAttributeAttributeSetter(v8::Local<v8::Va
lue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { |
3669 v8::Isolate* isolate = info.GetIsolate(); | 3929 v8::Isolate* isolate = info.GetIsolate(); |
3670 ALLOW_UNUSED_LOCAL(isolate); | 3930 ALLOW_UNUSED_LOCAL(isolate); |
3671 | 3931 |
3672 v8::Local<v8::Object> holder = info.Holder(); | 3932 v8::Local<v8::Object> holder = info.Holder(); |
| 3933 ALLOW_UNUSED_LOCAL(holder); |
| 3934 |
3673 TestObject* impl = V8TestObject::toImpl(holder); | 3935 TestObject* impl = V8TestObject::toImpl(holder); |
3674 | 3936 |
3675 // Prepare the value to be set. | 3937 // Prepare the value to be set. |
3676 V8StringResource<kTreatNullAsNullString> cppValue = v8Value; | 3938 V8StringResource<kTreatNullAsNullString> cppValue = v8Value; |
3677 if (!cppValue.Prepare()) | 3939 if (!cppValue.Prepare()) |
3678 return; | 3940 return; |
3679 | 3941 |
3680 impl->setTreatNullAsNullStringStringAttribute(cppValue); | 3942 impl->setTreatNullAsNullStringStringAttribute(cppValue); |
3681 } | 3943 } |
3682 | 3944 |
3683 static void legacyInterfaceTypeCheckingFloatAttributeAttributeGetter(const v8::F
unctionCallbackInfo<v8::Value>& info) { | 3945 static void legacyInterfaceTypeCheckingFloatAttributeAttributeGetter(const v8::F
unctionCallbackInfo<v8::Value>& info) { |
3684 v8::Local<v8::Object> holder = info.Holder(); | 3946 v8::Local<v8::Object> holder = info.Holder(); |
3685 | 3947 |
3686 TestObject* impl = V8TestObject::toImpl(holder); | 3948 TestObject* impl = V8TestObject::toImpl(holder); |
3687 | 3949 |
3688 V8SetReturnValue(info, impl->legacyInterfaceTypeCheckingFloatAttribute()); | 3950 V8SetReturnValue(info, impl->legacyInterfaceTypeCheckingFloatAttribute()); |
3689 } | 3951 } |
3690 | 3952 |
3691 static void legacyInterfaceTypeCheckingFloatAttributeAttributeSetter(v8::Local<v
8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { | 3953 static void legacyInterfaceTypeCheckingFloatAttributeAttributeSetter(v8::Local<v
8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { |
3692 v8::Isolate* isolate = info.GetIsolate(); | 3954 v8::Isolate* isolate = info.GetIsolate(); |
3693 ALLOW_UNUSED_LOCAL(isolate); | 3955 ALLOW_UNUSED_LOCAL(isolate); |
3694 | 3956 |
3695 v8::Local<v8::Object> holder = info.Holder(); | 3957 v8::Local<v8::Object> holder = info.Holder(); |
| 3958 ALLOW_UNUSED_LOCAL(holder); |
| 3959 |
3696 TestObject* impl = V8TestObject::toImpl(holder); | 3960 TestObject* impl = V8TestObject::toImpl(holder); |
3697 | 3961 |
3698 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "legacyInterfaceTypeCheckingFloatAttribute"); | 3962 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "legacyInterfaceTypeCheckingFloatAttribute"); |
3699 | 3963 |
3700 // Prepare the value to be set. | 3964 // Prepare the value to be set. |
3701 float cppValue = NativeValueTraits<IDLFloat>::NativeValue(info.GetIsolate(), v
8Value, exceptionState); | 3965 float cppValue = NativeValueTraits<IDLFloat>::NativeValue(info.GetIsolate(), v
8Value, exceptionState); |
3702 if (exceptionState.HadException()) | 3966 if (exceptionState.HadException()) |
3703 return; | 3967 return; |
3704 | 3968 |
3705 impl->setLegacyInterfaceTypeCheckingFloatAttribute(cppValue); | 3969 impl->setLegacyInterfaceTypeCheckingFloatAttribute(cppValue); |
3706 } | 3970 } |
3707 | 3971 |
3708 static void legacyInterfaceTypeCheckingTestInterfaceAttributeAttributeGetter(con
st v8::FunctionCallbackInfo<v8::Value>& info) { | 3972 static void legacyInterfaceTypeCheckingTestInterfaceAttributeAttributeGetter(con
st v8::FunctionCallbackInfo<v8::Value>& info) { |
3709 v8::Local<v8::Object> holder = info.Holder(); | 3973 v8::Local<v8::Object> holder = info.Holder(); |
3710 | 3974 |
3711 TestObject* impl = V8TestObject::toImpl(holder); | 3975 TestObject* impl = V8TestObject::toImpl(holder); |
3712 | 3976 |
3713 V8SetReturnValueFast(info, WTF::GetPtr(impl->legacyInterfaceTypeCheckingTestIn
terfaceAttribute()), impl); | 3977 V8SetReturnValueFast(info, WTF::GetPtr(impl->legacyInterfaceTypeCheckingTestIn
terfaceAttribute()), impl); |
3714 } | 3978 } |
3715 | 3979 |
3716 static void legacyInterfaceTypeCheckingTestInterfaceAttributeAttributeSetter(v8:
:Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { | 3980 static void legacyInterfaceTypeCheckingTestInterfaceAttributeAttributeSetter(v8:
:Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { |
3717 v8::Isolate* isolate = info.GetIsolate(); | 3981 v8::Isolate* isolate = info.GetIsolate(); |
3718 ALLOW_UNUSED_LOCAL(isolate); | 3982 ALLOW_UNUSED_LOCAL(isolate); |
3719 | 3983 |
3720 v8::Local<v8::Object> holder = info.Holder(); | 3984 v8::Local<v8::Object> holder = info.Holder(); |
| 3985 ALLOW_UNUSED_LOCAL(holder); |
| 3986 |
3721 TestObject* impl = V8TestObject::toImpl(holder); | 3987 TestObject* impl = V8TestObject::toImpl(holder); |
3722 | 3988 |
3723 // Prepare the value to be set. | 3989 // Prepare the value to be set. |
3724 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck(i
nfo.GetIsolate(), v8Value); | 3990 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck(i
nfo.GetIsolate(), v8Value); |
3725 | 3991 |
3726 impl->setLegacyInterfaceTypeCheckingTestInterfaceAttribute(cppValue); | 3992 impl->setLegacyInterfaceTypeCheckingTestInterfaceAttribute(cppValue); |
3727 } | 3993 } |
3728 | 3994 |
3729 static void legacyInterfaceTypeCheckingTestInterfaceOrNullAttributeAttributeGett
er(const v8::FunctionCallbackInfo<v8::Value>& info) { | 3995 static void legacyInterfaceTypeCheckingTestInterfaceOrNullAttributeAttributeGett
er(const v8::FunctionCallbackInfo<v8::Value>& info) { |
3730 v8::Local<v8::Object> holder = info.Holder(); | 3996 v8::Local<v8::Object> holder = info.Holder(); |
3731 | 3997 |
3732 TestObject* impl = V8TestObject::toImpl(holder); | 3998 TestObject* impl = V8TestObject::toImpl(holder); |
3733 | 3999 |
3734 V8SetReturnValueFast(info, WTF::GetPtr(impl->legacyInterfaceTypeCheckingTestIn
terfaceOrNullAttribute()), impl); | 4000 V8SetReturnValueFast(info, WTF::GetPtr(impl->legacyInterfaceTypeCheckingTestIn
terfaceOrNullAttribute()), impl); |
3735 } | 4001 } |
3736 | 4002 |
3737 static void legacyInterfaceTypeCheckingTestInterfaceOrNullAttributeAttributeSett
er(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info
) { | 4003 static void legacyInterfaceTypeCheckingTestInterfaceOrNullAttributeAttributeSett
er(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info
) { |
3738 v8::Isolate* isolate = info.GetIsolate(); | 4004 v8::Isolate* isolate = info.GetIsolate(); |
3739 ALLOW_UNUSED_LOCAL(isolate); | 4005 ALLOW_UNUSED_LOCAL(isolate); |
3740 | 4006 |
3741 v8::Local<v8::Object> holder = info.Holder(); | 4007 v8::Local<v8::Object> holder = info.Holder(); |
| 4008 ALLOW_UNUSED_LOCAL(holder); |
| 4009 |
3742 TestObject* impl = V8TestObject::toImpl(holder); | 4010 TestObject* impl = V8TestObject::toImpl(holder); |
3743 | 4011 |
3744 // Prepare the value to be set. | 4012 // Prepare the value to be set. |
3745 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck(i
nfo.GetIsolate(), v8Value); | 4013 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck(i
nfo.GetIsolate(), v8Value); |
3746 | 4014 |
3747 impl->setLegacyInterfaceTypeCheckingTestInterfaceOrNullAttribute(cppValue); | 4015 impl->setLegacyInterfaceTypeCheckingTestInterfaceOrNullAttribute(cppValue); |
3748 } | 4016 } |
3749 | 4017 |
3750 static void urlStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8:
:Value>& info) { | 4018 static void urlStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8:
:Value>& info) { |
3751 v8::Local<v8::Object> holder = info.Holder(); | 4019 v8::Local<v8::Object> holder = info.Holder(); |
3752 | 4020 |
3753 TestObject* impl = V8TestObject::toImpl(holder); | 4021 TestObject* impl = V8TestObject::toImpl(holder); |
3754 | 4022 |
3755 V8SetReturnValueString(info, impl->GetURLAttribute(HTMLNames::urlstringattribu
teAttr), info.GetIsolate()); | 4023 V8SetReturnValueString(info, impl->GetURLAttribute(HTMLNames::urlstringattribu
teAttr), info.GetIsolate()); |
3756 } | 4024 } |
3757 | 4025 |
3758 static void urlStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, cons
t v8::FunctionCallbackInfo<v8::Value>& info) { | 4026 static void urlStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, cons
t v8::FunctionCallbackInfo<v8::Value>& info) { |
3759 v8::Isolate* isolate = info.GetIsolate(); | 4027 v8::Isolate* isolate = info.GetIsolate(); |
3760 ALLOW_UNUSED_LOCAL(isolate); | 4028 ALLOW_UNUSED_LOCAL(isolate); |
3761 | 4029 |
3762 v8::Local<v8::Object> holder = info.Holder(); | 4030 v8::Local<v8::Object> holder = info.Holder(); |
| 4031 ALLOW_UNUSED_LOCAL(holder); |
| 4032 |
3763 TestObject* impl = V8TestObject::toImpl(holder); | 4033 TestObject* impl = V8TestObject::toImpl(holder); |
3764 | 4034 |
3765 // Skip on compact node DOMString getters. | 4035 // Skip on compact node DOMString getters. |
3766 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 4036 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
3767 | 4037 |
3768 // Prepare the value to be set. | 4038 // Prepare the value to be set. |
3769 V8StringResource<> cppValue = v8Value; | 4039 V8StringResource<> cppValue = v8Value; |
3770 if (!cppValue.Prepare()) | 4040 if (!cppValue.Prepare()) |
3771 return; | 4041 return; |
3772 | 4042 |
3773 impl->setAttribute(HTMLNames::urlstringattributeAttr, cppValue); | 4043 impl->setAttribute(HTMLNames::urlstringattributeAttr, cppValue); |
3774 } | 4044 } |
3775 | 4045 |
3776 static void urlStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8:
:Value>& info) { | 4046 static void urlStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8:
:Value>& info) { |
3777 v8::Local<v8::Object> holder = info.Holder(); | 4047 v8::Local<v8::Object> holder = info.Holder(); |
3778 | 4048 |
3779 TestObject* impl = V8TestObject::toImpl(holder); | 4049 TestObject* impl = V8TestObject::toImpl(holder); |
3780 | 4050 |
3781 V8SetReturnValueString(info, impl->GetURLAttribute(HTMLNames::reflectUrlAttrib
uteAttr), info.GetIsolate()); | 4051 V8SetReturnValueString(info, impl->GetURLAttribute(HTMLNames::reflectUrlAttrib
uteAttr), info.GetIsolate()); |
3782 } | 4052 } |
3783 | 4053 |
3784 static void urlStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, cons
t v8::FunctionCallbackInfo<v8::Value>& info) { | 4054 static void urlStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, cons
t v8::FunctionCallbackInfo<v8::Value>& info) { |
3785 v8::Isolate* isolate = info.GetIsolate(); | 4055 v8::Isolate* isolate = info.GetIsolate(); |
3786 ALLOW_UNUSED_LOCAL(isolate); | 4056 ALLOW_UNUSED_LOCAL(isolate); |
3787 | 4057 |
3788 v8::Local<v8::Object> holder = info.Holder(); | 4058 v8::Local<v8::Object> holder = info.Holder(); |
| 4059 ALLOW_UNUSED_LOCAL(holder); |
| 4060 |
3789 TestObject* impl = V8TestObject::toImpl(holder); | 4061 TestObject* impl = V8TestObject::toImpl(holder); |
3790 | 4062 |
3791 // Skip on compact node DOMString getters. | 4063 // Skip on compact node DOMString getters. |
3792 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 4064 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
3793 | 4065 |
3794 // Prepare the value to be set. | 4066 // Prepare the value to be set. |
3795 V8StringResource<> cppValue = v8Value; | 4067 V8StringResource<> cppValue = v8Value; |
3796 if (!cppValue.Prepare()) | 4068 if (!cppValue.Prepare()) |
3797 return; | 4069 return; |
3798 | 4070 |
3799 impl->setAttribute(HTMLNames::reflectUrlAttributeAttr, cppValue); | 4071 impl->setAttribute(HTMLNames::reflectUrlAttributeAttr, cppValue); |
3800 } | 4072 } |
3801 | 4073 |
3802 static void unforgeableLongAttributeAttributeGetter(const v8::FunctionCallbackIn
fo<v8::Value>& info) { | 4074 static void unforgeableLongAttributeAttributeGetter(const v8::FunctionCallbackIn
fo<v8::Value>& info) { |
3803 v8::Local<v8::Object> holder = info.Holder(); | 4075 v8::Local<v8::Object> holder = info.Holder(); |
3804 | 4076 |
3805 TestObject* impl = V8TestObject::toImpl(holder); | 4077 TestObject* impl = V8TestObject::toImpl(holder); |
3806 | 4078 |
3807 V8SetReturnValueInt(info, impl->unforgeableLongAttribute()); | 4079 V8SetReturnValueInt(info, impl->unforgeableLongAttribute()); |
3808 } | 4080 } |
3809 | 4081 |
3810 static void unforgeableLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value
, const v8::FunctionCallbackInfo<v8::Value>& info) { | 4082 static void unforgeableLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value
, const v8::FunctionCallbackInfo<v8::Value>& info) { |
3811 v8::Isolate* isolate = info.GetIsolate(); | 4083 v8::Isolate* isolate = info.GetIsolate(); |
3812 ALLOW_UNUSED_LOCAL(isolate); | 4084 ALLOW_UNUSED_LOCAL(isolate); |
3813 | 4085 |
3814 v8::Local<v8::Object> holder = info.Holder(); | 4086 v8::Local<v8::Object> holder = info.Holder(); |
| 4087 ALLOW_UNUSED_LOCAL(holder); |
| 4088 |
3815 TestObject* impl = V8TestObject::toImpl(holder); | 4089 TestObject* impl = V8TestObject::toImpl(holder); |
3816 | 4090 |
3817 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "unforgeableLongAttribute"); | 4091 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "unforgeableLongAttribute"); |
3818 | 4092 |
3819 // Prepare the value to be set. | 4093 // Prepare the value to be set. |
3820 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); | 4094 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); |
3821 if (exceptionState.HadException()) | 4095 if (exceptionState.HadException()) |
3822 return; | 4096 return; |
3823 | 4097 |
3824 impl->setUnforgeableLongAttribute(cppValue); | 4098 impl->setUnforgeableLongAttribute(cppValue); |
3825 } | 4099 } |
3826 | 4100 |
3827 static void measuredLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<
v8::Value>& info) { | 4101 static void measuredLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<
v8::Value>& info) { |
3828 v8::Local<v8::Object> holder = info.Holder(); | 4102 v8::Local<v8::Object> holder = info.Holder(); |
3829 | 4103 |
3830 TestObject* impl = V8TestObject::toImpl(holder); | 4104 TestObject* impl = V8TestObject::toImpl(holder); |
3831 | 4105 |
3832 V8SetReturnValueInt(info, impl->measuredLongAttribute()); | 4106 V8SetReturnValueInt(info, impl->measuredLongAttribute()); |
3833 } | 4107 } |
3834 | 4108 |
3835 static void measuredLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::FunctionCallbackInfo<v8::Value>& info) { | 4109 static void measuredLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::FunctionCallbackInfo<v8::Value>& info) { |
3836 v8::Isolate* isolate = info.GetIsolate(); | 4110 v8::Isolate* isolate = info.GetIsolate(); |
3837 ALLOW_UNUSED_LOCAL(isolate); | 4111 ALLOW_UNUSED_LOCAL(isolate); |
3838 | 4112 |
3839 v8::Local<v8::Object> holder = info.Holder(); | 4113 v8::Local<v8::Object> holder = info.Holder(); |
| 4114 ALLOW_UNUSED_LOCAL(holder); |
| 4115 |
3840 TestObject* impl = V8TestObject::toImpl(holder); | 4116 TestObject* impl = V8TestObject::toImpl(holder); |
3841 | 4117 |
3842 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "measuredLongAttribute"); | 4118 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "measuredLongAttribute"); |
3843 | 4119 |
3844 // Prepare the value to be set. | 4120 // Prepare the value to be set. |
3845 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); | 4121 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); |
3846 if (exceptionState.HadException()) | 4122 if (exceptionState.HadException()) |
3847 return; | 4123 return; |
3848 | 4124 |
3849 impl->setMeasuredLongAttribute(cppValue); | 4125 impl->setMeasuredLongAttribute(cppValue); |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3911 TestObject* impl = V8TestObject::toImpl(holder); | 4187 TestObject* impl = V8TestObject::toImpl(holder); |
3912 | 4188 |
3913 V8SetReturnValueInt(info, impl->unscopableLongAttribute()); | 4189 V8SetReturnValueInt(info, impl->unscopableLongAttribute()); |
3914 } | 4190 } |
3915 | 4191 |
3916 static void unscopableLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) { | 4192 static void unscopableLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) { |
3917 v8::Isolate* isolate = info.GetIsolate(); | 4193 v8::Isolate* isolate = info.GetIsolate(); |
3918 ALLOW_UNUSED_LOCAL(isolate); | 4194 ALLOW_UNUSED_LOCAL(isolate); |
3919 | 4195 |
3920 v8::Local<v8::Object> holder = info.Holder(); | 4196 v8::Local<v8::Object> holder = info.Holder(); |
| 4197 ALLOW_UNUSED_LOCAL(holder); |
| 4198 |
3921 TestObject* impl = V8TestObject::toImpl(holder); | 4199 TestObject* impl = V8TestObject::toImpl(holder); |
3922 | 4200 |
3923 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "unscopableLongAttribute"); | 4201 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "unscopableLongAttribute"); |
3924 | 4202 |
3925 // Prepare the value to be set. | 4203 // Prepare the value to be set. |
3926 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); | 4204 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); |
3927 if (exceptionState.HadException()) | 4205 if (exceptionState.HadException()) |
3928 return; | 4206 return; |
3929 | 4207 |
3930 impl->setUnscopableLongAttribute(cppValue); | 4208 impl->setUnscopableLongAttribute(cppValue); |
3931 } | 4209 } |
3932 | 4210 |
3933 static void unscopableOriginTrialEnabledLongAttributeAttributeGetter(const v8::F
unctionCallbackInfo<v8::Value>& info) { | 4211 static void unscopableOriginTrialEnabledLongAttributeAttributeGetter(const v8::F
unctionCallbackInfo<v8::Value>& info) { |
3934 v8::Local<v8::Object> holder = info.Holder(); | 4212 v8::Local<v8::Object> holder = info.Holder(); |
3935 | 4213 |
3936 TestObject* impl = V8TestObject::toImpl(holder); | 4214 TestObject* impl = V8TestObject::toImpl(holder); |
3937 | 4215 |
3938 V8SetReturnValueInt(info, impl->unscopableOriginTrialEnabledLongAttribute()); | 4216 V8SetReturnValueInt(info, impl->unscopableOriginTrialEnabledLongAttribute()); |
3939 } | 4217 } |
3940 | 4218 |
3941 static void unscopableOriginTrialEnabledLongAttributeAttributeSetter(v8::Local<v
8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { | 4219 static void unscopableOriginTrialEnabledLongAttributeAttributeSetter(v8::Local<v
8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { |
3942 v8::Isolate* isolate = info.GetIsolate(); | 4220 v8::Isolate* isolate = info.GetIsolate(); |
3943 ALLOW_UNUSED_LOCAL(isolate); | 4221 ALLOW_UNUSED_LOCAL(isolate); |
3944 | 4222 |
3945 v8::Local<v8::Object> holder = info.Holder(); | 4223 v8::Local<v8::Object> holder = info.Holder(); |
| 4224 ALLOW_UNUSED_LOCAL(holder); |
| 4225 |
3946 TestObject* impl = V8TestObject::toImpl(holder); | 4226 TestObject* impl = V8TestObject::toImpl(holder); |
3947 | 4227 |
3948 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "unscopableOriginTrialEnabledLongAttribute"); | 4228 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "unscopableOriginTrialEnabledLongAttribute"); |
3949 | 4229 |
3950 // Prepare the value to be set. | 4230 // Prepare the value to be set. |
3951 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); | 4231 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); |
3952 if (exceptionState.HadException()) | 4232 if (exceptionState.HadException()) |
3953 return; | 4233 return; |
3954 | 4234 |
3955 impl->setUnscopableOriginTrialEnabledLongAttribute(cppValue); | 4235 impl->setUnscopableOriginTrialEnabledLongAttribute(cppValue); |
3956 } | 4236 } |
3957 | 4237 |
3958 static void unscopableRuntimeEnabledLongAttributeAttributeGetter(const v8::Funct
ionCallbackInfo<v8::Value>& info) { | 4238 static void unscopableRuntimeEnabledLongAttributeAttributeGetter(const v8::Funct
ionCallbackInfo<v8::Value>& info) { |
3959 v8::Local<v8::Object> holder = info.Holder(); | 4239 v8::Local<v8::Object> holder = info.Holder(); |
3960 | 4240 |
3961 TestObject* impl = V8TestObject::toImpl(holder); | 4241 TestObject* impl = V8TestObject::toImpl(holder); |
3962 | 4242 |
3963 V8SetReturnValueInt(info, impl->unscopableRuntimeEnabledLongAttribute()); | 4243 V8SetReturnValueInt(info, impl->unscopableRuntimeEnabledLongAttribute()); |
3964 } | 4244 } |
3965 | 4245 |
3966 static void unscopableRuntimeEnabledLongAttributeAttributeSetter(v8::Local<v8::V
alue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { | 4246 static void unscopableRuntimeEnabledLongAttributeAttributeSetter(v8::Local<v8::V
alue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { |
3967 v8::Isolate* isolate = info.GetIsolate(); | 4247 v8::Isolate* isolate = info.GetIsolate(); |
3968 ALLOW_UNUSED_LOCAL(isolate); | 4248 ALLOW_UNUSED_LOCAL(isolate); |
3969 | 4249 |
3970 v8::Local<v8::Object> holder = info.Holder(); | 4250 v8::Local<v8::Object> holder = info.Holder(); |
| 4251 ALLOW_UNUSED_LOCAL(holder); |
| 4252 |
3971 TestObject* impl = V8TestObject::toImpl(holder); | 4253 TestObject* impl = V8TestObject::toImpl(holder); |
3972 | 4254 |
3973 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "unscopableRuntimeEnabledLongAttribute"); | 4255 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "unscopableRuntimeEnabledLongAttribute"); |
3974 | 4256 |
3975 // Prepare the value to be set. | 4257 // Prepare the value to be set. |
3976 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); | 4258 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); |
3977 if (exceptionState.HadException()) | 4259 if (exceptionState.HadException()) |
3978 return; | 4260 return; |
3979 | 4261 |
3980 impl->setUnscopableRuntimeEnabledLongAttribute(cppValue); | 4262 impl->setUnscopableRuntimeEnabledLongAttribute(cppValue); |
3981 } | 4263 } |
3982 | 4264 |
3983 static void testInterfaceAttributeAttributeGetter(const v8::FunctionCallbackInfo
<v8::Value>& info) { | 4265 static void testInterfaceAttributeAttributeGetter(const v8::FunctionCallbackInfo
<v8::Value>& info) { |
3984 v8::Local<v8::Object> holder = info.Holder(); | 4266 v8::Local<v8::Object> holder = info.Holder(); |
3985 | 4267 |
3986 TestObject* impl = V8TestObject::toImpl(holder); | 4268 TestObject* impl = V8TestObject::toImpl(holder); |
3987 | 4269 |
3988 V8SetReturnValueFast(info, WTF::GetPtr(impl->testInterfaceAttribute()), impl); | 4270 V8SetReturnValueFast(info, WTF::GetPtr(impl->testInterfaceAttribute()), impl); |
3989 } | 4271 } |
3990 | 4272 |
3991 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) { | 4273 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) { |
3992 v8::Isolate* isolate = info.GetIsolate(); | 4274 v8::Isolate* isolate = info.GetIsolate(); |
3993 ALLOW_UNUSED_LOCAL(isolate); | 4275 ALLOW_UNUSED_LOCAL(isolate); |
3994 | 4276 |
3995 v8::Local<v8::Object> holder = info.Holder(); | 4277 v8::Local<v8::Object> holder = info.Holder(); |
| 4278 ALLOW_UNUSED_LOCAL(holder); |
| 4279 |
3996 TestObject* impl = V8TestObject::toImpl(holder); | 4280 TestObject* impl = V8TestObject::toImpl(holder); |
3997 | 4281 |
3998 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "testInterfaceAttribute"); | 4282 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "testInterfaceAttribute"); |
3999 | 4283 |
4000 // Prepare the value to be set. | 4284 // Prepare the value to be set. |
4001 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck(i
nfo.GetIsolate(), v8Value); | 4285 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck(i
nfo.GetIsolate(), v8Value); |
4002 | 4286 |
4003 // Type check per: http://heycam.github.io/webidl/#es-interface | 4287 // Type check per: http://heycam.github.io/webidl/#es-interface |
4004 if (!cppValue) { | 4288 if (!cppValue) { |
4005 exceptionState.ThrowTypeError("The provided value is not of type 'TestInterf
ace'."); | 4289 exceptionState.ThrowTypeError("The provided value is not of type 'TestInterf
ace'."); |
4006 return; | 4290 return; |
4007 } | 4291 } |
4008 | 4292 |
4009 impl->setTestInterfaceAttribute(cppValue); | 4293 impl->setTestInterfaceAttribute(cppValue); |
4010 } | 4294 } |
4011 | 4295 |
4012 static void testInterfaceGarbageCollectedAttributeAttributeGetter(const v8::Func
tionCallbackInfo<v8::Value>& info) { | 4296 static void testInterfaceGarbageCollectedAttributeAttributeGetter(const v8::Func
tionCallbackInfo<v8::Value>& info) { |
4013 v8::Local<v8::Object> holder = info.Holder(); | 4297 v8::Local<v8::Object> holder = info.Holder(); |
4014 | 4298 |
4015 TestObject* impl = V8TestObject::toImpl(holder); | 4299 TestObject* impl = V8TestObject::toImpl(holder); |
4016 | 4300 |
4017 V8SetReturnValueFast(info, WTF::GetPtr(impl->testInterfaceGarbageCollectedAttr
ibute()), impl); | 4301 V8SetReturnValueFast(info, WTF::GetPtr(impl->testInterfaceGarbageCollectedAttr
ibute()), impl); |
4018 } | 4302 } |
4019 | 4303 |
4020 static void testInterfaceGarbageCollectedAttributeAttributeSetter(v8::Local<v8::
Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { | 4304 static void testInterfaceGarbageCollectedAttributeAttributeSetter(v8::Local<v8::
Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { |
4021 v8::Isolate* isolate = info.GetIsolate(); | 4305 v8::Isolate* isolate = info.GetIsolate(); |
4022 ALLOW_UNUSED_LOCAL(isolate); | 4306 ALLOW_UNUSED_LOCAL(isolate); |
4023 | 4307 |
4024 v8::Local<v8::Object> holder = info.Holder(); | 4308 v8::Local<v8::Object> holder = info.Holder(); |
| 4309 ALLOW_UNUSED_LOCAL(holder); |
| 4310 |
4025 TestObject* impl = V8TestObject::toImpl(holder); | 4311 TestObject* impl = V8TestObject::toImpl(holder); |
4026 | 4312 |
4027 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "testInterfaceGarbageCollectedAttribute"); | 4313 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "testInterfaceGarbageCollectedAttribute"); |
4028 | 4314 |
4029 // Prepare the value to be set. | 4315 // Prepare the value to be set. |
4030 TestInterfaceGarbageCollected* cppValue = V8TestInterfaceGarbageCollected::toI
mplWithTypeCheck(info.GetIsolate(), v8Value); | 4316 TestInterfaceGarbageCollected* cppValue = V8TestInterfaceGarbageCollected::toI
mplWithTypeCheck(info.GetIsolate(), v8Value); |
4031 | 4317 |
4032 // Type check per: http://heycam.github.io/webidl/#es-interface | 4318 // Type check per: http://heycam.github.io/webidl/#es-interface |
4033 if (!cppValue) { | 4319 if (!cppValue) { |
4034 exceptionState.ThrowTypeError("The provided value is not of type 'TestInterf
aceGarbageCollected'."); | 4320 exceptionState.ThrowTypeError("The provided value is not of type 'TestInterf
aceGarbageCollected'."); |
4035 return; | 4321 return; |
4036 } | 4322 } |
4037 | 4323 |
4038 impl->setTestInterfaceGarbageCollectedAttribute(cppValue); | 4324 impl->setTestInterfaceGarbageCollectedAttribute(cppValue); |
4039 } | 4325 } |
4040 | 4326 |
4041 static void testInterfaceGarbageCollectedOrNullAttributeAttributeGetter(const v8
::FunctionCallbackInfo<v8::Value>& info) { | 4327 static void testInterfaceGarbageCollectedOrNullAttributeAttributeGetter(const v8
::FunctionCallbackInfo<v8::Value>& info) { |
4042 v8::Local<v8::Object> holder = info.Holder(); | 4328 v8::Local<v8::Object> holder = info.Holder(); |
4043 | 4329 |
4044 TestObject* impl = V8TestObject::toImpl(holder); | 4330 TestObject* impl = V8TestObject::toImpl(holder); |
4045 | 4331 |
4046 V8SetReturnValueFast(info, WTF::GetPtr(impl->testInterfaceGarbageCollectedOrNu
llAttribute()), impl); | 4332 V8SetReturnValueFast(info, WTF::GetPtr(impl->testInterfaceGarbageCollectedOrNu
llAttribute()), impl); |
4047 } | 4333 } |
4048 | 4334 |
4049 static void testInterfaceGarbageCollectedOrNullAttributeAttributeSetter(v8::Loca
l<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { | 4335 static void testInterfaceGarbageCollectedOrNullAttributeAttributeSetter(v8::Loca
l<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { |
4050 v8::Isolate* isolate = info.GetIsolate(); | 4336 v8::Isolate* isolate = info.GetIsolate(); |
4051 ALLOW_UNUSED_LOCAL(isolate); | 4337 ALLOW_UNUSED_LOCAL(isolate); |
4052 | 4338 |
4053 v8::Local<v8::Object> holder = info.Holder(); | 4339 v8::Local<v8::Object> holder = info.Holder(); |
| 4340 ALLOW_UNUSED_LOCAL(holder); |
| 4341 |
4054 TestObject* impl = V8TestObject::toImpl(holder); | 4342 TestObject* impl = V8TestObject::toImpl(holder); |
4055 | 4343 |
4056 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "testInterfaceGarbageCollectedOrNullAttribute"); | 4344 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "testInterfaceGarbageCollectedOrNullAttribute"); |
4057 | 4345 |
4058 // Prepare the value to be set. | 4346 // Prepare the value to be set. |
4059 TestInterfaceGarbageCollected* cppValue = V8TestInterfaceGarbageCollected::toI
mplWithTypeCheck(info.GetIsolate(), v8Value); | 4347 TestInterfaceGarbageCollected* cppValue = V8TestInterfaceGarbageCollected::toI
mplWithTypeCheck(info.GetIsolate(), v8Value); |
4060 | 4348 |
4061 // Type check per: http://heycam.github.io/webidl/#es-interface | 4349 // Type check per: http://heycam.github.io/webidl/#es-interface |
4062 if (!cppValue && !IsUndefinedOrNull(v8Value)) { | 4350 if (!cppValue && !IsUndefinedOrNull(v8Value)) { |
4063 exceptionState.ThrowTypeError("The provided value is not of type 'TestInterf
aceGarbageCollected'."); | 4351 exceptionState.ThrowTypeError("The provided value is not of type 'TestInterf
aceGarbageCollected'."); |
(...skipping 8411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12475 unscopables->CreateDataProperty(context, V8AtomicString(isolate, "unscopable
RuntimeEnabledLongAttribute"), v8::True(isolate)).FromJust(); | 12763 unscopables->CreateDataProperty(context, V8AtomicString(isolate, "unscopable
RuntimeEnabledLongAttribute"), v8::True(isolate)).FromJust(); |
12476 } | 12764 } |
12477 if (RuntimeEnabledFeatures::featureNameEnabled()) { | 12765 if (RuntimeEnabledFeatures::featureNameEnabled()) { |
12478 unscopables->CreateDataProperty(context, V8AtomicString(isolate, "unscopable
RuntimeEnabledVoidMethod"), v8::True(isolate)).FromJust(); | 12766 unscopables->CreateDataProperty(context, V8AtomicString(isolate, "unscopable
RuntimeEnabledVoidMethod"), v8::True(isolate)).FromJust(); |
12479 } | 12767 } |
12480 unscopables->CreateDataProperty(context, V8AtomicString(isolate, "unscopableVo
idMethod"), v8::True(isolate)).FromJust(); | 12768 unscopables->CreateDataProperty(context, V8AtomicString(isolate, "unscopableVo
idMethod"), v8::True(isolate)).FromJust(); |
12481 prototypeObject->CreateDataProperty(context, unscopablesSymbol, unscopables).F
romJust(); | 12769 prototypeObject->CreateDataProperty(context, unscopablesSymbol, unscopables).F
romJust(); |
12482 } | 12770 } |
12483 | 12771 |
12484 } // namespace blink | 12772 } // namespace blink |
OLD | NEW |