Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Side by Side Diff: Source/bindings/tests/results/V8TestObject.cpp

Issue 99083002: WIP: Migrate generated bindings to new ExceptionState constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: MessagePort. Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 172
173 static void staticStringAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 173 static void staticStringAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
174 { 174 {
175 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 175 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
176 TestObjV8Internal::staticStringAttrAttributeGetter(info); 176 TestObjV8Internal::staticStringAttrAttributeGetter(info);
177 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 177 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
178 } 178 }
179 179
180 static void staticStringAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 180 static void staticStringAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
181 { 181 {
182 ExceptionState exceptionState(ExceptionState::SetterContext, "staticStringAt tr", "TestObject", info.Holder(), info.GetIsolate());
182 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); 183 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
183 TestObj::setStaticStringAttr(cppValue); 184 TestObj::setStaticStringAttr(cppValue);
184 } 185 }
185 186
186 static void staticStringAttrAttributeSetterCallback(v8::Local<v8::String>, v8::L ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 187 static void staticStringAttrAttributeSetterCallback(v8::Local<v8::String>, v8::L ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
187 { 188 {
188 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 189 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
189 TestObjV8Internal::staticStringAttrAttributeSetter(jsValue, info); 190 TestObjV8Internal::staticStringAttrAttributeSetter(jsValue, info);
190 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 191 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
191 } 192 }
192 193
193 static void enumAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& i nfo) 194 static void enumAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& i nfo)
194 { 195 {
195 TestObj* imp = V8TestObject::toNative(info.Holder()); 196 TestObj* imp = V8TestObject::toNative(info.Holder());
196 v8SetReturnValueString(info, imp->enumAttr(), info.GetIsolate()); 197 v8SetReturnValueString(info, imp->enumAttr(), info.GetIsolate());
197 } 198 }
198 199
199 static void enumAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro pertyCallbackInfo<v8::Value>& info) 200 static void enumAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro pertyCallbackInfo<v8::Value>& info)
200 { 201 {
201 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 202 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
202 TestObjV8Internal::enumAttrAttributeGetter(info); 203 TestObjV8Internal::enumAttrAttributeGetter(info);
203 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 204 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
204 } 205 }
205 206
206 static void enumAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Prop ertyCallbackInfo<void>& info) 207 static void enumAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Prop ertyCallbackInfo<void>& info)
207 { 208 {
209 ExceptionState exceptionState(ExceptionState::SetterContext, "enumAttr", "Te stObject", info.Holder(), info.GetIsolate());
208 TestObj* imp = V8TestObject::toNative(info.Holder()); 210 TestObj* imp = V8TestObject::toNative(info.Holder());
209 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); 211 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
210 String string = cppValue; 212 String string = cppValue;
211 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st ring == "EnumValue3")) 213 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st ring == "EnumValue3"))
212 return; 214 return;
213 imp->setEnumAttr(cppValue); 215 imp->setEnumAttr(cppValue);
214 } 216 }
215 217
216 static void enumAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8: :Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 218 static void enumAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8: :Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
217 { 219 {
(...skipping 23 matching lines...) Expand all
241 243
242 static void byteAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro pertyCallbackInfo<v8::Value>& info) 244 static void byteAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro pertyCallbackInfo<v8::Value>& info)
243 { 245 {
244 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 246 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
245 TestObjV8Internal::byteAttrAttributeGetter(info); 247 TestObjV8Internal::byteAttrAttributeGetter(info);
246 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 248 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
247 } 249 }
248 250
249 static void byteAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Prop ertyCallbackInfo<void>& info) 251 static void byteAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Prop ertyCallbackInfo<void>& info)
250 { 252 {
253 ExceptionState exceptionState(ExceptionState::SetterContext, "byteAttr", "Te stObject", info.Holder(), info.GetIsolate());
251 TestObj* imp = V8TestObject::toNative(info.Holder()); 254 TestObj* imp = V8TestObject::toNative(info.Holder());
252 V8TRYCATCH_VOID(int, cppValue, toInt8(jsValue)); 255 V8TRYCATCH_VOID(int, cppValue, toInt8(jsValue));
253 imp->setByteAttr(cppValue); 256 imp->setByteAttr(cppValue);
254 } 257 }
255 258
256 static void byteAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8: :Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 259 static void byteAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8: :Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
257 { 260 {
258 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 261 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
259 TestObjV8Internal::byteAttrAttributeSetter(jsValue, info); 262 TestObjV8Internal::byteAttrAttributeSetter(jsValue, info);
260 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 263 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
261 } 264 }
262 265
263 static void octetAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) 266 static void octetAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
264 { 267 {
265 TestObj* imp = V8TestObject::toNative(info.Holder()); 268 TestObj* imp = V8TestObject::toNative(info.Holder());
266 v8SetReturnValueUnsigned(info, imp->octetAttr()); 269 v8SetReturnValueUnsigned(info, imp->octetAttr());
267 } 270 }
268 271
269 static void octetAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pr opertyCallbackInfo<v8::Value>& info) 272 static void octetAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pr opertyCallbackInfo<v8::Value>& info)
270 { 273 {
271 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 274 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
272 TestObjV8Internal::octetAttrAttributeGetter(info); 275 TestObjV8Internal::octetAttrAttributeGetter(info);
273 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 276 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
274 } 277 }
275 278
276 static void octetAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pro pertyCallbackInfo<void>& info) 279 static void octetAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pro pertyCallbackInfo<void>& info)
277 { 280 {
281 ExceptionState exceptionState(ExceptionState::SetterContext, "octetAttr", "T estObject", info.Holder(), info.GetIsolate());
278 TestObj* imp = V8TestObject::toNative(info.Holder()); 282 TestObj* imp = V8TestObject::toNative(info.Holder());
279 V8TRYCATCH_VOID(unsigned, cppValue, toUInt8(jsValue)); 283 V8TRYCATCH_VOID(unsigned, cppValue, toUInt8(jsValue));
280 imp->setOctetAttr(cppValue); 284 imp->setOctetAttr(cppValue);
281 } 285 }
282 286
283 static void octetAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8 ::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 287 static void octetAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8 ::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
284 { 288 {
285 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 289 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
286 TestObjV8Internal::octetAttrAttributeSetter(jsValue, info); 290 TestObjV8Internal::octetAttrAttributeSetter(jsValue, info);
287 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 291 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
288 } 292 }
289 293
290 static void shortAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) 294 static void shortAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
291 { 295 {
292 TestObj* imp = V8TestObject::toNative(info.Holder()); 296 TestObj* imp = V8TestObject::toNative(info.Holder());
293 v8SetReturnValueInt(info, imp->shortAttr()); 297 v8SetReturnValueInt(info, imp->shortAttr());
294 } 298 }
295 299
296 static void shortAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pr opertyCallbackInfo<v8::Value>& info) 300 static void shortAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pr opertyCallbackInfo<v8::Value>& info)
297 { 301 {
298 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 302 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
299 TestObjV8Internal::shortAttrAttributeGetter(info); 303 TestObjV8Internal::shortAttrAttributeGetter(info);
300 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 304 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
301 } 305 }
302 306
303 static void shortAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pro pertyCallbackInfo<void>& info) 307 static void shortAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pro pertyCallbackInfo<void>& info)
304 { 308 {
309 ExceptionState exceptionState(ExceptionState::SetterContext, "shortAttr", "T estObject", info.Holder(), info.GetIsolate());
305 TestObj* imp = V8TestObject::toNative(info.Holder()); 310 TestObj* imp = V8TestObject::toNative(info.Holder());
306 V8TRYCATCH_VOID(int, cppValue, toInt16(jsValue)); 311 V8TRYCATCH_VOID(int, cppValue, toInt16(jsValue));
307 imp->setShortAttr(cppValue); 312 imp->setShortAttr(cppValue);
308 } 313 }
309 314
310 static void shortAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8 ::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 315 static void shortAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8 ::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
311 { 316 {
312 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 317 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
313 TestObjV8Internal::shortAttrAttributeSetter(jsValue, info); 318 TestObjV8Internal::shortAttrAttributeSetter(jsValue, info);
314 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 319 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
315 } 320 }
316 321
317 static void unsignedShortAttrAttributeGetter(const v8::PropertyCallbackInfo<v8:: Value>& info) 322 static void unsignedShortAttrAttributeGetter(const v8::PropertyCallbackInfo<v8:: Value>& info)
318 { 323 {
319 TestObj* imp = V8TestObject::toNative(info.Holder()); 324 TestObj* imp = V8TestObject::toNative(info.Holder());
320 v8SetReturnValueUnsigned(info, imp->unsignedShortAttr()); 325 v8SetReturnValueUnsigned(info, imp->unsignedShortAttr());
321 } 326 }
322 327
323 static void unsignedShortAttrAttributeGetterCallback(v8::Local<v8::String>, cons t v8::PropertyCallbackInfo<v8::Value>& info) 328 static void unsignedShortAttrAttributeGetterCallback(v8::Local<v8::String>, cons t v8::PropertyCallbackInfo<v8::Value>& info)
324 { 329 {
325 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 330 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
326 TestObjV8Internal::unsignedShortAttrAttributeGetter(info); 331 TestObjV8Internal::unsignedShortAttrAttributeGetter(info);
327 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 332 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
328 } 333 }
329 334
330 static void unsignedShortAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 335 static void unsignedShortAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
331 { 336 {
337 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedShortA ttr", "TestObject", info.Holder(), info.GetIsolate());
332 TestObj* imp = V8TestObject::toNative(info.Holder()); 338 TestObj* imp = V8TestObject::toNative(info.Holder());
333 V8TRYCATCH_VOID(unsigned, cppValue, toUInt16(jsValue)); 339 V8TRYCATCH_VOID(unsigned, cppValue, toUInt16(jsValue));
334 imp->setUnsignedShortAttr(cppValue); 340 imp->setUnsignedShortAttr(cppValue);
335 } 341 }
336 342
337 static void unsignedShortAttrAttributeSetterCallback(v8::Local<v8::String>, v8:: Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 343 static void unsignedShortAttrAttributeSetterCallback(v8::Local<v8::String>, v8:: Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
338 { 344 {
339 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 345 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
340 TestObjV8Internal::unsignedShortAttrAttributeSetter(jsValue, info); 346 TestObjV8Internal::unsignedShortAttrAttributeSetter(jsValue, info);
341 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 347 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
342 } 348 }
343 349
344 static void longAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& i nfo) 350 static void longAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& i nfo)
345 { 351 {
346 TestObj* imp = V8TestObject::toNative(info.Holder()); 352 TestObj* imp = V8TestObject::toNative(info.Holder());
347 v8SetReturnValueInt(info, imp->longAttr()); 353 v8SetReturnValueInt(info, imp->longAttr());
348 } 354 }
349 355
350 static void longAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro pertyCallbackInfo<v8::Value>& info) 356 static void longAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro pertyCallbackInfo<v8::Value>& info)
351 { 357 {
352 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 358 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
353 TestObjV8Internal::longAttrAttributeGetter(info); 359 TestObjV8Internal::longAttrAttributeGetter(info);
354 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 360 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
355 } 361 }
356 362
357 static void longAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Prop ertyCallbackInfo<void>& info) 363 static void longAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Prop ertyCallbackInfo<void>& info)
358 { 364 {
365 ExceptionState exceptionState(ExceptionState::SetterContext, "longAttr", "Te stObject", info.Holder(), info.GetIsolate());
359 TestObj* imp = V8TestObject::toNative(info.Holder()); 366 TestObj* imp = V8TestObject::toNative(info.Holder());
360 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 367 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue));
361 imp->setLongAttr(cppValue); 368 imp->setLongAttr(cppValue);
362 } 369 }
363 370
364 static void longAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8: :Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 371 static void longAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8: :Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
365 { 372 {
366 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 373 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
367 TestObjV8Internal::longAttrAttributeSetter(jsValue, info); 374 TestObjV8Internal::longAttrAttributeSetter(jsValue, info);
368 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 375 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
369 } 376 }
370 377
371 static void longLongAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value >& info) 378 static void longLongAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value >& info)
372 { 379 {
373 TestObj* imp = V8TestObject::toNative(info.Holder()); 380 TestObj* imp = V8TestObject::toNative(info.Holder());
374 v8SetReturnValue(info, static_cast<double>(imp->longLongAttr())); 381 v8SetReturnValue(info, static_cast<double>(imp->longLongAttr()));
375 } 382 }
376 383
377 static void longLongAttrAttributeGetterCallback(v8::Local<v8::String>, const v8: :PropertyCallbackInfo<v8::Value>& info) 384 static void longLongAttrAttributeGetterCallback(v8::Local<v8::String>, const v8: :PropertyCallbackInfo<v8::Value>& info)
378 { 385 {
379 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 386 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
380 TestObjV8Internal::longLongAttrAttributeGetter(info); 387 TestObjV8Internal::longLongAttrAttributeGetter(info);
381 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 388 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
382 } 389 }
383 390
384 static void longLongAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8:: PropertyCallbackInfo<void>& info) 391 static void longLongAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8:: PropertyCallbackInfo<void>& info)
385 { 392 {
393 ExceptionState exceptionState(ExceptionState::SetterContext, "longLongAttr", "TestObject", info.Holder(), info.GetIsolate());
386 TestObj* imp = V8TestObject::toNative(info.Holder()); 394 TestObj* imp = V8TestObject::toNative(info.Holder());
387 V8TRYCATCH_VOID(long long, cppValue, toInt64(jsValue)); 395 V8TRYCATCH_VOID(long long, cppValue, toInt64(jsValue));
388 imp->setLongLongAttr(cppValue); 396 imp->setLongLongAttr(cppValue);
389 } 397 }
390 398
391 static void longLongAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local <v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 399 static void longLongAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local <v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
392 { 400 {
393 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 401 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
394 TestObjV8Internal::longLongAttrAttributeSetter(jsValue, info); 402 TestObjV8Internal::longLongAttrAttributeSetter(jsValue, info);
395 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 403 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
396 } 404 }
397 405
398 static void unsignedLongLongAttrAttributeGetter(const v8::PropertyCallbackInfo<v 8::Value>& info) 406 static void unsignedLongLongAttrAttributeGetter(const v8::PropertyCallbackInfo<v 8::Value>& info)
399 { 407 {
400 TestObj* imp = V8TestObject::toNative(info.Holder()); 408 TestObj* imp = V8TestObject::toNative(info.Holder());
401 v8SetReturnValue(info, static_cast<double>(imp->unsignedLongLongAttr())); 409 v8SetReturnValue(info, static_cast<double>(imp->unsignedLongLongAttr()));
402 } 410 }
403 411
404 static void unsignedLongLongAttrAttributeGetterCallback(v8::Local<v8::String>, c onst v8::PropertyCallbackInfo<v8::Value>& info) 412 static void unsignedLongLongAttrAttributeGetterCallback(v8::Local<v8::String>, c onst v8::PropertyCallbackInfo<v8::Value>& info)
405 { 413 {
406 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 414 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
407 TestObjV8Internal::unsignedLongLongAttrAttributeGetter(info); 415 TestObjV8Internal::unsignedLongLongAttrAttributeGetter(info);
408 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 416 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
409 } 417 }
410 418
411 static void unsignedLongLongAttrAttributeSetter(v8::Local<v8::Value> jsValue, co nst v8::PropertyCallbackInfo<void>& info) 419 static void unsignedLongLongAttrAttributeSetter(v8::Local<v8::Value> jsValue, co nst v8::PropertyCallbackInfo<void>& info)
412 { 420 {
421 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedLongLo ngAttr", "TestObject", info.Holder(), info.GetIsolate());
413 TestObj* imp = V8TestObject::toNative(info.Holder()); 422 TestObj* imp = V8TestObject::toNative(info.Holder());
414 V8TRYCATCH_VOID(unsigned long long, cppValue, toUInt64(jsValue)); 423 V8TRYCATCH_VOID(unsigned long long, cppValue, toUInt64(jsValue));
415 imp->setUnsignedLongLongAttr(cppValue); 424 imp->setUnsignedLongLongAttr(cppValue);
416 } 425 }
417 426
418 static void unsignedLongLongAttrAttributeSetterCallback(v8::Local<v8::String>, v 8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 427 static void unsignedLongLongAttrAttributeSetterCallback(v8::Local<v8::String>, v 8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
419 { 428 {
420 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 429 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
421 TestObjV8Internal::unsignedLongLongAttrAttributeSetter(jsValue, info); 430 TestObjV8Internal::unsignedLongLongAttrAttributeSetter(jsValue, info);
422 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 431 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
423 } 432 }
424 433
425 static void stringAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) 434 static void stringAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
426 { 435 {
427 TestObj* imp = V8TestObject::toNative(info.Holder()); 436 TestObj* imp = V8TestObject::toNative(info.Holder());
428 v8SetReturnValueString(info, imp->stringAttr(), info.GetIsolate()); 437 v8SetReturnValueString(info, imp->stringAttr(), info.GetIsolate());
429 } 438 }
430 439
431 static void stringAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::P ropertyCallbackInfo<v8::Value>& info) 440 static void stringAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::P ropertyCallbackInfo<v8::Value>& info)
432 { 441 {
433 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 442 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
434 TestObjV8Internal::stringAttrAttributeGetter(info); 443 TestObjV8Internal::stringAttrAttributeGetter(info);
435 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 444 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
436 } 445 }
437 446
438 static void stringAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pr opertyCallbackInfo<void>& info) 447 static void stringAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pr opertyCallbackInfo<void>& info)
439 { 448 {
449 ExceptionState exceptionState(ExceptionState::SetterContext, "stringAttr", " TestObject", info.Holder(), info.GetIsolate());
440 TestObj* imp = V8TestObject::toNative(info.Holder()); 450 TestObj* imp = V8TestObject::toNative(info.Holder());
441 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); 451 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
442 imp->setStringAttr(cppValue); 452 imp->setStringAttr(cppValue);
443 } 453 }
444 454
445 static void stringAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v 8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 455 static void stringAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v 8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
446 { 456 {
447 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 457 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
448 TestObjV8Internal::stringAttrAttributeSetter(jsValue, info); 458 TestObjV8Internal::stringAttrAttributeSetter(jsValue, info);
449 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 459 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
450 } 460 }
451 461
452 static void eventHandlerAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::V alue>& info) 462 static void eventHandlerAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::V alue>& info)
453 { 463 {
454 TestObj* imp = V8TestObject::toNative(info.Holder()); 464 TestObj* imp = V8TestObject::toNative(info.Holder());
455 EventListener* jsValue = imp->eventHandlerAttr(isolatedWorldForIsolate(info. GetIsolate())); 465 EventListener* jsValue = imp->eventHandlerAttr(isolatedWorldForIsolate(info. GetIsolate()));
456 v8SetReturnValue(info, jsValue ? v8::Handle<v8::Value>(V8AbstractEventListen er::cast(jsValue)->getListenerObject(imp->executionContext())) : v8::Handle<v8:: Value>(v8::Null(info.GetIsolate()))); 466 v8SetReturnValue(info, jsValue ? v8::Handle<v8::Value>(V8AbstractEventListen er::cast(jsValue)->getListenerObject(imp->executionContext())) : v8::Handle<v8:: Value>(v8::Null(info.GetIsolate())));
457 } 467 }
458 468
459 static void eventHandlerAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 469 static void eventHandlerAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
460 { 470 {
461 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 471 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
462 TestObjV8Internal::eventHandlerAttrAttributeGetter(info); 472 TestObjV8Internal::eventHandlerAttrAttributeGetter(info);
463 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 473 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
464 } 474 }
465 475
466 static void eventHandlerAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 476 static void eventHandlerAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
467 { 477 {
478 ExceptionState exceptionState(ExceptionState::SetterContext, "eventHandlerAt tr", "TestObject", info.Holder(), info.GetIsolate());
468 TestObj* imp = V8TestObject::toNative(info.Holder()); 479 TestObj* imp = V8TestObject::toNative(info.Holder());
469 transferHiddenDependency(info.Holder(), imp->eventHandlerAttr(isolatedWorldF orIsolate(info.GetIsolate())), jsValue, V8TestObject::eventListenerCacheIndex, i nfo.GetIsolate()); 480 transferHiddenDependency(info.Holder(), imp->eventHandlerAttr(isolatedWorldF orIsolate(info.GetIsolate())), jsValue, V8TestObject::eventListenerCacheIndex, i nfo.GetIsolate());
470 imp->setEventHandlerAttr(V8EventListenerList::getEventListener(jsValue, true , ListenerFindOrCreate), isolatedWorldForIsolate(info.GetIsolate())); 481 imp->setEventHandlerAttr(V8EventListenerList::getEventListener(jsValue, true , ListenerFindOrCreate), isolatedWorldForIsolate(info.GetIsolate()));
471 } 482 }
472 483
473 static void eventHandlerAttrAttributeSetterCallback(v8::Local<v8::String>, v8::L ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 484 static void eventHandlerAttrAttributeSetterCallback(v8::Local<v8::String>, v8::L ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
474 { 485 {
475 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 486 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
476 TestObjV8Internal::eventHandlerAttrAttributeSetter(jsValue, info); 487 TestObjV8Internal::eventHandlerAttrAttributeSetter(jsValue, info);
477 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 488 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
478 } 489 }
479 490
480 static void testObjAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value> & info) 491 static void testObjAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value> & info)
481 { 492 {
482 TestObj* imp = V8TestObject::toNative(info.Holder()); 493 TestObj* imp = V8TestObject::toNative(info.Holder());
483 v8SetReturnValueFast(info, imp->testObjAttr(), imp); 494 v8SetReturnValueFast(info, imp->testObjAttr(), imp);
484 } 495 }
485 496
486 static void testObjAttrAttributeGetterCallback(v8::Local<v8::String>, const v8:: PropertyCallbackInfo<v8::Value>& info) 497 static void testObjAttrAttributeGetterCallback(v8::Local<v8::String>, const v8:: PropertyCallbackInfo<v8::Value>& info)
487 { 498 {
488 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 499 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
489 UseCounter::count(activeDOMWindow(), UseCounter::TestFeature); 500 UseCounter::count(activeDOMWindow(), UseCounter::TestFeature);
490 TestObjV8Internal::testObjAttrAttributeGetter(info); 501 TestObjV8Internal::testObjAttrAttributeGetter(info);
491 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 502 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
492 } 503 }
493 504
494 static void testObjAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::P ropertyCallbackInfo<void>& info) 505 static void testObjAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::P ropertyCallbackInfo<void>& info)
495 { 506 {
507 ExceptionState exceptionState(ExceptionState::SetterContext, "testObjAttr", "TestObject", info.Holder(), info.GetIsolate());
496 TestObj* imp = V8TestObject::toNative(info.Holder()); 508 TestObj* imp = V8TestObject::toNative(info.Holder());
497 V8TRYCATCH_VOID(TestObj*, cppValue, V8TestObject::hasInstance(jsValue, info. GetIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle< v8::Object>::Cast(jsValue)) : 0); 509 V8TRYCATCH_VOID(TestObj*, cppValue, V8TestObject::hasInstance(jsValue, info. GetIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle< v8::Object>::Cast(jsValue)) : 0);
498 imp->setTestObjAttr(WTF::getPtr(cppValue)); 510 imp->setTestObjAttr(WTF::getPtr(cppValue));
499 } 511 }
500 512
501 static void testObjAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local< v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 513 static void testObjAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local< v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
502 { 514 {
503 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 515 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
504 UseCounter::count(activeDOMWindow(), UseCounter::TestFeature); 516 UseCounter::count(activeDOMWindow(), UseCounter::TestFeature);
505 TestObjV8Internal::testObjAttrAttributeSetter(jsValue, info); 517 TestObjV8Internal::testObjAttrAttributeSetter(jsValue, info);
506 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 518 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
507 } 519 }
508 520
509 static void attrWithJSGetterAndSetterAttributeGetter(const v8::FunctionCallbackI nfo<v8::Value>& info) 521 static void attrWithJSGetterAndSetterAttributeGetter(const v8::FunctionCallbackI nfo<v8::Value>& info)
510 { 522 {
511 TestObj* imp = V8TestObject::toNative(info.Holder()); 523 TestObj* imp = V8TestObject::toNative(info.Holder());
512 v8SetReturnValueString(info, imp->attrWithJSGetterAndSetter(), info.GetIsola te()); 524 v8SetReturnValueString(info, imp->attrWithJSGetterAndSetter(), info.GetIsola te());
513 } 525 }
514 526
515 static void attrWithJSGetterAndSetterAttributeGetterCallback(const v8::FunctionC allbackInfo<v8::Value>& info) 527 static void attrWithJSGetterAndSetterAttributeGetterCallback(const v8::FunctionC allbackInfo<v8::Value>& info)
516 { 528 {
517 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 529 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
518 TestObjV8Internal::attrWithJSGetterAndSetterAttributeGetter(info); 530 TestObjV8Internal::attrWithJSGetterAndSetterAttributeGetter(info);
519 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 531 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
520 } 532 }
521 533
522 static void attrWithJSGetterAndSetterAttributeSetter(v8::Local<v8::Value> jsValu e, const v8::FunctionCallbackInfo<v8::Value>& info) 534 static void attrWithJSGetterAndSetterAttributeSetter(v8::Local<v8::Value> jsValu e, const v8::FunctionCallbackInfo<v8::Value>& info)
523 { 535 {
536 ExceptionState exceptionState(ExceptionState::SetterContext, "attrWithJSGett erAndSetter", "TestObject", info.Holder(), info.GetIsolate());
524 TestObj* imp = V8TestObject::toNative(info.Holder()); 537 TestObj* imp = V8TestObject::toNative(info.Holder());
525 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); 538 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
526 imp->setAttrWithJSGetterAndSetter(cppValue); 539 imp->setAttrWithJSGetterAndSetter(cppValue);
527 } 540 }
528 541
529 static void attrWithJSGetterAndSetterAttributeSetterCallback(const v8::FunctionC allbackInfo<v8::Value>& info) 542 static void attrWithJSGetterAndSetterAttributeSetterCallback(const v8::FunctionC allbackInfo<v8::Value>& info)
530 { 543 {
531 v8::Local<v8::Value> jsValue = info[0]; 544 v8::Local<v8::Value> jsValue = info[0];
532 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 545 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
533 TestObjV8Internal::attrWithJSGetterAndSetterAttributeSetter(jsValue, info); 546 TestObjV8Internal::attrWithJSGetterAndSetterAttributeSetter(jsValue, info);
534 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 547 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
535 } 548 }
536 549
537 static void XMLObjAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) 550 static void XMLObjAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
538 { 551 {
539 TestObj* imp = V8TestObject::toNative(info.Holder()); 552 TestObj* imp = V8TestObject::toNative(info.Holder());
540 v8SetReturnValueFast(info, imp->xmlObjAttr(), imp); 553 v8SetReturnValueFast(info, imp->xmlObjAttr(), imp);
541 } 554 }
542 555
543 static void XMLObjAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::P ropertyCallbackInfo<v8::Value>& info) 556 static void XMLObjAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::P ropertyCallbackInfo<v8::Value>& info)
544 { 557 {
545 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 558 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
546 TestObjV8Internal::XMLObjAttrAttributeGetter(info); 559 TestObjV8Internal::XMLObjAttrAttributeGetter(info);
547 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 560 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
548 } 561 }
549 562
550 static void XMLObjAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pr opertyCallbackInfo<void>& info) 563 static void XMLObjAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pr opertyCallbackInfo<void>& info)
551 { 564 {
565 ExceptionState exceptionState(ExceptionState::SetterContext, "XMLObjAttr", " TestObject", info.Holder(), info.GetIsolate());
552 TestObj* imp = V8TestObject::toNative(info.Holder()); 566 TestObj* imp = V8TestObject::toNative(info.Holder());
553 V8TRYCATCH_VOID(TestObj*, cppValue, V8TestObject::hasInstance(jsValue, info. GetIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle< v8::Object>::Cast(jsValue)) : 0); 567 V8TRYCATCH_VOID(TestObj*, cppValue, V8TestObject::hasInstance(jsValue, info. GetIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle< v8::Object>::Cast(jsValue)) : 0);
554 imp->setXMLObjAttr(WTF::getPtr(cppValue)); 568 imp->setXMLObjAttr(WTF::getPtr(cppValue));
555 } 569 }
556 570
557 static void XMLObjAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v 8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 571 static void XMLObjAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v 8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
558 { 572 {
559 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 573 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
560 TestObjV8Internal::XMLObjAttrAttributeSetter(jsValue, info); 574 TestObjV8Internal::XMLObjAttrAttributeSetter(jsValue, info);
561 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 575 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
562 } 576 }
563 577
564 static void createAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& inf o) 578 static void createAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& inf o)
565 { 579 {
566 TestObj* imp = V8TestObject::toNative(info.Holder()); 580 TestObj* imp = V8TestObject::toNative(info.Holder());
567 v8SetReturnValueBool(info, imp->isCreate()); 581 v8SetReturnValueBool(info, imp->isCreate());
568 } 582 }
569 583
570 static void createAttributeGetterCallback(v8::Local<v8::String>, const v8::Prope rtyCallbackInfo<v8::Value>& info) 584 static void createAttributeGetterCallback(v8::Local<v8::String>, const v8::Prope rtyCallbackInfo<v8::Value>& info)
571 { 585 {
572 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 586 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
573 TestObjV8Internal::createAttributeGetter(info); 587 TestObjV8Internal::createAttributeGetter(info);
574 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 588 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
575 } 589 }
576 590
577 static void createAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Proper tyCallbackInfo<void>& info) 591 static void createAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Proper tyCallbackInfo<void>& info)
578 { 592 {
593 ExceptionState exceptionState(ExceptionState::SetterContext, "create", "Test Object", info.Holder(), info.GetIsolate());
579 TestObj* imp = V8TestObject::toNative(info.Holder()); 594 TestObj* imp = V8TestObject::toNative(info.Holder());
580 V8TRYCATCH_VOID(bool, cppValue, jsValue->BooleanValue()); 595 V8TRYCATCH_VOID(bool, cppValue, jsValue->BooleanValue());
581 imp->setCreate(cppValue); 596 imp->setCreate(cppValue);
582 } 597 }
583 598
584 static void createAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::V alue> jsValue, const v8::PropertyCallbackInfo<void>& info) 599 static void createAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::V alue> jsValue, const v8::PropertyCallbackInfo<void>& info)
585 { 600 {
586 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 601 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
587 TestObjV8Internal::createAttributeSetter(jsValue, info); 602 TestObjV8Internal::createAttributeSetter(jsValue, info);
588 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 603 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
589 } 604 }
590 605
591 static void reflectedStringAttrAttributeGetter(const v8::PropertyCallbackInfo<v8 ::Value>& info) 606 static void reflectedStringAttrAttributeGetter(const v8::PropertyCallbackInfo<v8 ::Value>& info)
592 { 607 {
593 TestObj* imp = V8TestObject::toNative(info.Holder()); 608 TestObj* imp = V8TestObject::toNative(info.Holder());
594 v8SetReturnValueString(info, imp->fastGetAttribute(HTMLNames::reflectedstrin gattrAttr), info.GetIsolate()); 609 v8SetReturnValueString(info, imp->fastGetAttribute(HTMLNames::reflectedstrin gattrAttr), info.GetIsolate());
595 } 610 }
596 611
597 static void reflectedStringAttrAttributeGetterCallback(v8::Local<v8::String>, co nst v8::PropertyCallbackInfo<v8::Value>& info) 612 static void reflectedStringAttrAttributeGetterCallback(v8::Local<v8::String>, co nst v8::PropertyCallbackInfo<v8::Value>& info)
598 { 613 {
599 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 614 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
600 TestObjV8Internal::reflectedStringAttrAttributeGetter(info); 615 TestObjV8Internal::reflectedStringAttrAttributeGetter(info);
601 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 616 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
602 } 617 }
603 618
604 static void reflectedStringAttrAttributeSetter(v8::Local<v8::Value> jsValue, con st v8::PropertyCallbackInfo<void>& info) 619 static void reflectedStringAttrAttributeSetter(v8::Local<v8::Value> jsValue, con st v8::PropertyCallbackInfo<void>& info)
605 { 620 {
621 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectedStrin gAttr", "TestObject", info.Holder(), info.GetIsolate());
606 TestObj* imp = V8TestObject::toNative(info.Holder()); 622 TestObj* imp = V8TestObject::toNative(info.Holder());
607 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppVal ue, jsValue); 623 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppVal ue, jsValue);
608 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; 624 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
609 imp->setAttribute(HTMLNames::reflectedstringattrAttr, cppValue); 625 imp->setAttribute(HTMLNames::reflectedstringattrAttr, cppValue);
610 } 626 }
611 627
612 static void reflectedStringAttrAttributeSetterCallback(v8::Local<v8::String>, v8 ::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 628 static void reflectedStringAttrAttributeSetterCallback(v8::Local<v8::String>, v8 ::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
613 { 629 {
614 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 630 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
615 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; 631 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
616 TestObjV8Internal::reflectedStringAttrAttributeSetter(jsValue, info); 632 TestObjV8Internal::reflectedStringAttrAttributeSetter(jsValue, info);
617 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 633 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
618 } 634 }
619 635
620 static void reflectedIntegralAttrAttributeGetter(const v8::PropertyCallbackInfo< v8::Value>& info) 636 static void reflectedIntegralAttrAttributeGetter(const v8::PropertyCallbackInfo< v8::Value>& info)
621 { 637 {
622 TestObj* imp = V8TestObject::toNative(info.Holder()); 638 TestObj* imp = V8TestObject::toNative(info.Holder());
623 v8SetReturnValueInt(info, imp->getIntegralAttribute(HTMLNames::reflectedinte gralattrAttr)); 639 v8SetReturnValueInt(info, imp->getIntegralAttribute(HTMLNames::reflectedinte gralattrAttr));
624 } 640 }
625 641
626 static void reflectedIntegralAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 642 static void reflectedIntegralAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
627 { 643 {
628 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 644 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
629 TestObjV8Internal::reflectedIntegralAttrAttributeGetter(info); 645 TestObjV8Internal::reflectedIntegralAttrAttributeGetter(info);
630 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 646 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
631 } 647 }
632 648
633 static void reflectedIntegralAttrAttributeSetter(v8::Local<v8::Value> jsValue, c onst v8::PropertyCallbackInfo<void>& info) 649 static void reflectedIntegralAttrAttributeSetter(v8::Local<v8::Value> jsValue, c onst v8::PropertyCallbackInfo<void>& info)
634 { 650 {
651 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectedInteg ralAttr", "TestObject", info.Holder(), info.GetIsolate());
635 TestObj* imp = V8TestObject::toNative(info.Holder()); 652 TestObj* imp = V8TestObject::toNative(info.Holder());
636 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 653 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue));
637 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; 654 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
638 imp->setIntegralAttribute(HTMLNames::reflectedintegralattrAttr, cppValue); 655 imp->setIntegralAttribute(HTMLNames::reflectedintegralattrAttr, cppValue);
639 } 656 }
640 657
641 static void reflectedIntegralAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 658 static void reflectedIntegralAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
642 { 659 {
643 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 660 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
644 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; 661 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
645 TestObjV8Internal::reflectedIntegralAttrAttributeSetter(jsValue, info); 662 TestObjV8Internal::reflectedIntegralAttrAttributeSetter(jsValue, info);
646 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 663 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
647 } 664 }
648 665
649 static void reflectedUnsignedIntegralAttrAttributeGetter(const v8::PropertyCallb ackInfo<v8::Value>& info) 666 static void reflectedUnsignedIntegralAttrAttributeGetter(const v8::PropertyCallb ackInfo<v8::Value>& info)
650 { 667 {
651 TestObj* imp = V8TestObject::toNative(info.Holder()); 668 TestObj* imp = V8TestObject::toNative(info.Holder());
652 v8SetReturnValueUnsigned(info, std::max(0, imp->getIntegralAttribute(HTMLNam es::reflectedunsignedintegralattrAttr))); 669 v8SetReturnValueUnsigned(info, std::max(0, imp->getIntegralAttribute(HTMLNam es::reflectedunsignedintegralattrAttr)));
653 } 670 }
654 671
655 static void reflectedUnsignedIntegralAttrAttributeGetterCallback(v8::Local<v8::S tring>, const v8::PropertyCallbackInfo<v8::Value>& info) 672 static void reflectedUnsignedIntegralAttrAttributeGetterCallback(v8::Local<v8::S tring>, const v8::PropertyCallbackInfo<v8::Value>& info)
656 { 673 {
657 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 674 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
658 TestObjV8Internal::reflectedUnsignedIntegralAttrAttributeGetter(info); 675 TestObjV8Internal::reflectedUnsignedIntegralAttrAttributeGetter(info);
659 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 676 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
660 } 677 }
661 678
662 static void reflectedUnsignedIntegralAttrAttributeSetter(v8::Local<v8::Value> js Value, const v8::PropertyCallbackInfo<void>& info) 679 static void reflectedUnsignedIntegralAttrAttributeSetter(v8::Local<v8::Value> js Value, const v8::PropertyCallbackInfo<void>& info)
663 { 680 {
681 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectedUnsig nedIntegralAttr", "TestObject", info.Holder(), info.GetIsolate());
664 TestObj* imp = V8TestObject::toNative(info.Holder()); 682 TestObj* imp = V8TestObject::toNative(info.Holder());
665 V8TRYCATCH_VOID(unsigned, cppValue, toUInt32(jsValue)); 683 V8TRYCATCH_VOID(unsigned, cppValue, toUInt32(jsValue));
666 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; 684 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
667 imp->setUnsignedIntegralAttribute(HTMLNames::reflectedunsignedintegralattrAt tr, cppValue); 685 imp->setUnsignedIntegralAttribute(HTMLNames::reflectedunsignedintegralattrAt tr, cppValue);
668 } 686 }
669 687
670 static void reflectedUnsignedIntegralAttrAttributeSetterCallback(v8::Local<v8::S tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info ) 688 static void reflectedUnsignedIntegralAttrAttributeSetterCallback(v8::Local<v8::S tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info )
671 { 689 {
672 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 690 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
673 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; 691 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
674 TestObjV8Internal::reflectedUnsignedIntegralAttrAttributeSetter(jsValue, inf o); 692 TestObjV8Internal::reflectedUnsignedIntegralAttrAttributeSetter(jsValue, inf o);
675 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 693 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
676 } 694 }
677 695
678 static void reflectedBooleanAttrAttributeGetter(const v8::PropertyCallbackInfo<v 8::Value>& info) 696 static void reflectedBooleanAttrAttributeGetter(const v8::PropertyCallbackInfo<v 8::Value>& info)
679 { 697 {
680 TestObj* imp = V8TestObject::toNative(info.Holder()); 698 TestObj* imp = V8TestObject::toNative(info.Holder());
681 v8SetReturnValueBool(info, imp->fastHasAttribute(HTMLNames::reflectedboolean attrAttr)); 699 v8SetReturnValueBool(info, imp->fastHasAttribute(HTMLNames::reflectedboolean attrAttr));
682 } 700 }
683 701
684 static void reflectedBooleanAttrAttributeGetterCallback(v8::Local<v8::String>, c onst v8::PropertyCallbackInfo<v8::Value>& info) 702 static void reflectedBooleanAttrAttributeGetterCallback(v8::Local<v8::String>, c onst v8::PropertyCallbackInfo<v8::Value>& info)
685 { 703 {
686 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 704 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
687 TestObjV8Internal::reflectedBooleanAttrAttributeGetter(info); 705 TestObjV8Internal::reflectedBooleanAttrAttributeGetter(info);
688 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 706 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
689 } 707 }
690 708
691 static void reflectedBooleanAttrAttributeSetter(v8::Local<v8::Value> jsValue, co nst v8::PropertyCallbackInfo<void>& info) 709 static void reflectedBooleanAttrAttributeSetter(v8::Local<v8::Value> jsValue, co nst v8::PropertyCallbackInfo<void>& info)
692 { 710 {
711 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectedBoole anAttr", "TestObject", info.Holder(), info.GetIsolate());
693 TestObj* imp = V8TestObject::toNative(info.Holder()); 712 TestObj* imp = V8TestObject::toNative(info.Holder());
694 V8TRYCATCH_VOID(bool, cppValue, jsValue->BooleanValue()); 713 V8TRYCATCH_VOID(bool, cppValue, jsValue->BooleanValue());
695 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; 714 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
696 imp->setBooleanAttribute(HTMLNames::reflectedbooleanattrAttr, cppValue); 715 imp->setBooleanAttribute(HTMLNames::reflectedbooleanattrAttr, cppValue);
697 } 716 }
698 717
699 static void reflectedBooleanAttrAttributeSetterCallback(v8::Local<v8::String>, v 8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 718 static void reflectedBooleanAttrAttributeSetterCallback(v8::Local<v8::String>, v 8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
700 { 719 {
701 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 720 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
702 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; 721 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
703 TestObjV8Internal::reflectedBooleanAttrAttributeSetter(jsValue, info); 722 TestObjV8Internal::reflectedBooleanAttrAttributeSetter(jsValue, info);
704 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 723 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
705 } 724 }
706 725
707 static void reflectedURLAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::V alue>& info) 726 static void reflectedURLAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::V alue>& info)
708 { 727 {
709 TestObj* imp = V8TestObject::toNative(info.Holder()); 728 TestObj* imp = V8TestObject::toNative(info.Holder());
710 v8SetReturnValueString(info, imp->getURLAttribute(HTMLNames::reflectedurlatt rAttr), info.GetIsolate()); 729 v8SetReturnValueString(info, imp->getURLAttribute(HTMLNames::reflectedurlatt rAttr), info.GetIsolate());
711 } 730 }
712 731
713 static void reflectedURLAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 732 static void reflectedURLAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
714 { 733 {
715 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 734 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
716 TestObjV8Internal::reflectedURLAttrAttributeGetter(info); 735 TestObjV8Internal::reflectedURLAttrAttributeGetter(info);
717 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 736 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
718 } 737 }
719 738
720 static void reflectedURLAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 739 static void reflectedURLAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
721 { 740 {
741 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectedURLAt tr", "TestObject", info.Holder(), info.GetIsolate());
722 TestObj* imp = V8TestObject::toNative(info.Holder()); 742 TestObj* imp = V8TestObject::toNative(info.Holder());
723 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppVal ue, jsValue); 743 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppVal ue, jsValue);
724 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; 744 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
725 imp->setAttribute(HTMLNames::reflectedurlattrAttr, cppValue); 745 imp->setAttribute(HTMLNames::reflectedurlattrAttr, cppValue);
726 } 746 }
727 747
728 static void reflectedURLAttrAttributeSetterCallback(v8::Local<v8::String>, v8::L ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 748 static void reflectedURLAttrAttributeSetterCallback(v8::Local<v8::String>, v8::L ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
729 { 749 {
730 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 750 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
731 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; 751 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
732 TestObjV8Internal::reflectedURLAttrAttributeSetter(jsValue, info); 752 TestObjV8Internal::reflectedURLAttrAttributeSetter(jsValue, info);
733 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 753 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
734 } 754 }
735 755
736 static void reflectedStringAttrAttributeGetter(const v8::PropertyCallbackInfo<v8 ::Value>& info) 756 static void reflectedStringAttrAttributeGetter(const v8::PropertyCallbackInfo<v8 ::Value>& info)
737 { 757 {
738 TestObj* imp = V8TestObject::toNative(info.Holder()); 758 TestObj* imp = V8TestObject::toNative(info.Holder());
739 v8SetReturnValueString(info, imp->fastGetAttribute(HTMLNames::customContentS tringAttrAttr), info.GetIsolate()); 759 v8SetReturnValueString(info, imp->fastGetAttribute(HTMLNames::customContentS tringAttrAttr), info.GetIsolate());
740 } 760 }
741 761
742 static void reflectedStringAttrAttributeGetterCallback(v8::Local<v8::String>, co nst v8::PropertyCallbackInfo<v8::Value>& info) 762 static void reflectedStringAttrAttributeGetterCallback(v8::Local<v8::String>, co nst v8::PropertyCallbackInfo<v8::Value>& info)
743 { 763 {
744 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 764 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
745 TestObjV8Internal::reflectedStringAttrAttributeGetter(info); 765 TestObjV8Internal::reflectedStringAttrAttributeGetter(info);
746 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 766 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
747 } 767 }
748 768
749 static void reflectedStringAttrAttributeSetter(v8::Local<v8::Value> jsValue, con st v8::PropertyCallbackInfo<void>& info) 769 static void reflectedStringAttrAttributeSetter(v8::Local<v8::Value> jsValue, con st v8::PropertyCallbackInfo<void>& info)
750 { 770 {
771 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectedStrin gAttr", "TestObject", info.Holder(), info.GetIsolate());
751 TestObj* imp = V8TestObject::toNative(info.Holder()); 772 TestObj* imp = V8TestObject::toNative(info.Holder());
752 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppVal ue, jsValue); 773 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppVal ue, jsValue);
753 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; 774 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
754 imp->setAttribute(HTMLNames::customContentStringAttrAttr, cppValue); 775 imp->setAttribute(HTMLNames::customContentStringAttrAttr, cppValue);
755 } 776 }
756 777
757 static void reflectedStringAttrAttributeSetterCallback(v8::Local<v8::String>, v8 ::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 778 static void reflectedStringAttrAttributeSetterCallback(v8::Local<v8::String>, v8 ::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
758 { 779 {
759 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 780 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
760 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; 781 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
761 TestObjV8Internal::reflectedStringAttrAttributeSetter(jsValue, info); 782 TestObjV8Internal::reflectedStringAttrAttributeSetter(jsValue, info);
762 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 783 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
763 } 784 }
764 785
765 static void reflectedCustomIntegralAttrAttributeGetter(const v8::PropertyCallbac kInfo<v8::Value>& info) 786 static void reflectedCustomIntegralAttrAttributeGetter(const v8::PropertyCallbac kInfo<v8::Value>& info)
766 { 787 {
767 TestObj* imp = V8TestObject::toNative(info.Holder()); 788 TestObj* imp = V8TestObject::toNative(info.Holder());
768 v8SetReturnValueInt(info, imp->getIntegralAttribute(HTMLNames::customContent IntegralAttrAttr)); 789 v8SetReturnValueInt(info, imp->getIntegralAttribute(HTMLNames::customContent IntegralAttrAttr));
769 } 790 }
770 791
771 static void reflectedCustomIntegralAttrAttributeGetterCallback(v8::Local<v8::Str ing>, const v8::PropertyCallbackInfo<v8::Value>& info) 792 static void reflectedCustomIntegralAttrAttributeGetterCallback(v8::Local<v8::Str ing>, const v8::PropertyCallbackInfo<v8::Value>& info)
772 { 793 {
773 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 794 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
774 TestObjV8Internal::reflectedCustomIntegralAttrAttributeGetter(info); 795 TestObjV8Internal::reflectedCustomIntegralAttrAttributeGetter(info);
775 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 796 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
776 } 797 }
777 798
778 static void reflectedCustomIntegralAttrAttributeSetter(v8::Local<v8::Value> jsVa lue, const v8::PropertyCallbackInfo<void>& info) 799 static void reflectedCustomIntegralAttrAttributeSetter(v8::Local<v8::Value> jsVa lue, const v8::PropertyCallbackInfo<void>& info)
779 { 800 {
801 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectedCusto mIntegralAttr", "TestObject", info.Holder(), info.GetIsolate());
780 TestObj* imp = V8TestObject::toNative(info.Holder()); 802 TestObj* imp = V8TestObject::toNative(info.Holder());
781 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 803 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue));
782 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; 804 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
783 imp->setIntegralAttribute(HTMLNames::customContentIntegralAttrAttr, cppValue ); 805 imp->setIntegralAttribute(HTMLNames::customContentIntegralAttrAttr, cppValue );
784 } 806 }
785 807
786 static void reflectedCustomIntegralAttrAttributeSetterCallback(v8::Local<v8::Str ing>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 808 static void reflectedCustomIntegralAttrAttributeSetterCallback(v8::Local<v8::Str ing>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
787 { 809 {
788 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 810 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
789 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; 811 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
790 TestObjV8Internal::reflectedCustomIntegralAttrAttributeSetter(jsValue, info) ; 812 TestObjV8Internal::reflectedCustomIntegralAttrAttributeSetter(jsValue, info) ;
791 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 813 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
792 } 814 }
793 815
794 static void reflectedCustomBooleanAttrAttributeGetter(const v8::PropertyCallback Info<v8::Value>& info) 816 static void reflectedCustomBooleanAttrAttributeGetter(const v8::PropertyCallback Info<v8::Value>& info)
795 { 817 {
796 TestObj* imp = V8TestObject::toNative(info.Holder()); 818 TestObj* imp = V8TestObject::toNative(info.Holder());
797 v8SetReturnValueBool(info, imp->fastHasAttribute(HTMLNames::customContentBoo leanAttrAttr)); 819 v8SetReturnValueBool(info, imp->fastHasAttribute(HTMLNames::customContentBoo leanAttrAttr));
798 } 820 }
799 821
800 static void reflectedCustomBooleanAttrAttributeGetterCallback(v8::Local<v8::Stri ng>, const v8::PropertyCallbackInfo<v8::Value>& info) 822 static void reflectedCustomBooleanAttrAttributeGetterCallback(v8::Local<v8::Stri ng>, const v8::PropertyCallbackInfo<v8::Value>& info)
801 { 823 {
802 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 824 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
803 TestObjV8Internal::reflectedCustomBooleanAttrAttributeGetter(info); 825 TestObjV8Internal::reflectedCustomBooleanAttrAttributeGetter(info);
804 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 826 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
805 } 827 }
806 828
807 static void reflectedCustomBooleanAttrAttributeSetter(v8::Local<v8::Value> jsVal ue, const v8::PropertyCallbackInfo<void>& info) 829 static void reflectedCustomBooleanAttrAttributeSetter(v8::Local<v8::Value> jsVal ue, const v8::PropertyCallbackInfo<void>& info)
808 { 830 {
831 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectedCusto mBooleanAttr", "TestObject", info.Holder(), info.GetIsolate());
809 TestObj* imp = V8TestObject::toNative(info.Holder()); 832 TestObj* imp = V8TestObject::toNative(info.Holder());
810 V8TRYCATCH_VOID(bool, cppValue, jsValue->BooleanValue()); 833 V8TRYCATCH_VOID(bool, cppValue, jsValue->BooleanValue());
811 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; 834 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
812 imp->setBooleanAttribute(HTMLNames::customContentBooleanAttrAttr, cppValue); 835 imp->setBooleanAttribute(HTMLNames::customContentBooleanAttrAttr, cppValue);
813 } 836 }
814 837
815 static void reflectedCustomBooleanAttrAttributeSetterCallback(v8::Local<v8::Stri ng>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 838 static void reflectedCustomBooleanAttrAttributeSetterCallback(v8::Local<v8::Stri ng>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
816 { 839 {
817 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 840 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
818 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; 841 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
819 TestObjV8Internal::reflectedCustomBooleanAttrAttributeSetter(jsValue, info); 842 TestObjV8Internal::reflectedCustomBooleanAttrAttributeSetter(jsValue, info);
820 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 843 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
821 } 844 }
822 845
823 static void reflectedCustomURLAttrAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info) 846 static void reflectedCustomURLAttrAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info)
824 { 847 {
825 TestObj* imp = V8TestObject::toNative(info.Holder()); 848 TestObj* imp = V8TestObject::toNative(info.Holder());
826 v8SetReturnValueString(info, imp->getURLAttribute(HTMLNames::customContentUR LAttrAttr), info.GetIsolate()); 849 v8SetReturnValueString(info, imp->getURLAttribute(HTMLNames::customContentUR LAttrAttr), info.GetIsolate());
827 } 850 }
828 851
829 static void reflectedCustomURLAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 852 static void reflectedCustomURLAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
830 { 853 {
831 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 854 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
832 TestObjV8Internal::reflectedCustomURLAttrAttributeGetter(info); 855 TestObjV8Internal::reflectedCustomURLAttrAttributeGetter(info);
833 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 856 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
834 } 857 }
835 858
836 static void reflectedCustomURLAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 859 static void reflectedCustomURLAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
837 { 860 {
861 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectedCusto mURLAttr", "TestObject", info.Holder(), info.GetIsolate());
838 TestObj* imp = V8TestObject::toNative(info.Holder()); 862 TestObj* imp = V8TestObject::toNative(info.Holder());
839 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppVal ue, jsValue); 863 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppVal ue, jsValue);
840 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; 864 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
841 imp->setAttribute(HTMLNames::customContentURLAttrAttr, cppValue); 865 imp->setAttribute(HTMLNames::customContentURLAttrAttr, cppValue);
842 } 866 }
843 867
844 static void reflectedCustomURLAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 868 static void reflectedCustomURLAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
845 { 869 {
846 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 870 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
847 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; 871 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
848 TestObjV8Internal::reflectedCustomURLAttrAttributeSetter(jsValue, info); 872 TestObjV8Internal::reflectedCustomURLAttrAttributeSetter(jsValue, info);
849 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 873 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
850 } 874 }
851 875
852 static void typedArrayAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Val ue>& info) 876 static void typedArrayAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Val ue>& info)
853 { 877 {
854 TestObj* imp = V8TestObject::toNative(info.Holder()); 878 TestObj* imp = V8TestObject::toNative(info.Holder());
855 v8SetReturnValueFast(info, imp->typedArrayAttr(), imp); 879 v8SetReturnValueFast(info, imp->typedArrayAttr(), imp);
856 } 880 }
857 881
858 static void typedArrayAttrAttributeGetterCallback(v8::Local<v8::String>, const v 8::PropertyCallbackInfo<v8::Value>& info) 882 static void typedArrayAttrAttributeGetterCallback(v8::Local<v8::String>, const v 8::PropertyCallbackInfo<v8::Value>& info)
859 { 883 {
860 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 884 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
861 TestObjV8Internal::typedArrayAttrAttributeGetter(info); 885 TestObjV8Internal::typedArrayAttrAttributeGetter(info);
862 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 886 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
863 } 887 }
864 888
865 static void typedArrayAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8 ::PropertyCallbackInfo<void>& info) 889 static void typedArrayAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8 ::PropertyCallbackInfo<void>& info)
866 { 890 {
891 ExceptionState exceptionState(ExceptionState::SetterContext, "typedArrayAttr ", "TestObject", info.Holder(), info.GetIsolate());
867 TestObj* imp = V8TestObject::toNative(info.Holder()); 892 TestObj* imp = V8TestObject::toNative(info.Holder());
868 V8TRYCATCH_VOID(Float32Array*, cppValue, jsValue->IsFloat32Array() ? V8Float 32Array::toNative(v8::Handle<v8::Float32Array>::Cast(jsValue)) : 0); 893 V8TRYCATCH_VOID(Float32Array*, cppValue, jsValue->IsFloat32Array() ? V8Float 32Array::toNative(v8::Handle<v8::Float32Array>::Cast(jsValue)) : 0);
869 imp->setTypedArrayAttr(WTF::getPtr(cppValue)); 894 imp->setTypedArrayAttr(WTF::getPtr(cppValue));
870 } 895 }
871 896
872 static void typedArrayAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Loc al<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 897 static void typedArrayAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Loc al<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
873 { 898 {
874 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 899 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
875 TestObjV8Internal::typedArrayAttrAttributeSetter(jsValue, info); 900 TestObjV8Internal::typedArrayAttrAttributeSetter(jsValue, info);
876 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 901 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
877 } 902 }
878 903
879 static void attrWithGetterExceptionAttributeGetter(const v8::PropertyCallbackInf o<v8::Value>& info) 904 static void attrWithGetterExceptionAttributeGetter(const v8::PropertyCallbackInf o<v8::Value>& info)
880 { 905 {
881 TestObj* imp = V8TestObject::toNative(info.Holder()); 906 TestObj* imp = V8TestObject::toNative(info.Holder());
882 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); 907 ExceptionState exceptionState(ExceptionState::GetterContext, "attrWithGetter Exception", "TestObject" ,info.Holder(), info.GetIsolate());
883 int jsValue = imp->attrWithGetterException(exceptionState); 908 int jsValue = imp->attrWithGetterException(exceptionState);
884 if (UNLIKELY(exceptionState.throwIfNeeded())) 909 if (UNLIKELY(exceptionState.throwIfNeeded()))
885 return; 910 return;
886 v8SetReturnValueInt(info, jsValue); 911 v8SetReturnValueInt(info, jsValue);
887 } 912 }
888 913
889 static void attrWithGetterExceptionAttributeGetterCallback(v8::Local<v8::String> , const v8::PropertyCallbackInfo<v8::Value>& info) 914 static void attrWithGetterExceptionAttributeGetterCallback(v8::Local<v8::String> , const v8::PropertyCallbackInfo<v8::Value>& info)
890 { 915 {
891 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 916 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
892 TestObjV8Internal::attrWithGetterExceptionAttributeGetter(info); 917 TestObjV8Internal::attrWithGetterExceptionAttributeGetter(info);
893 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 918 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
894 } 919 }
895 920
896 static void attrWithGetterExceptionAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 921 static void attrWithGetterExceptionAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
897 { 922 {
923 ExceptionState exceptionState(ExceptionState::SetterContext, "attrWithGetter Exception", "TestObject", info.Holder(), info.GetIsolate());
898 TestObj* imp = V8TestObject::toNative(info.Holder()); 924 TestObj* imp = V8TestObject::toNative(info.Holder());
899 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 925 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue));
900 imp->setAttrWithGetterException(cppValue); 926 imp->setAttrWithGetterException(cppValue);
901 } 927 }
902 928
903 static void attrWithGetterExceptionAttributeSetterCallback(v8::Local<v8::String> , v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 929 static void attrWithGetterExceptionAttributeSetterCallback(v8::Local<v8::String> , v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
904 { 930 {
905 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 931 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
906 TestObjV8Internal::attrWithGetterExceptionAttributeSetter(jsValue, info); 932 TestObjV8Internal::attrWithGetterExceptionAttributeSetter(jsValue, info);
907 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 933 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
908 } 934 }
909 935
910 static void attrWithSetterExceptionAttributeGetter(const v8::PropertyCallbackInf o<v8::Value>& info) 936 static void attrWithSetterExceptionAttributeGetter(const v8::PropertyCallbackInf o<v8::Value>& info)
911 { 937 {
912 TestObj* imp = V8TestObject::toNative(info.Holder()); 938 TestObj* imp = V8TestObject::toNative(info.Holder());
913 v8SetReturnValueInt(info, imp->attrWithSetterException()); 939 v8SetReturnValueInt(info, imp->attrWithSetterException());
914 } 940 }
915 941
916 static void attrWithSetterExceptionAttributeGetterCallback(v8::Local<v8::String> , const v8::PropertyCallbackInfo<v8::Value>& info) 942 static void attrWithSetterExceptionAttributeGetterCallback(v8::Local<v8::String> , const v8::PropertyCallbackInfo<v8::Value>& info)
917 { 943 {
918 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 944 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
919 TestObjV8Internal::attrWithSetterExceptionAttributeGetter(info); 945 TestObjV8Internal::attrWithSetterExceptionAttributeGetter(info);
920 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 946 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
921 } 947 }
922 948
923 static void attrWithSetterExceptionAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 949 static void attrWithSetterExceptionAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
924 { 950 {
951 ExceptionState exceptionState(ExceptionState::SetterContext, "attrWithSetter Exception", "TestObject", info.Holder(), info.GetIsolate());
925 TestObj* imp = V8TestObject::toNative(info.Holder()); 952 TestObj* imp = V8TestObject::toNative(info.Holder());
926 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 953 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue));
927 ExceptionState exceptionState(info.Holder(), info.GetIsolate());
928 imp->setAttrWithSetterException(cppValue, exceptionState); 954 imp->setAttrWithSetterException(cppValue, exceptionState);
929 exceptionState.throwIfNeeded(); 955 exceptionState.throwIfNeeded();
930 } 956 }
931 957
932 static void attrWithSetterExceptionAttributeSetterCallback(v8::Local<v8::String> , v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 958 static void attrWithSetterExceptionAttributeSetterCallback(v8::Local<v8::String> , v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
933 { 959 {
934 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 960 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
935 TestObjV8Internal::attrWithSetterExceptionAttributeSetter(jsValue, info); 961 TestObjV8Internal::attrWithSetterExceptionAttributeSetter(jsValue, info);
936 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 962 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
937 } 963 }
938 964
939 static void stringAttrWithGetterExceptionAttributeGetter(const v8::PropertyCallb ackInfo<v8::Value>& info) 965 static void stringAttrWithGetterExceptionAttributeGetter(const v8::PropertyCallb ackInfo<v8::Value>& info)
940 { 966 {
941 TestObj* imp = V8TestObject::toNative(info.Holder()); 967 TestObj* imp = V8TestObject::toNative(info.Holder());
942 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); 968 ExceptionState exceptionState(ExceptionState::GetterContext, "stringAttrWith GetterException", "TestObject" ,info.Holder(), info.GetIsolate());
943 String jsValue = imp->stringAttrWithGetterException(exceptionState); 969 String jsValue = imp->stringAttrWithGetterException(exceptionState);
944 if (UNLIKELY(exceptionState.throwIfNeeded())) 970 if (UNLIKELY(exceptionState.throwIfNeeded()))
945 return; 971 return;
946 v8SetReturnValueString(info, jsValue, info.GetIsolate()); 972 v8SetReturnValueString(info, jsValue, info.GetIsolate());
947 } 973 }
948 974
949 static void stringAttrWithGetterExceptionAttributeGetterCallback(v8::Local<v8::S tring>, const v8::PropertyCallbackInfo<v8::Value>& info) 975 static void stringAttrWithGetterExceptionAttributeGetterCallback(v8::Local<v8::S tring>, const v8::PropertyCallbackInfo<v8::Value>& info)
950 { 976 {
951 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 977 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
952 TestObjV8Internal::stringAttrWithGetterExceptionAttributeGetter(info); 978 TestObjV8Internal::stringAttrWithGetterExceptionAttributeGetter(info);
953 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 979 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
954 } 980 }
955 981
956 static void stringAttrWithGetterExceptionAttributeSetter(v8::Local<v8::Value> js Value, const v8::PropertyCallbackInfo<void>& info) 982 static void stringAttrWithGetterExceptionAttributeSetter(v8::Local<v8::Value> js Value, const v8::PropertyCallbackInfo<void>& info)
957 { 983 {
984 ExceptionState exceptionState(ExceptionState::SetterContext, "stringAttrWith GetterException", "TestObject", info.Holder(), info.GetIsolate());
958 TestObj* imp = V8TestObject::toNative(info.Holder()); 985 TestObj* imp = V8TestObject::toNative(info.Holder());
959 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); 986 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
960 imp->setStringAttrWithGetterException(cppValue); 987 imp->setStringAttrWithGetterException(cppValue);
961 } 988 }
962 989
963 static void stringAttrWithGetterExceptionAttributeSetterCallback(v8::Local<v8::S tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info ) 990 static void stringAttrWithGetterExceptionAttributeSetterCallback(v8::Local<v8::S tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info )
964 { 991 {
965 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 992 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
966 TestObjV8Internal::stringAttrWithGetterExceptionAttributeSetter(jsValue, inf o); 993 TestObjV8Internal::stringAttrWithGetterExceptionAttributeSetter(jsValue, inf o);
967 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 994 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
968 } 995 }
969 996
970 static void stringAttrWithSetterExceptionAttributeGetter(const v8::PropertyCallb ackInfo<v8::Value>& info) 997 static void stringAttrWithSetterExceptionAttributeGetter(const v8::PropertyCallb ackInfo<v8::Value>& info)
971 { 998 {
972 TestObj* imp = V8TestObject::toNative(info.Holder()); 999 TestObj* imp = V8TestObject::toNative(info.Holder());
973 v8SetReturnValueString(info, imp->stringAttrWithSetterException(), info.GetI solate()); 1000 v8SetReturnValueString(info, imp->stringAttrWithSetterException(), info.GetI solate());
974 } 1001 }
975 1002
976 static void stringAttrWithSetterExceptionAttributeGetterCallback(v8::Local<v8::S tring>, const v8::PropertyCallbackInfo<v8::Value>& info) 1003 static void stringAttrWithSetterExceptionAttributeGetterCallback(v8::Local<v8::S tring>, const v8::PropertyCallbackInfo<v8::Value>& info)
977 { 1004 {
978 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1005 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
979 TestObjV8Internal::stringAttrWithSetterExceptionAttributeGetter(info); 1006 TestObjV8Internal::stringAttrWithSetterExceptionAttributeGetter(info);
980 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1007 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
981 } 1008 }
982 1009
983 static void stringAttrWithSetterExceptionAttributeSetter(v8::Local<v8::Value> js Value, const v8::PropertyCallbackInfo<void>& info) 1010 static void stringAttrWithSetterExceptionAttributeSetter(v8::Local<v8::Value> js Value, const v8::PropertyCallbackInfo<void>& info)
984 { 1011 {
1012 ExceptionState exceptionState(ExceptionState::SetterContext, "stringAttrWith SetterException", "TestObject", info.Holder(), info.GetIsolate());
985 TestObj* imp = V8TestObject::toNative(info.Holder()); 1013 TestObj* imp = V8TestObject::toNative(info.Holder());
986 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); 1014 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
987 ExceptionState exceptionState(info.Holder(), info.GetIsolate());
988 imp->setStringAttrWithSetterException(cppValue, exceptionState); 1015 imp->setStringAttrWithSetterException(cppValue, exceptionState);
989 exceptionState.throwIfNeeded(); 1016 exceptionState.throwIfNeeded();
990 } 1017 }
991 1018
992 static void stringAttrWithSetterExceptionAttributeSetterCallback(v8::Local<v8::S tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info ) 1019 static void stringAttrWithSetterExceptionAttributeSetterCallback(v8::Local<v8::S tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info )
993 { 1020 {
994 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1021 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
995 TestObjV8Internal::stringAttrWithSetterExceptionAttributeSetter(jsValue, inf o); 1022 TestObjV8Internal::stringAttrWithSetterExceptionAttributeSetter(jsValue, inf o);
996 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1023 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
997 } 1024 }
(...skipping 24 matching lines...) Expand all
1022 1049
1023 static void withScriptStateAttributeAttributeGetterCallback(v8::Local<v8::String >, const v8::PropertyCallbackInfo<v8::Value>& info) 1050 static void withScriptStateAttributeAttributeGetterCallback(v8::Local<v8::String >, const v8::PropertyCallbackInfo<v8::Value>& info)
1024 { 1051 {
1025 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1052 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1026 TestObjV8Internal::withScriptStateAttributeAttributeGetter(info); 1053 TestObjV8Internal::withScriptStateAttributeAttributeGetter(info);
1027 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1054 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1028 } 1055 }
1029 1056
1030 static void withScriptStateAttributeAttributeSetter(v8::Local<v8::Value> jsValue , const v8::PropertyCallbackInfo<void>& info) 1057 static void withScriptStateAttributeAttributeSetter(v8::Local<v8::Value> jsValue , const v8::PropertyCallbackInfo<void>& info)
1031 { 1058 {
1059 ExceptionState exceptionState(ExceptionState::SetterContext, "withScriptStat eAttribute", "TestObject", info.Holder(), info.GetIsolate());
1032 TestObj* imp = V8TestObject::toNative(info.Holder()); 1060 TestObj* imp = V8TestObject::toNative(info.Holder());
1033 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 1061 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue));
1034 ScriptState* currentState = ScriptState::current(); 1062 ScriptState* currentState = ScriptState::current();
1035 if (!currentState) 1063 if (!currentState)
1036 return; 1064 return;
1037 ScriptState& state = *currentState; 1065 ScriptState& state = *currentState;
1038 imp->setWithScriptStateAttribute(&state, cppValue); 1066 imp->setWithScriptStateAttribute(&state, cppValue);
1039 if (state.hadException()) 1067 if (state.hadException())
1040 throwError(state.exception(), info.GetIsolate()); 1068 throwError(state.exception(), info.GetIsolate());
1041 } 1069 }
(...skipping 14 matching lines...) Expand all
1056 1084
1057 static void withExecutionContextAttributeAttributeGetterCallback(v8::Local<v8::S tring>, const v8::PropertyCallbackInfo<v8::Value>& info) 1085 static void withExecutionContextAttributeAttributeGetterCallback(v8::Local<v8::S tring>, const v8::PropertyCallbackInfo<v8::Value>& info)
1058 { 1086 {
1059 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1087 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1060 TestObjV8Internal::withExecutionContextAttributeAttributeGetter(info); 1088 TestObjV8Internal::withExecutionContextAttributeAttributeGetter(info);
1061 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1089 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1062 } 1090 }
1063 1091
1064 static void withExecutionContextAttributeAttributeSetter(v8::Local<v8::Value> js Value, const v8::PropertyCallbackInfo<void>& info) 1092 static void withExecutionContextAttributeAttributeSetter(v8::Local<v8::Value> js Value, const v8::PropertyCallbackInfo<void>& info)
1065 { 1093 {
1094 ExceptionState exceptionState(ExceptionState::SetterContext, "withExecutionC ontextAttribute", "TestObject", info.Holder(), info.GetIsolate());
1066 TestObj* imp = V8TestObject::toNative(info.Holder()); 1095 TestObj* imp = V8TestObject::toNative(info.Holder());
1067 V8TRYCATCH_VOID(TestObj*, cppValue, V8TestObject::hasInstance(jsValue, info. GetIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle< v8::Object>::Cast(jsValue)) : 0); 1096 V8TRYCATCH_VOID(TestObj*, cppValue, V8TestObject::hasInstance(jsValue, info. GetIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle< v8::Object>::Cast(jsValue)) : 0);
1068 ExecutionContext* scriptContext = getExecutionContext(); 1097 ExecutionContext* scriptContext = getExecutionContext();
1069 imp->setWithExecutionContextAttribute(scriptContext, WTF::getPtr(cppValue)); 1098 imp->setWithExecutionContextAttribute(scriptContext, WTF::getPtr(cppValue));
1070 } 1099 }
1071 1100
1072 static void withExecutionContextAttributeAttributeSetterCallback(v8::Local<v8::S tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info ) 1101 static void withExecutionContextAttributeAttributeSetterCallback(v8::Local<v8::S tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info )
1073 { 1102 {
1074 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1103 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1075 TestObjV8Internal::withExecutionContextAttributeAttributeSetter(jsValue, inf o); 1104 TestObjV8Internal::withExecutionContextAttributeAttributeSetter(jsValue, inf o);
1076 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1105 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1077 } 1106 }
1078 1107
1079 static void withActiveWindowAndFirstWindowAttributeAttributeGetter(const v8::Pro pertyCallbackInfo<v8::Value>& info) 1108 static void withActiveWindowAndFirstWindowAttributeAttributeGetter(const v8::Pro pertyCallbackInfo<v8::Value>& info)
1080 { 1109 {
1081 TestObj* imp = V8TestObject::toNative(info.Holder()); 1110 TestObj* imp = V8TestObject::toNative(info.Holder());
1082 v8SetReturnValueFast(info, imp->withActiveWindowAndFirstWindowAttribute(), i mp); 1111 v8SetReturnValueFast(info, imp->withActiveWindowAndFirstWindowAttribute(), i mp);
1083 } 1112 }
1084 1113
1085 static void withActiveWindowAndFirstWindowAttributeAttributeGetterCallback(v8::L ocal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 1114 static void withActiveWindowAndFirstWindowAttributeAttributeGetterCallback(v8::L ocal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1086 { 1115 {
1087 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1116 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1088 TestObjV8Internal::withActiveWindowAndFirstWindowAttributeAttributeGetter(in fo); 1117 TestObjV8Internal::withActiveWindowAndFirstWindowAttributeAttributeGetter(in fo);
1089 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1118 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1090 } 1119 }
1091 1120
1092 static void withActiveWindowAndFirstWindowAttributeAttributeSetter(v8::Local<v8: :Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1121 static void withActiveWindowAndFirstWindowAttributeAttributeSetter(v8::Local<v8: :Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1093 { 1122 {
1123 ExceptionState exceptionState(ExceptionState::SetterContext, "withActiveWind owAndFirstWindowAttribute", "TestObject", info.Holder(), info.GetIsolate());
1094 TestObj* imp = V8TestObject::toNative(info.Holder()); 1124 TestObj* imp = V8TestObject::toNative(info.Holder());
1095 V8TRYCATCH_VOID(TestObj*, cppValue, V8TestObject::hasInstance(jsValue, info. GetIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle< v8::Object>::Cast(jsValue)) : 0); 1125 V8TRYCATCH_VOID(TestObj*, cppValue, V8TestObject::hasInstance(jsValue, info. GetIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle< v8::Object>::Cast(jsValue)) : 0);
1096 imp->setWithActiveWindowAndFirstWindowAttribute(activeDOMWindow(), firstDOMW indow(), WTF::getPtr(cppValue)); 1126 imp->setWithActiveWindowAndFirstWindowAttribute(activeDOMWindow(), firstDOMW indow(), WTF::getPtr(cppValue));
1097 } 1127 }
1098 1128
1099 static void withActiveWindowAndFirstWindowAttributeAttributeSetterCallback(v8::L ocal<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<v oid>& info) 1129 static void withActiveWindowAndFirstWindowAttributeAttributeSetterCallback(v8::L ocal<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<v oid>& info)
1100 { 1130 {
1101 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1131 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1102 TestObjV8Internal::withActiveWindowAndFirstWindowAttributeAttributeSetter(js Value, info); 1132 TestObjV8Internal::withActiveWindowAndFirstWindowAttributeAttributeSetter(js Value, info);
1103 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1133 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1104 } 1134 }
1105 1135
1106 static void withScriptStateAttributeRaisesAttributeGetter(const v8::PropertyCall backInfo<v8::Value>& info) 1136 static void withScriptStateAttributeRaisesAttributeGetter(const v8::PropertyCall backInfo<v8::Value>& info)
1107 { 1137 {
1108 TestObj* imp = V8TestObject::toNative(info.Holder()); 1138 TestObj* imp = V8TestObject::toNative(info.Holder());
1109 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); 1139 ExceptionState exceptionState(ExceptionState::GetterContext, "withScriptStat eAttributeRaises", "TestObject" ,info.Holder(), info.GetIsolate());
1110 ScriptState* currentState = ScriptState::current(); 1140 ScriptState* currentState = ScriptState::current();
1111 if (!currentState) 1141 if (!currentState)
1112 return v8Undefined(); 1142 return v8Undefined();
1113 ScriptState& state = *currentState; 1143 ScriptState& state = *currentState;
1114 RefPtr<TestObj> jsValue = imp->withScriptStateAttributeRaises(&state, except ionState); 1144 RefPtr<TestObj> jsValue = imp->withScriptStateAttributeRaises(&state, except ionState);
1115 if (UNLIKELY(exceptionState.throwIfNeeded())) 1145 if (UNLIKELY(exceptionState.throwIfNeeded()))
1116 return; 1146 return;
1117 if (state.hadException()) { 1147 if (state.hadException()) {
1118 throwError(state.exception(), info.GetIsolate()); 1148 throwError(state.exception(), info.GetIsolate());
1119 return; 1149 return;
1120 } 1150 }
1121 v8SetReturnValueFast(info, jsValue.release(), imp); 1151 v8SetReturnValueFast(info, jsValue.release(), imp);
1122 } 1152 }
1123 1153
1124 static void withScriptStateAttributeRaisesAttributeGetterCallback(v8::Local<v8:: String>, const v8::PropertyCallbackInfo<v8::Value>& info) 1154 static void withScriptStateAttributeRaisesAttributeGetterCallback(v8::Local<v8:: String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1125 { 1155 {
1126 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1156 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1127 TestObjV8Internal::withScriptStateAttributeRaisesAttributeGetter(info); 1157 TestObjV8Internal::withScriptStateAttributeRaisesAttributeGetter(info);
1128 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1158 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1129 } 1159 }
1130 1160
1131 static void withScriptStateAttributeRaisesAttributeSetter(v8::Local<v8::Value> j sValue, const v8::PropertyCallbackInfo<void>& info) 1161 static void withScriptStateAttributeRaisesAttributeSetter(v8::Local<v8::Value> j sValue, const v8::PropertyCallbackInfo<void>& info)
1132 { 1162 {
1163 ExceptionState exceptionState(ExceptionState::SetterContext, "withScriptStat eAttributeRaises", "TestObject", info.Holder(), info.GetIsolate());
1133 TestObj* imp = V8TestObject::toNative(info.Holder()); 1164 TestObj* imp = V8TestObject::toNative(info.Holder());
1134 V8TRYCATCH_VOID(TestObj*, cppValue, V8TestObject::hasInstance(jsValue, info. GetIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle< v8::Object>::Cast(jsValue)) : 0); 1165 V8TRYCATCH_VOID(TestObj*, cppValue, V8TestObject::hasInstance(jsValue, info. GetIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle< v8::Object>::Cast(jsValue)) : 0);
1135 ScriptState* currentState = ScriptState::current(); 1166 ScriptState* currentState = ScriptState::current();
1136 if (!currentState) 1167 if (!currentState)
1137 return; 1168 return;
1138 ScriptState& state = *currentState; 1169 ScriptState& state = *currentState;
1139 imp->setWithScriptStateAttributeRaises(&state, WTF::getPtr(cppValue)); 1170 imp->setWithScriptStateAttributeRaises(&state, WTF::getPtr(cppValue));
1140 if (state.hadException()) 1171 if (state.hadException())
1141 throwError(state.exception(), info.GetIsolate()); 1172 throwError(state.exception(), info.GetIsolate());
1142 } 1173 }
1143 1174
1144 static void withScriptStateAttributeRaisesAttributeSetterCallback(v8::Local<v8:: String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& inf o) 1175 static void withScriptStateAttributeRaisesAttributeSetterCallback(v8::Local<v8:: String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& inf o)
1145 { 1176 {
1146 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1177 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1147 TestObjV8Internal::withScriptStateAttributeRaisesAttributeSetter(jsValue, in fo); 1178 TestObjV8Internal::withScriptStateAttributeRaisesAttributeSetter(jsValue, in fo);
1148 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1179 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1149 } 1180 }
1150 1181
1151 static void withExecutionContextAttributeRaisesAttributeGetter(const v8::Propert yCallbackInfo<v8::Value>& info) 1182 static void withExecutionContextAttributeRaisesAttributeGetter(const v8::Propert yCallbackInfo<v8::Value>& info)
1152 { 1183 {
1153 TestObj* imp = V8TestObject::toNative(info.Holder()); 1184 TestObj* imp = V8TestObject::toNative(info.Holder());
1154 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); 1185 ExceptionState exceptionState(ExceptionState::GetterContext, "withExecutionC ontextAttributeRaises", "TestObject" ,info.Holder(), info.GetIsolate());
1155 ExecutionContext* scriptContext = getExecutionContext(); 1186 ExecutionContext* scriptContext = getExecutionContext();
1156 RefPtr<TestObj> jsValue = imp->withExecutionContextAttributeRaises(scriptCon text, exceptionState); 1187 RefPtr<TestObj> jsValue = imp->withExecutionContextAttributeRaises(scriptCon text, exceptionState);
1157 if (UNLIKELY(exceptionState.throwIfNeeded())) 1188 if (UNLIKELY(exceptionState.throwIfNeeded()))
1158 return; 1189 return;
1159 v8SetReturnValueFast(info, jsValue.release(), imp); 1190 v8SetReturnValueFast(info, jsValue.release(), imp);
1160 } 1191 }
1161 1192
1162 static void withExecutionContextAttributeRaisesAttributeGetterCallback(v8::Local <v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 1193 static void withExecutionContextAttributeRaisesAttributeGetterCallback(v8::Local <v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1163 { 1194 {
1164 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1195 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1165 TestObjV8Internal::withExecutionContextAttributeRaisesAttributeGetter(info); 1196 TestObjV8Internal::withExecutionContextAttributeRaisesAttributeGetter(info);
1166 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1197 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1167 } 1198 }
1168 1199
1169 static void withExecutionContextAttributeRaisesAttributeSetter(v8::Local<v8::Val ue> jsValue, const v8::PropertyCallbackInfo<void>& info) 1200 static void withExecutionContextAttributeRaisesAttributeSetter(v8::Local<v8::Val ue> jsValue, const v8::PropertyCallbackInfo<void>& info)
1170 { 1201 {
1202 ExceptionState exceptionState(ExceptionState::SetterContext, "withExecutionC ontextAttributeRaises", "TestObject", info.Holder(), info.GetIsolate());
1171 TestObj* imp = V8TestObject::toNative(info.Holder()); 1203 TestObj* imp = V8TestObject::toNative(info.Holder());
1172 V8TRYCATCH_VOID(TestObj*, cppValue, V8TestObject::hasInstance(jsValue, info. GetIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle< v8::Object>::Cast(jsValue)) : 0); 1204 V8TRYCATCH_VOID(TestObj*, cppValue, V8TestObject::hasInstance(jsValue, info. GetIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle< v8::Object>::Cast(jsValue)) : 0);
1173 ExecutionContext* scriptContext = getExecutionContext(); 1205 ExecutionContext* scriptContext = getExecutionContext();
1174 imp->setWithExecutionContextAttributeRaises(scriptContext, WTF::getPtr(cppVa lue)); 1206 imp->setWithExecutionContextAttributeRaises(scriptContext, WTF::getPtr(cppVa lue));
1175 } 1207 }
1176 1208
1177 static void withExecutionContextAttributeRaisesAttributeSetterCallback(v8::Local <v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void> & info) 1209 static void withExecutionContextAttributeRaisesAttributeSetterCallback(v8::Local <v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void> & info)
1178 { 1210 {
1179 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1211 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1180 TestObjV8Internal::withExecutionContextAttributeRaisesAttributeSetter(jsValu e, info); 1212 TestObjV8Internal::withExecutionContextAttributeRaisesAttributeSetter(jsValu e, info);
(...skipping 13 matching lines...) Expand all
1194 1226
1195 static void withExecutionContextAndScriptStateAttributeAttributeGetterCallback(v 8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 1227 static void withExecutionContextAndScriptStateAttributeAttributeGetterCallback(v 8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1196 { 1228 {
1197 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1229 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1198 TestObjV8Internal::withExecutionContextAndScriptStateAttributeAttributeGette r(info); 1230 TestObjV8Internal::withExecutionContextAndScriptStateAttributeAttributeGette r(info);
1199 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1231 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1200 } 1232 }
1201 1233
1202 static void withExecutionContextAndScriptStateAttributeAttributeSetter(v8::Local <v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1234 static void withExecutionContextAndScriptStateAttributeAttributeSetter(v8::Local <v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1203 { 1235 {
1236 ExceptionState exceptionState(ExceptionState::SetterContext, "withExecutionC ontextAndScriptStateAttribute", "TestObject", info.Holder(), info.GetIsolate());
1204 TestObj* imp = V8TestObject::toNative(info.Holder()); 1237 TestObj* imp = V8TestObject::toNative(info.Holder());
1205 V8TRYCATCH_VOID(TestObj*, cppValue, V8TestObject::hasInstance(jsValue, info. GetIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle< v8::Object>::Cast(jsValue)) : 0); 1238 V8TRYCATCH_VOID(TestObj*, cppValue, V8TestObject::hasInstance(jsValue, info. GetIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle< v8::Object>::Cast(jsValue)) : 0);
1206 ScriptState* currentState = ScriptState::current(); 1239 ScriptState* currentState = ScriptState::current();
1207 if (!currentState) 1240 if (!currentState)
1208 return; 1241 return;
1209 ScriptState& state = *currentState; 1242 ScriptState& state = *currentState;
1210 ExecutionContext* scriptContext = getExecutionContext(); 1243 ExecutionContext* scriptContext = getExecutionContext();
1211 imp->setWithExecutionContextAndScriptStateAttribute(&state, scriptContext, W TF::getPtr(cppValue)); 1244 imp->setWithExecutionContextAndScriptStateAttribute(&state, scriptContext, W TF::getPtr(cppValue));
1212 if (state.hadException()) 1245 if (state.hadException())
1213 throwError(state.exception(), info.GetIsolate()); 1246 throwError(state.exception(), info.GetIsolate());
1214 } 1247 }
1215 1248
1216 static void withExecutionContextAndScriptStateAttributeAttributeSetterCallback(v 8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackIn fo<void>& info) 1249 static void withExecutionContextAndScriptStateAttributeAttributeSetterCallback(v 8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackIn fo<void>& info)
1217 { 1250 {
1218 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1251 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1219 TestObjV8Internal::withExecutionContextAndScriptStateAttributeAttributeSette r(jsValue, info); 1252 TestObjV8Internal::withExecutionContextAndScriptStateAttributeAttributeSette r(jsValue, info);
1220 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1253 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1221 } 1254 }
1222 1255
1223 static void withExecutionContextAndScriptStateAttributeRaisesAttributeGetter(con st v8::PropertyCallbackInfo<v8::Value>& info) 1256 static void withExecutionContextAndScriptStateAttributeRaisesAttributeGetter(con st v8::PropertyCallbackInfo<v8::Value>& info)
1224 { 1257 {
1225 TestObj* imp = V8TestObject::toNative(info.Holder()); 1258 TestObj* imp = V8TestObject::toNative(info.Holder());
1226 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); 1259 ExceptionState exceptionState(ExceptionState::GetterContext, "withExecutionC ontextAndScriptStateAttributeRaises", "TestObject" ,info.Holder(), info.GetIsola te());
1227 ScriptState* currentState = ScriptState::current(); 1260 ScriptState* currentState = ScriptState::current();
1228 if (!currentState) 1261 if (!currentState)
1229 return v8Undefined(); 1262 return v8Undefined();
1230 ScriptState& state = *currentState; 1263 ScriptState& state = *currentState;
1231 ExecutionContext* scriptContext = getExecutionContext(); 1264 ExecutionContext* scriptContext = getExecutionContext();
1232 RefPtr<TestObj> jsValue = imp->withExecutionContextAndScriptStateAttributeRa ises(&state, scriptContext, exceptionState); 1265 RefPtr<TestObj> jsValue = imp->withExecutionContextAndScriptStateAttributeRa ises(&state, scriptContext, exceptionState);
1233 if (UNLIKELY(exceptionState.throwIfNeeded())) 1266 if (UNLIKELY(exceptionState.throwIfNeeded()))
1234 return; 1267 return;
1235 if (state.hadException()) { 1268 if (state.hadException()) {
1236 throwError(state.exception(), info.GetIsolate()); 1269 throwError(state.exception(), info.GetIsolate());
1237 return; 1270 return;
1238 } 1271 }
1239 v8SetReturnValueFast(info, jsValue.release(), imp); 1272 v8SetReturnValueFast(info, jsValue.release(), imp);
1240 } 1273 }
1241 1274
1242 static void withExecutionContextAndScriptStateAttributeRaisesAttributeGetterCall back(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 1275 static void withExecutionContextAndScriptStateAttributeRaisesAttributeGetterCall back(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1243 { 1276 {
1244 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1277 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1245 TestObjV8Internal::withExecutionContextAndScriptStateAttributeRaisesAttribut eGetter(info); 1278 TestObjV8Internal::withExecutionContextAndScriptStateAttributeRaisesAttribut eGetter(info);
1246 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1279 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1247 } 1280 }
1248 1281
1249 static void withExecutionContextAndScriptStateAttributeRaisesAttributeSetter(v8: :Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1282 static void withExecutionContextAndScriptStateAttributeRaisesAttributeSetter(v8: :Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1250 { 1283 {
1284 ExceptionState exceptionState(ExceptionState::SetterContext, "withExecutionC ontextAndScriptStateAttributeRaises", "TestObject", info.Holder(), info.GetIsola te());
1251 TestObj* imp = V8TestObject::toNative(info.Holder()); 1285 TestObj* imp = V8TestObject::toNative(info.Holder());
1252 V8TRYCATCH_VOID(TestObj*, cppValue, V8TestObject::hasInstance(jsValue, info. GetIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle< v8::Object>::Cast(jsValue)) : 0); 1286 V8TRYCATCH_VOID(TestObj*, cppValue, V8TestObject::hasInstance(jsValue, info. GetIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle< v8::Object>::Cast(jsValue)) : 0);
1253 ScriptState* currentState = ScriptState::current(); 1287 ScriptState* currentState = ScriptState::current();
1254 if (!currentState) 1288 if (!currentState)
1255 return; 1289 return;
1256 ScriptState& state = *currentState; 1290 ScriptState& state = *currentState;
1257 ExecutionContext* scriptContext = getExecutionContext(); 1291 ExecutionContext* scriptContext = getExecutionContext();
1258 imp->setWithExecutionContextAndScriptStateAttributeRaises(&state, scriptCont ext, WTF::getPtr(cppValue)); 1292 imp->setWithExecutionContextAndScriptStateAttributeRaises(&state, scriptCont ext, WTF::getPtr(cppValue));
1259 if (state.hadException()) 1293 if (state.hadException())
1260 throwError(state.exception(), info.GetIsolate()); 1294 throwError(state.exception(), info.GetIsolate());
(...skipping 19 matching lines...) Expand all
1280 1314
1281 static void withExecutionContextAndScriptStateWithSpacesAttributeAttributeGetter Callback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 1315 static void withExecutionContextAndScriptStateWithSpacesAttributeAttributeGetter Callback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1282 { 1316 {
1283 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1317 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1284 TestObjV8Internal::withExecutionContextAndScriptStateWithSpacesAttributeAttr ibuteGetter(info); 1318 TestObjV8Internal::withExecutionContextAndScriptStateWithSpacesAttributeAttr ibuteGetter(info);
1285 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1319 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1286 } 1320 }
1287 1321
1288 static void withExecutionContextAndScriptStateWithSpacesAttributeAttributeSetter (v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1322 static void withExecutionContextAndScriptStateWithSpacesAttributeAttributeSetter (v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1289 { 1323 {
1324 ExceptionState exceptionState(ExceptionState::SetterContext, "withExecutionC ontextAndScriptStateWithSpacesAttribute", "TestObject", info.Holder(), info.GetI solate());
1290 TestObj* imp = V8TestObject::toNative(info.Holder()); 1325 TestObj* imp = V8TestObject::toNative(info.Holder());
1291 V8TRYCATCH_VOID(TestObj*, cppValue, V8TestObject::hasInstance(jsValue, info. GetIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle< v8::Object>::Cast(jsValue)) : 0); 1326 V8TRYCATCH_VOID(TestObj*, cppValue, V8TestObject::hasInstance(jsValue, info. GetIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle< v8::Object>::Cast(jsValue)) : 0);
1292 ScriptState* currentState = ScriptState::current(); 1327 ScriptState* currentState = ScriptState::current();
1293 if (!currentState) 1328 if (!currentState)
1294 return; 1329 return;
1295 ScriptState& state = *currentState; 1330 ScriptState& state = *currentState;
1296 ExecutionContext* scriptContext = getExecutionContext(); 1331 ExecutionContext* scriptContext = getExecutionContext();
1297 imp->setWithExecutionContextAndScriptStateWithSpacesAttribute(&state, script Context, WTF::getPtr(cppValue)); 1332 imp->setWithExecutionContextAndScriptStateWithSpacesAttribute(&state, script Context, WTF::getPtr(cppValue));
1298 if (state.hadException()) 1333 if (state.hadException())
1299 throwError(state.exception(), info.GetIsolate()); 1334 throwError(state.exception(), info.GetIsolate());
(...skipping 14 matching lines...) Expand all
1314 1349
1315 static void enforcedRangeByteAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 1350 static void enforcedRangeByteAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1316 { 1351 {
1317 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1352 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1318 TestObjV8Internal::enforcedRangeByteAttrAttributeGetter(info); 1353 TestObjV8Internal::enforcedRangeByteAttrAttributeGetter(info);
1319 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1354 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1320 } 1355 }
1321 1356
1322 static void enforcedRangeByteAttrAttributeSetter(v8::Local<v8::Value> jsValue, c onst v8::PropertyCallbackInfo<void>& info) 1357 static void enforcedRangeByteAttrAttributeSetter(v8::Local<v8::Value> jsValue, c onst v8::PropertyCallbackInfo<void>& info)
1323 { 1358 {
1359 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeB yteAttr", "TestObject", info.Holder(), info.GetIsolate());
1324 TestObj* imp = V8TestObject::toNative(info.Holder()); 1360 TestObj* imp = V8TestObject::toNative(info.Holder());
1325 V8TRYCATCH_WITH_TYPECHECK_VOID(int, cppValue, toInt8(jsValue, EnforceRange, ok), info.GetIsolate()); 1361 V8TRYCATCH_WITH_TYPECHECK_VOID(int, cppValue, toInt8(jsValue, EnforceRange, ok), info.GetIsolate());
1326 imp->setEnforcedRangeByteAttr(cppValue); 1362 imp->setEnforcedRangeByteAttr(cppValue);
1327 } 1363 }
1328 1364
1329 static void enforcedRangeByteAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1365 static void enforcedRangeByteAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1330 { 1366 {
1331 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1367 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1332 TestObjV8Internal::enforcedRangeByteAttrAttributeSetter(jsValue, info); 1368 TestObjV8Internal::enforcedRangeByteAttrAttributeSetter(jsValue, info);
1333 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1369 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1334 } 1370 }
1335 1371
1336 static void enforcedRangeOctetAttrAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info) 1372 static void enforcedRangeOctetAttrAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info)
1337 { 1373 {
1338 TestObj* imp = V8TestObject::toNative(info.Holder()); 1374 TestObj* imp = V8TestObject::toNative(info.Holder());
1339 v8SetReturnValueUnsigned(info, imp->enforcedRangeOctetAttr()); 1375 v8SetReturnValueUnsigned(info, imp->enforcedRangeOctetAttr());
1340 } 1376 }
1341 1377
1342 static void enforcedRangeOctetAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 1378 static void enforcedRangeOctetAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1343 { 1379 {
1344 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1380 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1345 TestObjV8Internal::enforcedRangeOctetAttrAttributeGetter(info); 1381 TestObjV8Internal::enforcedRangeOctetAttrAttributeGetter(info);
1346 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1382 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1347 } 1383 }
1348 1384
1349 static void enforcedRangeOctetAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1385 static void enforcedRangeOctetAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1350 { 1386 {
1387 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeO ctetAttr", "TestObject", info.Holder(), info.GetIsolate());
1351 TestObj* imp = V8TestObject::toNative(info.Holder()); 1388 TestObj* imp = V8TestObject::toNative(info.Holder());
1352 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, cppValue, toUInt8(jsValue, EnforceR ange, ok), info.GetIsolate()); 1389 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, cppValue, toUInt8(jsValue, EnforceR ange, ok), info.GetIsolate());
1353 imp->setEnforcedRangeOctetAttr(cppValue); 1390 imp->setEnforcedRangeOctetAttr(cppValue);
1354 } 1391 }
1355 1392
1356 static void enforcedRangeOctetAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1393 static void enforcedRangeOctetAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1357 { 1394 {
1358 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1395 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1359 TestObjV8Internal::enforcedRangeOctetAttrAttributeSetter(jsValue, info); 1396 TestObjV8Internal::enforcedRangeOctetAttrAttributeSetter(jsValue, info);
1360 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1397 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1361 } 1398 }
1362 1399
1363 static void enforcedRangeShortAttrAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info) 1400 static void enforcedRangeShortAttrAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info)
1364 { 1401 {
1365 TestObj* imp = V8TestObject::toNative(info.Holder()); 1402 TestObj* imp = V8TestObject::toNative(info.Holder());
1366 v8SetReturnValueInt(info, imp->enforcedRangeShortAttr()); 1403 v8SetReturnValueInt(info, imp->enforcedRangeShortAttr());
1367 } 1404 }
1368 1405
1369 static void enforcedRangeShortAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 1406 static void enforcedRangeShortAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1370 { 1407 {
1371 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1408 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1372 TestObjV8Internal::enforcedRangeShortAttrAttributeGetter(info); 1409 TestObjV8Internal::enforcedRangeShortAttrAttributeGetter(info);
1373 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1410 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1374 } 1411 }
1375 1412
1376 static void enforcedRangeShortAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1413 static void enforcedRangeShortAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1377 { 1414 {
1415 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeS hortAttr", "TestObject", info.Holder(), info.GetIsolate());
1378 TestObj* imp = V8TestObject::toNative(info.Holder()); 1416 TestObj* imp = V8TestObject::toNative(info.Holder());
1379 V8TRYCATCH_WITH_TYPECHECK_VOID(int, cppValue, toInt16(jsValue, EnforceRange, ok), info.GetIsolate()); 1417 V8TRYCATCH_WITH_TYPECHECK_VOID(int, cppValue, toInt16(jsValue, EnforceRange, ok), info.GetIsolate());
1380 imp->setEnforcedRangeShortAttr(cppValue); 1418 imp->setEnforcedRangeShortAttr(cppValue);
1381 } 1419 }
1382 1420
1383 static void enforcedRangeShortAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1421 static void enforcedRangeShortAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1384 { 1422 {
1385 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1423 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1386 TestObjV8Internal::enforcedRangeShortAttrAttributeSetter(jsValue, info); 1424 TestObjV8Internal::enforcedRangeShortAttrAttributeSetter(jsValue, info);
1387 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1425 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1388 } 1426 }
1389 1427
1390 static void enforcedRangeUnsignedShortAttrAttributeGetter(const v8::PropertyCall backInfo<v8::Value>& info) 1428 static void enforcedRangeUnsignedShortAttrAttributeGetter(const v8::PropertyCall backInfo<v8::Value>& info)
1391 { 1429 {
1392 TestObj* imp = V8TestObject::toNative(info.Holder()); 1430 TestObj* imp = V8TestObject::toNative(info.Holder());
1393 v8SetReturnValueUnsigned(info, imp->enforcedRangeUnsignedShortAttr()); 1431 v8SetReturnValueUnsigned(info, imp->enforcedRangeUnsignedShortAttr());
1394 } 1432 }
1395 1433
1396 static void enforcedRangeUnsignedShortAttrAttributeGetterCallback(v8::Local<v8:: String>, const v8::PropertyCallbackInfo<v8::Value>& info) 1434 static void enforcedRangeUnsignedShortAttrAttributeGetterCallback(v8::Local<v8:: String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1397 { 1435 {
1398 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1436 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1399 TestObjV8Internal::enforcedRangeUnsignedShortAttrAttributeGetter(info); 1437 TestObjV8Internal::enforcedRangeUnsignedShortAttrAttributeGetter(info);
1400 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1438 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1401 } 1439 }
1402 1440
1403 static void enforcedRangeUnsignedShortAttrAttributeSetter(v8::Local<v8::Value> j sValue, const v8::PropertyCallbackInfo<void>& info) 1441 static void enforcedRangeUnsignedShortAttrAttributeSetter(v8::Local<v8::Value> j sValue, const v8::PropertyCallbackInfo<void>& info)
1404 { 1442 {
1443 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeU nsignedShortAttr", "TestObject", info.Holder(), info.GetIsolate());
1405 TestObj* imp = V8TestObject::toNative(info.Holder()); 1444 TestObj* imp = V8TestObject::toNative(info.Holder());
1406 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, cppValue, toUInt16(jsValue, Enforce Range, ok), info.GetIsolate()); 1445 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, cppValue, toUInt16(jsValue, Enforce Range, ok), info.GetIsolate());
1407 imp->setEnforcedRangeUnsignedShortAttr(cppValue); 1446 imp->setEnforcedRangeUnsignedShortAttr(cppValue);
1408 } 1447 }
1409 1448
1410 static void enforcedRangeUnsignedShortAttrAttributeSetterCallback(v8::Local<v8:: String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& inf o) 1449 static void enforcedRangeUnsignedShortAttrAttributeSetterCallback(v8::Local<v8:: String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& inf o)
1411 { 1450 {
1412 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1451 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1413 TestObjV8Internal::enforcedRangeUnsignedShortAttrAttributeSetter(jsValue, in fo); 1452 TestObjV8Internal::enforcedRangeUnsignedShortAttrAttributeSetter(jsValue, in fo);
1414 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1453 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1415 } 1454 }
1416 1455
1417 static void enforcedRangeLongAttrAttributeGetter(const v8::PropertyCallbackInfo< v8::Value>& info) 1456 static void enforcedRangeLongAttrAttributeGetter(const v8::PropertyCallbackInfo< v8::Value>& info)
1418 { 1457 {
1419 TestObj* imp = V8TestObject::toNative(info.Holder()); 1458 TestObj* imp = V8TestObject::toNative(info.Holder());
1420 v8SetReturnValueInt(info, imp->enforcedRangeLongAttr()); 1459 v8SetReturnValueInt(info, imp->enforcedRangeLongAttr());
1421 } 1460 }
1422 1461
1423 static void enforcedRangeLongAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 1462 static void enforcedRangeLongAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1424 { 1463 {
1425 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1464 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1426 TestObjV8Internal::enforcedRangeLongAttrAttributeGetter(info); 1465 TestObjV8Internal::enforcedRangeLongAttrAttributeGetter(info);
1427 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1466 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1428 } 1467 }
1429 1468
1430 static void enforcedRangeLongAttrAttributeSetter(v8::Local<v8::Value> jsValue, c onst v8::PropertyCallbackInfo<void>& info) 1469 static void enforcedRangeLongAttrAttributeSetter(v8::Local<v8::Value> jsValue, c onst v8::PropertyCallbackInfo<void>& info)
1431 { 1470 {
1471 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeL ongAttr", "TestObject", info.Holder(), info.GetIsolate());
1432 TestObj* imp = V8TestObject::toNative(info.Holder()); 1472 TestObj* imp = V8TestObject::toNative(info.Holder());
1433 V8TRYCATCH_WITH_TYPECHECK_VOID(int, cppValue, toInt32(jsValue, EnforceRange, ok), info.GetIsolate()); 1473 V8TRYCATCH_WITH_TYPECHECK_VOID(int, cppValue, toInt32(jsValue, EnforceRange, ok), info.GetIsolate());
1434 imp->setEnforcedRangeLongAttr(cppValue); 1474 imp->setEnforcedRangeLongAttr(cppValue);
1435 } 1475 }
1436 1476
1437 static void enforcedRangeLongAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1477 static void enforcedRangeLongAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1438 { 1478 {
1439 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1479 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1440 TestObjV8Internal::enforcedRangeLongAttrAttributeSetter(jsValue, info); 1480 TestObjV8Internal::enforcedRangeLongAttrAttributeSetter(jsValue, info);
1441 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1481 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1442 } 1482 }
1443 1483
1444 static void enforcedRangeUnsignedLongAttrAttributeGetter(const v8::PropertyCallb ackInfo<v8::Value>& info) 1484 static void enforcedRangeUnsignedLongAttrAttributeGetter(const v8::PropertyCallb ackInfo<v8::Value>& info)
1445 { 1485 {
1446 TestObj* imp = V8TestObject::toNative(info.Holder()); 1486 TestObj* imp = V8TestObject::toNative(info.Holder());
1447 v8SetReturnValueUnsigned(info, imp->enforcedRangeUnsignedLongAttr()); 1487 v8SetReturnValueUnsigned(info, imp->enforcedRangeUnsignedLongAttr());
1448 } 1488 }
1449 1489
1450 static void enforcedRangeUnsignedLongAttrAttributeGetterCallback(v8::Local<v8::S tring>, const v8::PropertyCallbackInfo<v8::Value>& info) 1490 static void enforcedRangeUnsignedLongAttrAttributeGetterCallback(v8::Local<v8::S tring>, const v8::PropertyCallbackInfo<v8::Value>& info)
1451 { 1491 {
1452 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1492 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1453 TestObjV8Internal::enforcedRangeUnsignedLongAttrAttributeGetter(info); 1493 TestObjV8Internal::enforcedRangeUnsignedLongAttrAttributeGetter(info);
1454 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1494 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1455 } 1495 }
1456 1496
1457 static void enforcedRangeUnsignedLongAttrAttributeSetter(v8::Local<v8::Value> js Value, const v8::PropertyCallbackInfo<void>& info) 1497 static void enforcedRangeUnsignedLongAttrAttributeSetter(v8::Local<v8::Value> js Value, const v8::PropertyCallbackInfo<void>& info)
1458 { 1498 {
1499 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeU nsignedLongAttr", "TestObject", info.Holder(), info.GetIsolate());
1459 TestObj* imp = V8TestObject::toNative(info.Holder()); 1500 TestObj* imp = V8TestObject::toNative(info.Holder());
1460 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, cppValue, toUInt32(jsValue, Enforce Range, ok), info.GetIsolate()); 1501 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, cppValue, toUInt32(jsValue, Enforce Range, ok), info.GetIsolate());
1461 imp->setEnforcedRangeUnsignedLongAttr(cppValue); 1502 imp->setEnforcedRangeUnsignedLongAttr(cppValue);
1462 } 1503 }
1463 1504
1464 static void enforcedRangeUnsignedLongAttrAttributeSetterCallback(v8::Local<v8::S tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info ) 1505 static void enforcedRangeUnsignedLongAttrAttributeSetterCallback(v8::Local<v8::S tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info )
1465 { 1506 {
1466 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1507 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1467 TestObjV8Internal::enforcedRangeUnsignedLongAttrAttributeSetter(jsValue, inf o); 1508 TestObjV8Internal::enforcedRangeUnsignedLongAttrAttributeSetter(jsValue, inf o);
1468 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1509 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1469 } 1510 }
1470 1511
1471 static void enforcedRangeLongLongAttrAttributeGetter(const v8::PropertyCallbackI nfo<v8::Value>& info) 1512 static void enforcedRangeLongLongAttrAttributeGetter(const v8::PropertyCallbackI nfo<v8::Value>& info)
1472 { 1513 {
1473 TestObj* imp = V8TestObject::toNative(info.Holder()); 1514 TestObj* imp = V8TestObject::toNative(info.Holder());
1474 v8SetReturnValue(info, static_cast<double>(imp->enforcedRangeLongLongAttr()) ); 1515 v8SetReturnValue(info, static_cast<double>(imp->enforcedRangeLongLongAttr()) );
1475 } 1516 }
1476 1517
1477 static void enforcedRangeLongLongAttrAttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info) 1518 static void enforcedRangeLongLongAttrAttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info)
1478 { 1519 {
1479 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1520 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1480 TestObjV8Internal::enforcedRangeLongLongAttrAttributeGetter(info); 1521 TestObjV8Internal::enforcedRangeLongLongAttrAttributeGetter(info);
1481 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1522 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1482 } 1523 }
1483 1524
1484 static void enforcedRangeLongLongAttrAttributeSetter(v8::Local<v8::Value> jsValu e, const v8::PropertyCallbackInfo<void>& info) 1525 static void enforcedRangeLongLongAttrAttributeSetter(v8::Local<v8::Value> jsValu e, const v8::PropertyCallbackInfo<void>& info)
1485 { 1526 {
1527 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeL ongLongAttr", "TestObject", info.Holder(), info.GetIsolate());
1486 TestObj* imp = V8TestObject::toNative(info.Holder()); 1528 TestObj* imp = V8TestObject::toNative(info.Holder());
1487 V8TRYCATCH_WITH_TYPECHECK_VOID(long long, cppValue, toInt64(jsValue, Enforce Range, ok), info.GetIsolate()); 1529 V8TRYCATCH_WITH_TYPECHECK_VOID(long long, cppValue, toInt64(jsValue, Enforce Range, ok), info.GetIsolate());
1488 imp->setEnforcedRangeLongLongAttr(cppValue); 1530 imp->setEnforcedRangeLongLongAttr(cppValue);
1489 } 1531 }
1490 1532
1491 static void enforcedRangeLongLongAttrAttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1533 static void enforcedRangeLongLongAttrAttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1492 { 1534 {
1493 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1535 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1494 TestObjV8Internal::enforcedRangeLongLongAttrAttributeSetter(jsValue, info); 1536 TestObjV8Internal::enforcedRangeLongLongAttrAttributeSetter(jsValue, info);
1495 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1537 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1496 } 1538 }
1497 1539
1498 static void enforcedRangeUnsignedLongLongAttrAttributeGetter(const v8::PropertyC allbackInfo<v8::Value>& info) 1540 static void enforcedRangeUnsignedLongLongAttrAttributeGetter(const v8::PropertyC allbackInfo<v8::Value>& info)
1499 { 1541 {
1500 TestObj* imp = V8TestObject::toNative(info.Holder()); 1542 TestObj* imp = V8TestObject::toNative(info.Holder());
1501 v8SetReturnValue(info, static_cast<double>(imp->enforcedRangeUnsignedLongLon gAttr())); 1543 v8SetReturnValue(info, static_cast<double>(imp->enforcedRangeUnsignedLongLon gAttr()));
1502 } 1544 }
1503 1545
1504 static void enforcedRangeUnsignedLongLongAttrAttributeGetterCallback(v8::Local<v 8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 1546 static void enforcedRangeUnsignedLongLongAttrAttributeGetterCallback(v8::Local<v 8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1505 { 1547 {
1506 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1548 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1507 TestObjV8Internal::enforcedRangeUnsignedLongLongAttrAttributeGetter(info); 1549 TestObjV8Internal::enforcedRangeUnsignedLongLongAttrAttributeGetter(info);
1508 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1550 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1509 } 1551 }
1510 1552
1511 static void enforcedRangeUnsignedLongLongAttrAttributeSetter(v8::Local<v8::Value > jsValue, const v8::PropertyCallbackInfo<void>& info) 1553 static void enforcedRangeUnsignedLongLongAttrAttributeSetter(v8::Local<v8::Value > jsValue, const v8::PropertyCallbackInfo<void>& info)
1512 { 1554 {
1555 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeU nsignedLongLongAttr", "TestObject", info.Holder(), info.GetIsolate());
1513 TestObj* imp = V8TestObject::toNative(info.Holder()); 1556 TestObj* imp = V8TestObject::toNative(info.Holder());
1514 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned long long, cppValue, toUInt64(jsValu e, EnforceRange, ok), info.GetIsolate()); 1557 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned long long, cppValue, toUInt64(jsValu e, EnforceRange, ok), info.GetIsolate());
1515 imp->setEnforcedRangeUnsignedLongLongAttr(cppValue); 1558 imp->setEnforcedRangeUnsignedLongLongAttr(cppValue);
1516 } 1559 }
1517 1560
1518 static void enforcedRangeUnsignedLongLongAttrAttributeSetterCallback(v8::Local<v 8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1561 static void enforcedRangeUnsignedLongLongAttrAttributeSetterCallback(v8::Local<v 8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1519 { 1562 {
1520 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1563 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1521 TestObjV8Internal::enforcedRangeUnsignedLongLongAttrAttributeSetter(jsValue, info); 1564 TestObjV8Internal::enforcedRangeUnsignedLongLongAttrAttributeSetter(jsValue, info);
1522 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1565 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
(...skipping 12 matching lines...) Expand all
1535 { 1578 {
1536 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1579 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1537 TestObjV8Internal::conditionalAttr1AttributeGetter(info); 1580 TestObjV8Internal::conditionalAttr1AttributeGetter(info);
1538 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1581 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1539 } 1582 }
1540 #endif // ENABLE(Condition1) 1583 #endif // ENABLE(Condition1)
1541 1584
1542 #if ENABLE(Condition1) 1585 #if ENABLE(Condition1)
1543 static void conditionalAttr1AttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1586 static void conditionalAttr1AttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1544 { 1587 {
1588 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalAtt r1", "TestObject", info.Holder(), info.GetIsolate());
1545 TestObj* imp = V8TestObject::toNative(info.Holder()); 1589 TestObj* imp = V8TestObject::toNative(info.Holder());
1546 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 1590 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue));
1547 imp->setConditionalAttr1(cppValue); 1591 imp->setConditionalAttr1(cppValue);
1548 } 1592 }
1549 #endif // ENABLE(Condition1) 1593 #endif // ENABLE(Condition1)
1550 1594
1551 #if ENABLE(Condition1) 1595 #if ENABLE(Condition1)
1552 static void conditionalAttr1AttributeSetterCallback(v8::Local<v8::String>, v8::L ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1596 static void conditionalAttr1AttributeSetterCallback(v8::Local<v8::String>, v8::L ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1553 { 1597 {
1554 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1598 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
(...skipping 15 matching lines...) Expand all
1570 { 1614 {
1571 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1615 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1572 TestObjV8Internal::conditionalAttr2AttributeGetter(info); 1616 TestObjV8Internal::conditionalAttr2AttributeGetter(info);
1573 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1617 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1574 } 1618 }
1575 #endif // ENABLE(Condition1) && ENABLE(Condition2) 1619 #endif // ENABLE(Condition1) && ENABLE(Condition2)
1576 1620
1577 #if ENABLE(Condition1) && ENABLE(Condition2) 1621 #if ENABLE(Condition1) && ENABLE(Condition2)
1578 static void conditionalAttr2AttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1622 static void conditionalAttr2AttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1579 { 1623 {
1624 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalAtt r2", "TestObject", info.Holder(), info.GetIsolate());
1580 TestObj* imp = V8TestObject::toNative(info.Holder()); 1625 TestObj* imp = V8TestObject::toNative(info.Holder());
1581 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 1626 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue));
1582 imp->setConditionalAttr2(cppValue); 1627 imp->setConditionalAttr2(cppValue);
1583 } 1628 }
1584 #endif // ENABLE(Condition1) && ENABLE(Condition2) 1629 #endif // ENABLE(Condition1) && ENABLE(Condition2)
1585 1630
1586 #if ENABLE(Condition1) && ENABLE(Condition2) 1631 #if ENABLE(Condition1) && ENABLE(Condition2)
1587 static void conditionalAttr2AttributeSetterCallback(v8::Local<v8::String>, v8::L ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1632 static void conditionalAttr2AttributeSetterCallback(v8::Local<v8::String>, v8::L ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1588 { 1633 {
1589 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1634 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
(...skipping 15 matching lines...) Expand all
1605 { 1650 {
1606 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1651 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1607 TestObjV8Internal::conditionalAttr3AttributeGetter(info); 1652 TestObjV8Internal::conditionalAttr3AttributeGetter(info);
1608 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1653 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1609 } 1654 }
1610 #endif // ENABLE(Condition1) || ENABLE(Condition2) 1655 #endif // ENABLE(Condition1) || ENABLE(Condition2)
1611 1656
1612 #if ENABLE(Condition1) || ENABLE(Condition2) 1657 #if ENABLE(Condition1) || ENABLE(Condition2)
1613 static void conditionalAttr3AttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1658 static void conditionalAttr3AttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1614 { 1659 {
1660 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalAtt r3", "TestObject", info.Holder(), info.GetIsolate());
1615 TestObj* imp = V8TestObject::toNative(info.Holder()); 1661 TestObj* imp = V8TestObject::toNative(info.Holder());
1616 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 1662 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue));
1617 imp->setConditionalAttr3(cppValue); 1663 imp->setConditionalAttr3(cppValue);
1618 } 1664 }
1619 #endif // ENABLE(Condition1) || ENABLE(Condition2) 1665 #endif // ENABLE(Condition1) || ENABLE(Condition2)
1620 1666
1621 #if ENABLE(Condition1) || ENABLE(Condition2) 1667 #if ENABLE(Condition1) || ENABLE(Condition2)
1622 static void conditionalAttr3AttributeSetterCallback(v8::Local<v8::String>, v8::L ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1668 static void conditionalAttr3AttributeSetterCallback(v8::Local<v8::String>, v8::L ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1623 { 1669 {
1624 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1670 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
1680 { 1726 {
1681 v8::Handle<v8::String> propertyName = v8::String::NewFromUtf8(info.GetIsolat e(), "cachedDirtyableAttributeRaises", v8::String::kInternalizedString); 1727 v8::Handle<v8::String> propertyName = v8::String::NewFromUtf8(info.GetIsolat e(), "cachedDirtyableAttributeRaises", v8::String::kInternalizedString);
1682 TestObj* imp = V8TestObject::toNative(info.Holder()); 1728 TestObj* imp = V8TestObject::toNative(info.Holder());
1683 if (!imp->isValueDirty()) { 1729 if (!imp->isValueDirty()) {
1684 v8::Handle<v8::Value> jsValue = info.Holder()->GetHiddenValue(propertyNa me); 1730 v8::Handle<v8::Value> jsValue = info.Holder()->GetHiddenValue(propertyNa me);
1685 if (!jsValue.IsEmpty()) { 1731 if (!jsValue.IsEmpty()) {
1686 v8SetReturnValue(info, jsValue); 1732 v8SetReturnValue(info, jsValue);
1687 return; 1733 return;
1688 } 1734 }
1689 } 1735 }
1690 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); 1736 ExceptionState exceptionState(ExceptionState::GetterContext, "cachedDirtyabl eAttributeRaises", "TestObject" ,info.Holder(), info.GetIsolate());
1691 ScriptValue jsValue = imp->cachedDirtyableAttributeRaises(exceptionState); 1737 ScriptValue jsValue = imp->cachedDirtyableAttributeRaises(exceptionState);
1692 if (UNLIKELY(exceptionState.throwIfNeeded())) 1738 if (UNLIKELY(exceptionState.throwIfNeeded()))
1693 return; 1739 return;
1694 info.Holder()->SetHiddenValue(propertyName, jsValue.v8Value()); 1740 info.Holder()->SetHiddenValue(propertyName, jsValue.v8Value());
1695 v8SetReturnValue(info, jsValue.v8Value()); 1741 v8SetReturnValue(info, jsValue.v8Value());
1696 } 1742 }
1697 1743
1698 static void cachedDirtyableAttributeRaisesAttributeGetterCallback(v8::Local<v8:: String>, const v8::PropertyCallbackInfo<v8::Value>& info) 1744 static void cachedDirtyableAttributeRaisesAttributeGetterCallback(v8::Local<v8:: String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1699 { 1745 {
1700 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1746 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1701 TestObjV8Internal::cachedDirtyableAttributeRaisesAttributeGetter(info); 1747 TestObjV8Internal::cachedDirtyableAttributeRaisesAttributeGetter(info);
1702 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1748 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1703 } 1749 }
1704 1750
1705 static void anyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value >& info) 1751 static void anyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value >& info)
1706 { 1752 {
1707 TestObj* imp = V8TestObject::toNative(info.Holder()); 1753 TestObj* imp = V8TestObject::toNative(info.Holder());
1708 v8SetReturnValue(info, imp->anyAttribute().v8Value()); 1754 v8SetReturnValue(info, imp->anyAttribute().v8Value());
1709 } 1755 }
1710 1756
1711 static void anyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8: :PropertyCallbackInfo<v8::Value>& info) 1757 static void anyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8: :PropertyCallbackInfo<v8::Value>& info)
1712 { 1758 {
1713 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1759 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1714 TestObjV8Internal::anyAttributeAttributeGetter(info); 1760 TestObjV8Internal::anyAttributeAttributeGetter(info);
1715 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1761 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1716 } 1762 }
1717 1763
1718 static void anyAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8:: PropertyCallbackInfo<void>& info) 1764 static void anyAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8:: PropertyCallbackInfo<void>& info)
1719 { 1765 {
1766 ExceptionState exceptionState(ExceptionState::SetterContext, "anyAttribute", "TestObject", info.Holder(), info.GetIsolate());
1720 TestObj* imp = V8TestObject::toNative(info.Holder()); 1767 TestObj* imp = V8TestObject::toNative(info.Holder());
1721 V8TRYCATCH_VOID(ScriptValue, cppValue, ScriptValue(jsValue, info.GetIsolate( ))); 1768 V8TRYCATCH_VOID(ScriptValue, cppValue, ScriptValue(jsValue, info.GetIsolate( )));
1722 imp->setAnyAttribute(cppValue); 1769 imp->setAnyAttribute(cppValue);
1723 } 1770 }
1724 1771
1725 static void anyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local <v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1772 static void anyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local <v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1726 { 1773 {
1727 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1774 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1728 TestObjV8Internal::anyAttributeAttributeSetter(jsValue, info); 1775 TestObjV8Internal::anyAttributeAttributeSetter(jsValue, info);
1729 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1776 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1730 } 1777 }
1731 1778
1732 static void callbackFunctionAttributeAttributeGetter(const v8::PropertyCallbackI nfo<v8::Value>& info) 1779 static void callbackFunctionAttributeAttributeGetter(const v8::PropertyCallbackI nfo<v8::Value>& info)
1733 { 1780 {
1734 TestObj* imp = V8TestObject::toNative(info.Holder()); 1781 TestObj* imp = V8TestObject::toNative(info.Holder());
1735 v8SetReturnValue(info, imp->callbackFunctionAttribute().v8Value()); 1782 v8SetReturnValue(info, imp->callbackFunctionAttribute().v8Value());
1736 } 1783 }
1737 1784
1738 static void callbackFunctionAttributeAttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info) 1785 static void callbackFunctionAttributeAttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info)
1739 { 1786 {
1740 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1787 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1741 TestObjV8Internal::callbackFunctionAttributeAttributeGetter(info); 1788 TestObjV8Internal::callbackFunctionAttributeAttributeGetter(info);
1742 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1789 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1743 } 1790 }
1744 1791
1745 static void callbackFunctionAttributeAttributeSetter(v8::Local<v8::Value> jsValu e, const v8::PropertyCallbackInfo<void>& info) 1792 static void callbackFunctionAttributeAttributeSetter(v8::Local<v8::Value> jsValu e, const v8::PropertyCallbackInfo<void>& info)
1746 { 1793 {
1794 ExceptionState exceptionState(ExceptionState::SetterContext, "callbackFuncti onAttribute", "TestObject", info.Holder(), info.GetIsolate());
1747 TestObj* imp = V8TestObject::toNative(info.Holder()); 1795 TestObj* imp = V8TestObject::toNative(info.Holder());
1748 V8TRYCATCH_VOID(ScriptValue, cppValue, ScriptValue(jsValue, info.GetIsolate( ))); 1796 V8TRYCATCH_VOID(ScriptValue, cppValue, ScriptValue(jsValue, info.GetIsolate( )));
1749 imp->setCallbackFunctionAttribute(cppValue); 1797 imp->setCallbackFunctionAttribute(cppValue);
1750 } 1798 }
1751 1799
1752 static void callbackFunctionAttributeAttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1800 static void callbackFunctionAttributeAttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1753 { 1801 {
1754 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1802 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1755 TestObjV8Internal::callbackFunctionAttributeAttributeSetter(jsValue, info); 1803 TestObjV8Internal::callbackFunctionAttributeAttributeSetter(jsValue, info);
1756 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1804 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1757 } 1805 }
1758 1806
1759 static void enabledAtRuntimeAttrAttributeGetter(const v8::PropertyCallbackInfo<v 8::Value>& info) 1807 static void enabledAtRuntimeAttrAttributeGetter(const v8::PropertyCallbackInfo<v 8::Value>& info)
1760 { 1808 {
1761 TestObj* imp = V8TestObject::toNative(info.Holder()); 1809 TestObj* imp = V8TestObject::toNative(info.Holder());
1762 v8SetReturnValueInt(info, imp->enabledAtRuntimeAttr()); 1810 v8SetReturnValueInt(info, imp->enabledAtRuntimeAttr());
1763 } 1811 }
1764 1812
1765 static void enabledAtRuntimeAttrAttributeGetterCallback(v8::Local<v8::String>, c onst v8::PropertyCallbackInfo<v8::Value>& info) 1813 static void enabledAtRuntimeAttrAttributeGetterCallback(v8::Local<v8::String>, c onst v8::PropertyCallbackInfo<v8::Value>& info)
1766 { 1814 {
1767 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1815 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1768 TestObjV8Internal::enabledAtRuntimeAttrAttributeGetter(info); 1816 TestObjV8Internal::enabledAtRuntimeAttrAttributeGetter(info);
1769 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1817 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1770 } 1818 }
1771 1819
1772 static void enabledAtRuntimeAttrAttributeSetter(v8::Local<v8::Value> jsValue, co nst v8::PropertyCallbackInfo<void>& info) 1820 static void enabledAtRuntimeAttrAttributeSetter(v8::Local<v8::Value> jsValue, co nst v8::PropertyCallbackInfo<void>& info)
1773 { 1821 {
1822 ExceptionState exceptionState(ExceptionState::SetterContext, "enabledAtRunti meAttr", "TestObject", info.Holder(), info.GetIsolate());
1774 TestObj* imp = V8TestObject::toNative(info.Holder()); 1823 TestObj* imp = V8TestObject::toNative(info.Holder());
1775 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 1824 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue));
1776 imp->setEnabledAtRuntimeAttr(cppValue); 1825 imp->setEnabledAtRuntimeAttr(cppValue);
1777 } 1826 }
1778 1827
1779 static void enabledAtRuntimeAttrAttributeSetterCallback(v8::Local<v8::String>, v 8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1828 static void enabledAtRuntimeAttrAttributeSetterCallback(v8::Local<v8::String>, v 8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1780 { 1829 {
1781 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1830 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1782 TestObjV8Internal::enabledAtRuntimeAttrAttributeSetter(jsValue, info); 1831 TestObjV8Internal::enabledAtRuntimeAttrAttributeSetter(jsValue, info);
1783 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1832 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1784 } 1833 }
1785 1834
1786 static void enabledPerContextAttrAttributeGetter(const v8::PropertyCallbackInfo< v8::Value>& info) 1835 static void enabledPerContextAttrAttributeGetter(const v8::PropertyCallbackInfo< v8::Value>& info)
1787 { 1836 {
1788 TestObj* imp = V8TestObject::toNative(info.Holder()); 1837 TestObj* imp = V8TestObject::toNative(info.Holder());
1789 v8SetReturnValueInt(info, imp->enabledPerContextAttr()); 1838 v8SetReturnValueInt(info, imp->enabledPerContextAttr());
1790 } 1839 }
1791 1840
1792 static void enabledPerContextAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 1841 static void enabledPerContextAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1793 { 1842 {
1794 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1843 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1795 TestObjV8Internal::enabledPerContextAttrAttributeGetter(info); 1844 TestObjV8Internal::enabledPerContextAttrAttributeGetter(info);
1796 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1845 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1797 } 1846 }
1798 1847
1799 static void enabledPerContextAttrAttributeSetter(v8::Local<v8::Value> jsValue, c onst v8::PropertyCallbackInfo<void>& info) 1848 static void enabledPerContextAttrAttributeSetter(v8::Local<v8::Value> jsValue, c onst v8::PropertyCallbackInfo<void>& info)
1800 { 1849 {
1850 ExceptionState exceptionState(ExceptionState::SetterContext, "enabledPerCont extAttr", "TestObject", info.Holder(), info.GetIsolate());
1801 TestObj* imp = V8TestObject::toNative(info.Holder()); 1851 TestObj* imp = V8TestObject::toNative(info.Holder());
1802 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 1852 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue));
1803 imp->setEnabledPerContextAttr(cppValue); 1853 imp->setEnabledPerContextAttr(cppValue);
1804 } 1854 }
1805 1855
1806 static void enabledPerContextAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1856 static void enabledPerContextAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1807 { 1857 {
1808 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1858 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1809 TestObjV8Internal::enabledPerContextAttrAttributeSetter(jsValue, info); 1859 TestObjV8Internal::enabledPerContextAttrAttributeSetter(jsValue, info);
1810 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1860 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1811 } 1861 }
1812 1862
1813 static void floatArrayAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) 1863 static void floatArrayAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1814 { 1864 {
1815 TestObj* imp = V8TestObject::toNative(info.Holder()); 1865 TestObj* imp = V8TestObject::toNative(info.Holder());
1816 v8SetReturnValue(info, v8Array(imp->floatArray(), info.GetIsolate())); 1866 v8SetReturnValue(info, v8Array(imp->floatArray(), info.GetIsolate()));
1817 } 1867 }
1818 1868
1819 static void floatArrayAttributeGetterCallback(v8::Local<v8::String>, const v8::P ropertyCallbackInfo<v8::Value>& info) 1869 static void floatArrayAttributeGetterCallback(v8::Local<v8::String>, const v8::P ropertyCallbackInfo<v8::Value>& info)
1820 { 1870 {
1821 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1871 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1822 TestObjV8Internal::floatArrayAttributeGetter(info); 1872 TestObjV8Internal::floatArrayAttributeGetter(info);
1823 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1873 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1824 } 1874 }
1825 1875
1826 static void floatArrayAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pr opertyCallbackInfo<void>& info) 1876 static void floatArrayAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pr opertyCallbackInfo<void>& info)
1827 { 1877 {
1878 ExceptionState exceptionState(ExceptionState::SetterContext, "floatArray", " TestObject", info.Holder(), info.GetIsolate());
1828 TestObj* imp = V8TestObject::toNative(info.Holder()); 1879 TestObj* imp = V8TestObject::toNative(info.Holder());
1829 V8TRYCATCH_VOID(Vector<float>, cppValue, toNativeArray<float>(jsValue, 0, in fo.GetIsolate())); 1880 V8TRYCATCH_VOID(Vector<float>, cppValue, toNativeArray<float>(jsValue, 0, in fo.GetIsolate()));
1830 imp->setFloatArray(cppValue); 1881 imp->setFloatArray(cppValue);
1831 } 1882 }
1832 1883
1833 static void floatArrayAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v 8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1884 static void floatArrayAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v 8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1834 { 1885 {
1835 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1886 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1836 TestObjV8Internal::floatArrayAttributeSetter(jsValue, info); 1887 TestObjV8Internal::floatArrayAttributeSetter(jsValue, info);
1837 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1888 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1838 } 1889 }
1839 1890
1840 static void doubleArrayAttributeGetter(const v8::PropertyCallbackInfo<v8::Value> & info) 1891 static void doubleArrayAttributeGetter(const v8::PropertyCallbackInfo<v8::Value> & info)
1841 { 1892 {
1842 TestObj* imp = V8TestObject::toNative(info.Holder()); 1893 TestObj* imp = V8TestObject::toNative(info.Holder());
1843 v8SetReturnValue(info, v8Array(imp->doubleArray(), info.GetIsolate())); 1894 v8SetReturnValue(info, v8Array(imp->doubleArray(), info.GetIsolate()));
1844 } 1895 }
1845 1896
1846 static void doubleArrayAttributeGetterCallback(v8::Local<v8::String>, const v8:: PropertyCallbackInfo<v8::Value>& info) 1897 static void doubleArrayAttributeGetterCallback(v8::Local<v8::String>, const v8:: PropertyCallbackInfo<v8::Value>& info)
1847 { 1898 {
1848 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1899 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1849 TestObjV8Internal::doubleArrayAttributeGetter(info); 1900 TestObjV8Internal::doubleArrayAttributeGetter(info);
1850 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1901 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1851 } 1902 }
1852 1903
1853 static void doubleArrayAttributeSetter(v8::Local<v8::Value> jsValue, const v8::P ropertyCallbackInfo<void>& info) 1904 static void doubleArrayAttributeSetter(v8::Local<v8::Value> jsValue, const v8::P ropertyCallbackInfo<void>& info)
1854 { 1905 {
1906 ExceptionState exceptionState(ExceptionState::SetterContext, "doubleArray", "TestObject", info.Holder(), info.GetIsolate());
1855 TestObj* imp = V8TestObject::toNative(info.Holder()); 1907 TestObj* imp = V8TestObject::toNative(info.Holder());
1856 V8TRYCATCH_VOID(Vector<double>, cppValue, toNativeArray<double>(jsValue, 0, info.GetIsolate())); 1908 V8TRYCATCH_VOID(Vector<double>, cppValue, toNativeArray<double>(jsValue, 0, info.GetIsolate()));
1857 imp->setDoubleArray(cppValue); 1909 imp->setDoubleArray(cppValue);
1858 } 1910 }
1859 1911
1860 static void doubleArrayAttributeSetterCallback(v8::Local<v8::String>, v8::Local< v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1912 static void doubleArrayAttributeSetterCallback(v8::Local<v8::String>, v8::Local< v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1861 { 1913 {
1862 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1914 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1863 TestObjV8Internal::doubleArrayAttributeSetter(jsValue, info); 1915 TestObjV8Internal::doubleArrayAttributeSetter(jsValue, info);
1864 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1916 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1865 } 1917 }
1866 1918
1867 static void messagePortArrayAttributeGetter(const v8::PropertyCallbackInfo<v8::V alue>& info) 1919 static void messagePortArrayAttributeGetter(const v8::PropertyCallbackInfo<v8::V alue>& info)
1868 { 1920 {
1869 TestObj* imp = V8TestObject::toNative(info.Holder()); 1921 TestObj* imp = V8TestObject::toNative(info.Holder());
1870 v8SetReturnValue(info, v8Array(imp->messagePortArray(), info.GetIsolate())); 1922 v8SetReturnValue(info, v8Array(imp->messagePortArray(), info.GetIsolate()));
1871 } 1923 }
1872 1924
1873 static void messagePortArrayAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 1925 static void messagePortArrayAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1874 { 1926 {
1875 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1927 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1876 TestObjV8Internal::messagePortArrayAttributeGetter(info); 1928 TestObjV8Internal::messagePortArrayAttributeGetter(info);
1877 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1929 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1878 } 1930 }
1879 1931
1880 static void messagePortArrayAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1932 static void messagePortArrayAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1881 { 1933 {
1934 ExceptionState exceptionState(ExceptionState::SetterContext, "messagePortArr ay", "TestObject", info.Holder(), info.GetIsolate());
1882 TestObj* imp = V8TestObject::toNative(info.Holder()); 1935 TestObj* imp = V8TestObject::toNative(info.Holder());
1883 V8TRYCATCH_VOID(Vector<RefPtr<MessagePort> >, cppValue, (toRefPtrNativeArray <MessagePort, V8MessagePort>(jsValue, 0, info.GetIsolate()))); 1936 V8TRYCATCH_VOID(Vector<RefPtr<MessagePort> >, cppValue, (toRefPtrNativeArray <MessagePort, V8MessagePort>(jsValue, 0, info.GetIsolate())));
1884 imp->setMessagePortArray(cppValue); 1937 imp->setMessagePortArray(cppValue);
1885 } 1938 }
1886 1939
1887 static void messagePortArrayAttributeSetterCallback(v8::Local<v8::String>, v8::L ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1940 static void messagePortArrayAttributeSetterCallback(v8::Local<v8::String>, v8::L ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1888 { 1941 {
1889 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1942 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1890 TestObjV8Internal::messagePortArrayAttributeSetter(jsValue, info); 1943 TestObjV8Internal::messagePortArrayAttributeSetter(jsValue, info);
1891 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1944 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1892 } 1945 }
1893 1946
1894 static void contentDocumentAttributeGetter(const v8::PropertyCallbackInfo<v8::Va lue>& info) 1947 static void contentDocumentAttributeGetter(const v8::PropertyCallbackInfo<v8::Va lue>& info)
1895 { 1948 {
1896 TestObj* imp = V8TestObject::toNative(info.Holder()); 1949 TestObj* imp = V8TestObject::toNative(info.Holder());
1897 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); 1950 ExceptionState exceptionState(ExceptionState::GetterContext, "contentDocumen t", "TestObject" ,info.Holder(), info.GetIsolate());
1898 if (!BindingSecurity::shouldAllowAccessToNode(imp->contentDocument(), except ionState)) { 1951 if (!BindingSecurity::shouldAllowAccessToNode(imp->contentDocument(), except ionState)) {
1899 v8SetReturnValueNull(info); 1952 v8SetReturnValueNull(info);
1900 exceptionState.throwIfNeeded(); 1953 exceptionState.throwIfNeeded();
1901 return; 1954 return;
1902 } 1955 }
1903 v8SetReturnValueFast(info, imp->contentDocument(), imp); 1956 v8SetReturnValueFast(info, imp->contentDocument(), imp);
1904 } 1957 }
1905 1958
1906 static void contentDocumentAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 1959 static void contentDocumentAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1907 { 1960 {
(...skipping 10 matching lines...) Expand all
1918 1971
1919 static void mutablePointAttributeGetterCallback(v8::Local<v8::String>, const v8: :PropertyCallbackInfo<v8::Value>& info) 1972 static void mutablePointAttributeGetterCallback(v8::Local<v8::String>, const v8: :PropertyCallbackInfo<v8::Value>& info)
1920 { 1973 {
1921 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1974 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1922 TestObjV8Internal::mutablePointAttributeGetter(info); 1975 TestObjV8Internal::mutablePointAttributeGetter(info);
1923 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1976 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1924 } 1977 }
1925 1978
1926 static void mutablePointAttributeSetter(v8::Local<v8::Value> jsValue, const v8:: PropertyCallbackInfo<void>& info) 1979 static void mutablePointAttributeSetter(v8::Local<v8::Value> jsValue, const v8:: PropertyCallbackInfo<void>& info)
1927 { 1980 {
1981 ExceptionState exceptionState(ExceptionState::SetterContext, "mutablePoint", "TestObject", info.Holder(), info.GetIsolate());
1928 TestObj* imp = V8TestObject::toNative(info.Holder()); 1982 TestObj* imp = V8TestObject::toNative(info.Holder());
1929 V8TRYCATCH_VOID(RefPtr<SVGPropertyTearOff<SVGPoint> >, cppValue, V8SVGPoint: :hasInstance(jsValue, info.GetIsolate(), worldType(info.GetIsolate())) ? V8SVGPo int::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0); 1983 V8TRYCATCH_VOID(RefPtr<SVGPropertyTearOff<SVGPoint> >, cppValue, V8SVGPoint: :hasInstance(jsValue, info.GetIsolate(), worldType(info.GetIsolate())) ? V8SVGPo int::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0);
1930 if (!WTF::getPtr(cppValue)) { 1984 if (!WTF::getPtr(cppValue)) {
1931 throwTypeError(ExceptionMessages::failedToSet("mutablePoint", "TestObjec t", "The provided value is not of type 'SVGPoint'."), info.GetIsolate()); 1985 exceptionState.throwTypeError("The provided value is not of type 'SVGPoi nt'.");
1986 exceptionState.throwIfNeeded();
1932 return; 1987 return;
1933 } 1988 }
1934 imp->setMutablePoint(WTF::getPtr(cppValue)->propertyReference()); 1989 imp->setMutablePoint(WTF::getPtr(cppValue)->propertyReference());
1935 } 1990 }
1936 1991
1937 static void mutablePointAttributeSetterCallback(v8::Local<v8::String>, v8::Local <v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1992 static void mutablePointAttributeSetterCallback(v8::Local<v8::String>, v8::Local <v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1938 { 1993 {
1939 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1994 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1940 TestObjV8Internal::mutablePointAttributeSetter(jsValue, info); 1995 TestObjV8Internal::mutablePointAttributeSetter(jsValue, info);
1941 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1996 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1942 } 1997 }
1943 1998
1944 static void immutablePointAttributeGetter(const v8::PropertyCallbackInfo<v8::Val ue>& info) 1999 static void immutablePointAttributeGetter(const v8::PropertyCallbackInfo<v8::Val ue>& info)
1945 { 2000 {
1946 TestObj* imp = V8TestObject::toNative(info.Holder()); 2001 TestObj* imp = V8TestObject::toNative(info.Holder());
1947 v8SetReturnValueFast(info, WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create( imp->immutablePoint())), imp); 2002 v8SetReturnValueFast(info, WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create( imp->immutablePoint())), imp);
1948 } 2003 }
1949 2004
1950 static void immutablePointAttributeGetterCallback(v8::Local<v8::String>, const v 8::PropertyCallbackInfo<v8::Value>& info) 2005 static void immutablePointAttributeGetterCallback(v8::Local<v8::String>, const v 8::PropertyCallbackInfo<v8::Value>& info)
1951 { 2006 {
1952 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2007 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1953 TestObjV8Internal::immutablePointAttributeGetter(info); 2008 TestObjV8Internal::immutablePointAttributeGetter(info);
1954 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2009 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1955 } 2010 }
1956 2011
1957 static void immutablePointAttributeSetter(v8::Local<v8::Value> jsValue, const v8 ::PropertyCallbackInfo<void>& info) 2012 static void immutablePointAttributeSetter(v8::Local<v8::Value> jsValue, const v8 ::PropertyCallbackInfo<void>& info)
1958 { 2013 {
2014 ExceptionState exceptionState(ExceptionState::SetterContext, "immutablePoint ", "TestObject", info.Holder(), info.GetIsolate());
1959 TestObj* imp = V8TestObject::toNative(info.Holder()); 2015 TestObj* imp = V8TestObject::toNative(info.Holder());
1960 V8TRYCATCH_VOID(RefPtr<SVGPropertyTearOff<SVGPoint> >, cppValue, V8SVGPoint: :hasInstance(jsValue, info.GetIsolate(), worldType(info.GetIsolate())) ? V8SVGPo int::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0); 2016 V8TRYCATCH_VOID(RefPtr<SVGPropertyTearOff<SVGPoint> >, cppValue, V8SVGPoint: :hasInstance(jsValue, info.GetIsolate(), worldType(info.GetIsolate())) ? V8SVGPo int::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0);
1961 if (!WTF::getPtr(cppValue)) { 2017 if (!WTF::getPtr(cppValue)) {
1962 throwTypeError(ExceptionMessages::failedToSet("immutablePoint", "TestObj ect", "The provided value is not of type 'SVGPoint'."), info.GetIsolate()); 2018 exceptionState.throwTypeError("The provided value is not of type 'SVGPoi nt'.");
2019 exceptionState.throwIfNeeded();
1963 return; 2020 return;
1964 } 2021 }
1965 imp->setImmutablePoint(WTF::getPtr(cppValue)->propertyReference()); 2022 imp->setImmutablePoint(WTF::getPtr(cppValue)->propertyReference());
1966 } 2023 }
1967 2024
1968 static void immutablePointAttributeSetterCallback(v8::Local<v8::String>, v8::Loc al<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2025 static void immutablePointAttributeSetterCallback(v8::Local<v8::String>, v8::Loc al<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1969 { 2026 {
1970 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2027 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1971 TestObjV8Internal::immutablePointAttributeSetter(jsValue, info); 2028 TestObjV8Internal::immutablePointAttributeSetter(jsValue, info);
1972 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2029 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1973 } 2030 }
1974 2031
1975 static void strawberryAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) 2032 static void strawberryAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1976 { 2033 {
1977 TestObj* imp = V8TestObject::toNative(info.Holder()); 2034 TestObj* imp = V8TestObject::toNative(info.Holder());
1978 v8SetReturnValueInt(info, imp->blueberry()); 2035 v8SetReturnValueInt(info, imp->blueberry());
1979 } 2036 }
1980 2037
1981 static void strawberryAttributeGetterCallback(v8::Local<v8::String>, const v8::P ropertyCallbackInfo<v8::Value>& info) 2038 static void strawberryAttributeGetterCallback(v8::Local<v8::String>, const v8::P ropertyCallbackInfo<v8::Value>& info)
1982 { 2039 {
1983 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2040 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1984 TestObjV8Internal::strawberryAttributeGetter(info); 2041 TestObjV8Internal::strawberryAttributeGetter(info);
1985 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2042 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1986 } 2043 }
1987 2044
1988 static void strawberryAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pr opertyCallbackInfo<void>& info) 2045 static void strawberryAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pr opertyCallbackInfo<void>& info)
1989 { 2046 {
2047 ExceptionState exceptionState(ExceptionState::SetterContext, "strawberry", " TestObject", info.Holder(), info.GetIsolate());
1990 TestObj* imp = V8TestObject::toNative(info.Holder()); 2048 TestObj* imp = V8TestObject::toNative(info.Holder());
1991 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2049 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue));
1992 imp->setBlueberry(cppValue); 2050 imp->setBlueberry(cppValue);
1993 } 2051 }
1994 2052
1995 static void strawberryAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v 8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2053 static void strawberryAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v 8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1996 { 2054 {
1997 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2055 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1998 TestObjV8Internal::strawberryAttributeSetter(jsValue, info); 2056 TestObjV8Internal::strawberryAttributeSetter(jsValue, info);
1999 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2057 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2000 } 2058 }
2001 2059
2002 static void strictFloatAttributeGetter(const v8::PropertyCallbackInfo<v8::Value> & info) 2060 static void strictFloatAttributeGetter(const v8::PropertyCallbackInfo<v8::Value> & info)
2003 { 2061 {
2004 TestObj* imp = V8TestObject::toNative(info.Holder()); 2062 TestObj* imp = V8TestObject::toNative(info.Holder());
2005 v8SetReturnValue(info, imp->strictFloat()); 2063 v8SetReturnValue(info, imp->strictFloat());
2006 } 2064 }
2007 2065
2008 static void strictFloatAttributeGetterCallback(v8::Local<v8::String>, const v8:: PropertyCallbackInfo<v8::Value>& info) 2066 static void strictFloatAttributeGetterCallback(v8::Local<v8::String>, const v8:: PropertyCallbackInfo<v8::Value>& info)
2009 { 2067 {
2010 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2068 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2011 TestObjV8Internal::strictFloatAttributeGetter(info); 2069 TestObjV8Internal::strictFloatAttributeGetter(info);
2012 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2070 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2013 } 2071 }
2014 2072
2015 static void strictFloatAttributeSetter(v8::Local<v8::Value> jsValue, const v8::P ropertyCallbackInfo<void>& info) 2073 static void strictFloatAttributeSetter(v8::Local<v8::Value> jsValue, const v8::P ropertyCallbackInfo<void>& info)
2016 { 2074 {
2075 ExceptionState exceptionState(ExceptionState::SetterContext, "strictFloat", "TestObject", info.Holder(), info.GetIsolate());
2017 TestObj* imp = V8TestObject::toNative(info.Holder()); 2076 TestObj* imp = V8TestObject::toNative(info.Holder());
2018 V8TRYCATCH_VOID(float, cppValue, static_cast<float>(jsValue->NumberValue())) ; 2077 V8TRYCATCH_VOID(float, cppValue, static_cast<float>(jsValue->NumberValue())) ;
2019 imp->setStrictFloat(cppValue); 2078 imp->setStrictFloat(cppValue);
2020 } 2079 }
2021 2080
2022 static void strictFloatAttributeSetterCallback(v8::Local<v8::String>, v8::Local< v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2081 static void strictFloatAttributeSetterCallback(v8::Local<v8::String>, v8::Local< v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2023 { 2082 {
2024 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2083 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2025 TestObjV8Internal::strictFloatAttributeSetter(jsValue, info); 2084 TestObjV8Internal::strictFloatAttributeSetter(jsValue, info);
2026 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2085 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
2129 2188
2130 static void nullableLongSettableAttributeAttributeGetterCallback(v8::Local<v8::S tring>, const v8::PropertyCallbackInfo<v8::Value>& info) 2189 static void nullableLongSettableAttributeAttributeGetterCallback(v8::Local<v8::S tring>, const v8::PropertyCallbackInfo<v8::Value>& info)
2131 { 2190 {
2132 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2191 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2133 TestObjV8Internal::nullableLongSettableAttributeAttributeGetter(info); 2192 TestObjV8Internal::nullableLongSettableAttributeAttributeGetter(info);
2134 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2193 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2135 } 2194 }
2136 2195
2137 static void nullableLongSettableAttributeAttributeSetter(v8::Local<v8::Value> js Value, const v8::PropertyCallbackInfo<void>& info) 2196 static void nullableLongSettableAttributeAttributeSetter(v8::Local<v8::Value> js Value, const v8::PropertyCallbackInfo<void>& info)
2138 { 2197 {
2198 ExceptionState exceptionState(ExceptionState::SetterContext, "nullableLongSe ttableAttribute", "TestObject", info.Holder(), info.GetIsolate());
2139 TestObj* imp = V8TestObject::toNative(info.Holder()); 2199 TestObj* imp = V8TestObject::toNative(info.Holder());
2140 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2200 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue));
2141 imp->setNullableLongSettableAttribute(cppValue); 2201 imp->setNullableLongSettableAttribute(cppValue);
2142 } 2202 }
2143 2203
2144 static void nullableLongSettableAttributeAttributeSetterCallback(v8::Local<v8::S tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info ) 2204 static void nullableLongSettableAttributeAttributeSetterCallback(v8::Local<v8::S tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info )
2145 { 2205 {
2146 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2206 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2147 TestObjV8Internal::nullableLongSettableAttributeAttributeSetter(jsValue, inf o); 2207 TestObjV8Internal::nullableLongSettableAttributeAttributeSetter(jsValue, inf o);
2148 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2208 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2149 } 2209 }
2150 2210
2151 static void nullableStringValueAttributeGetter(const v8::PropertyCallbackInfo<v8 ::Value>& info) 2211 static void nullableStringValueAttributeGetter(const v8::PropertyCallbackInfo<v8 ::Value>& info)
2152 { 2212 {
2153 TestObj* imp = V8TestObject::toNative(info.Holder()); 2213 TestObj* imp = V8TestObject::toNative(info.Holder());
2154 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); 2214 ExceptionState exceptionState(ExceptionState::GetterContext, "nullableString Value", "TestObject" ,info.Holder(), info.GetIsolate());
2155 bool isNull = false; 2215 bool isNull = false;
2156 int jsValue = imp->nullableStringValue(isNull, exceptionState); 2216 int jsValue = imp->nullableStringValue(isNull, exceptionState);
2157 if (isNull) { 2217 if (isNull) {
2158 v8SetReturnValueNull(info); 2218 v8SetReturnValueNull(info);
2159 return; 2219 return;
2160 } 2220 }
2161 if (UNLIKELY(exceptionState.throwIfNeeded())) 2221 if (UNLIKELY(exceptionState.throwIfNeeded()))
2162 return; 2222 return;
2163 v8SetReturnValueInt(info, jsValue); 2223 v8SetReturnValueInt(info, jsValue);
2164 } 2224 }
2165 2225
2166 static void nullableStringValueAttributeGetterCallback(v8::Local<v8::String>, co nst v8::PropertyCallbackInfo<v8::Value>& info) 2226 static void nullableStringValueAttributeGetterCallback(v8::Local<v8::String>, co nst v8::PropertyCallbackInfo<v8::Value>& info)
2167 { 2227 {
2168 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2228 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2169 TestObjV8Internal::nullableStringValueAttributeGetter(info); 2229 TestObjV8Internal::nullableStringValueAttributeGetter(info);
2170 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2230 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2171 } 2231 }
2172 2232
2173 static void nullableStringValueAttributeSetter(v8::Local<v8::Value> jsValue, con st v8::PropertyCallbackInfo<void>& info) 2233 static void nullableStringValueAttributeSetter(v8::Local<v8::Value> jsValue, con st v8::PropertyCallbackInfo<void>& info)
2174 { 2234 {
2235 ExceptionState exceptionState(ExceptionState::SetterContext, "nullableString Value", "TestObject", info.Holder(), info.GetIsolate());
2175 TestObj* imp = V8TestObject::toNative(info.Holder()); 2236 TestObj* imp = V8TestObject::toNative(info.Holder());
2176 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2237 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue));
2177 imp->setNullableStringValue(cppValue); 2238 imp->setNullableStringValue(cppValue);
2178 } 2239 }
2179 2240
2180 static void nullableStringValueAttributeSetterCallback(v8::Local<v8::String>, v8 ::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2241 static void nullableStringValueAttributeSetterCallback(v8::Local<v8::String>, v8 ::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2181 { 2242 {
2182 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2243 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2183 TestObjV8Internal::nullableStringValueAttributeSetter(jsValue, info); 2244 TestObjV8Internal::nullableStringValueAttributeSetter(jsValue, info);
2184 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2245 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
2232 2293
2233 static void perWorldAttributeAttributeGetterCallback(v8::Local<v8::String>, cons t v8::PropertyCallbackInfo<v8::Value>& info) 2294 static void perWorldAttributeAttributeGetterCallback(v8::Local<v8::String>, cons t v8::PropertyCallbackInfo<v8::Value>& info)
2234 { 2295 {
2235 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2296 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2236 TestObjV8Internal::perWorldAttributeAttributeGetter(info); 2297 TestObjV8Internal::perWorldAttributeAttributeGetter(info);
2237 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2298 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2238 } 2299 }
2239 2300
2240 static void perWorldAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2301 static void perWorldAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2241 { 2302 {
2303 ExceptionState exceptionState(ExceptionState::SetterContext, "perWorldAttrib ute", "TestObject", info.Holder(), info.GetIsolate());
2242 TestObj* imp = V8TestObject::toNative(info.Holder()); 2304 TestObj* imp = V8TestObject::toNative(info.Holder());
2243 V8TRYCATCH_VOID(TestObj*, cppValue, V8TestObject::hasInstance(jsValue, info. GetIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle< v8::Object>::Cast(jsValue)) : 0); 2305 V8TRYCATCH_VOID(TestObj*, cppValue, V8TestObject::hasInstance(jsValue, info. GetIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle< v8::Object>::Cast(jsValue)) : 0);
2244 imp->setPerWorldAttribute(WTF::getPtr(cppValue)); 2306 imp->setPerWorldAttribute(WTF::getPtr(cppValue));
2245 } 2307 }
2246 2308
2247 static void perWorldAttributeAttributeSetterCallback(v8::Local<v8::String>, v8:: Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2309 static void perWorldAttributeAttributeSetterCallback(v8::Local<v8::String>, v8:: Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2248 { 2310 {
2249 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2311 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2250 TestObjV8Internal::perWorldAttributeAttributeSetter(jsValue, info); 2312 TestObjV8Internal::perWorldAttributeAttributeSetter(jsValue, info);
2251 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2313 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2252 } 2314 }
2253 2315
2254 static void perWorldAttributeAttributeGetterForMainWorld(const v8::PropertyCallb ackInfo<v8::Value>& info) 2316 static void perWorldAttributeAttributeGetterForMainWorld(const v8::PropertyCallb ackInfo<v8::Value>& info)
2255 { 2317 {
2256 TestObj* imp = V8TestObject::toNative(info.Holder()); 2318 TestObj* imp = V8TestObject::toNative(info.Holder());
2257 v8SetReturnValueForMainWorld(info, imp->perWorldAttribute()); 2319 v8SetReturnValueForMainWorld(info, imp->perWorldAttribute());
2258 } 2320 }
2259 2321
2260 static void perWorldAttributeAttributeGetterCallbackForMainWorld(v8::Local<v8::S tring>, const v8::PropertyCallbackInfo<v8::Value>& info) 2322 static void perWorldAttributeAttributeGetterCallbackForMainWorld(v8::Local<v8::S tring>, const v8::PropertyCallbackInfo<v8::Value>& info)
2261 { 2323 {
2262 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2324 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2263 TestObjV8Internal::perWorldAttributeAttributeGetterForMainWorld(info); 2325 TestObjV8Internal::perWorldAttributeAttributeGetterForMainWorld(info);
2264 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2326 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2265 } 2327 }
2266 2328
2267 static void perWorldAttributeAttributeSetterForMainWorld(v8::Local<v8::Value> js Value, const v8::PropertyCallbackInfo<void>& info) 2329 static void perWorldAttributeAttributeSetterForMainWorld(v8::Local<v8::Value> js Value, const v8::PropertyCallbackInfo<void>& info)
2268 { 2330 {
2331 ExceptionState exceptionState(ExceptionState::SetterContext, "perWorldAttrib ute", "TestObject", info.Holder(), info.GetIsolate());
2269 TestObj* imp = V8TestObject::toNative(info.Holder()); 2332 TestObj* imp = V8TestObject::toNative(info.Holder());
2270 V8TRYCATCH_VOID(TestObj*, cppValue, V8TestObject::hasInstance(jsValue, info. GetIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle< v8::Object>::Cast(jsValue)) : 0); 2333 V8TRYCATCH_VOID(TestObj*, cppValue, V8TestObject::hasInstance(jsValue, info. GetIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle< v8::Object>::Cast(jsValue)) : 0);
2271 imp->setPerWorldAttribute(WTF::getPtr(cppValue)); 2334 imp->setPerWorldAttribute(WTF::getPtr(cppValue));
2272 } 2335 }
2273 2336
2274 static void perWorldAttributeAttributeSetterCallbackForMainWorld(v8::Local<v8::S tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info ) 2337 static void perWorldAttributeAttributeSetterCallbackForMainWorld(v8::Local<v8::S tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info )
2275 { 2338 {
2276 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2339 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2277 TestObjV8Internal::perWorldAttributeAttributeSetterForMainWorld(jsValue, inf o); 2340 TestObjV8Internal::perWorldAttributeAttributeSetterForMainWorld(jsValue, inf o);
2278 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2341 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
(...skipping 10 matching lines...) Expand all
2289 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2352 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2290 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 2353 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2291 if (contextData && contextData->activityLogger()) 2354 if (contextData && contextData->activityLogger())
2292 contextData->activityLogger()->log("TestObject.activityLoggedAttr1", 0, 0, "Getter"); 2355 contextData->activityLogger()->log("TestObject.activityLoggedAttr1", 0, 0, "Getter");
2293 TestObjV8Internal::activityLoggedAttr1AttributeGetter(info); 2356 TestObjV8Internal::activityLoggedAttr1AttributeGetter(info);
2294 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2357 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2295 } 2358 }
2296 2359
2297 static void activityLoggedAttr1AttributeSetter(v8::Local<v8::Value> jsValue, con st v8::PropertyCallbackInfo<void>& info) 2360 static void activityLoggedAttr1AttributeSetter(v8::Local<v8::Value> jsValue, con st v8::PropertyCallbackInfo<void>& info)
2298 { 2361 {
2362 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged Attr1", "TestObject", info.Holder(), info.GetIsolate());
2299 TestObj* imp = V8TestObject::toNative(info.Holder()); 2363 TestObj* imp = V8TestObject::toNative(info.Holder());
2300 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2364 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue));
2301 imp->setActivityLoggedAttr1(cppValue); 2365 imp->setActivityLoggedAttr1(cppValue);
2302 } 2366 }
2303 2367
2304 static void activityLoggedAttr1AttributeSetterCallback(v8::Local<v8::String>, v8 ::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2368 static void activityLoggedAttr1AttributeSetterCallback(v8::Local<v8::String>, v8 ::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2305 { 2369 {
2306 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2370 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2307 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 2371 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2308 if (contextData && contextData->activityLogger()) { 2372 if (contextData && contextData->activityLogger()) {
(...skipping 15 matching lines...) Expand all
2324 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2388 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2325 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 2389 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2326 if (contextData && contextData->activityLogger()) 2390 if (contextData && contextData->activityLogger())
2327 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 0, 0, "Getter"); 2391 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 0, 0, "Getter");
2328 TestObjV8Internal::activityLoggedAttr2AttributeGetter(info); 2392 TestObjV8Internal::activityLoggedAttr2AttributeGetter(info);
2329 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2393 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2330 } 2394 }
2331 2395
2332 static void activityLoggedAttr2AttributeSetter(v8::Local<v8::Value> jsValue, con st v8::PropertyCallbackInfo<void>& info) 2396 static void activityLoggedAttr2AttributeSetter(v8::Local<v8::Value> jsValue, con st v8::PropertyCallbackInfo<void>& info)
2333 { 2397 {
2398 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged Attr2", "TestObject", info.Holder(), info.GetIsolate());
2334 TestObj* imp = V8TestObject::toNative(info.Holder()); 2399 TestObj* imp = V8TestObject::toNative(info.Holder());
2335 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2400 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue));
2336 imp->setActivityLoggedAttr2(cppValue); 2401 imp->setActivityLoggedAttr2(cppValue);
2337 } 2402 }
2338 2403
2339 static void activityLoggedAttr2AttributeSetterCallback(v8::Local<v8::String>, v8 ::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2404 static void activityLoggedAttr2AttributeSetterCallback(v8::Local<v8::String>, v8 ::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2340 { 2405 {
2341 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2406 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2342 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 2407 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2343 if (contextData && contextData->activityLogger()) { 2408 if (contextData && contextData->activityLogger()) {
(...skipping 15 matching lines...) Expand all
2359 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2424 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2360 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 2425 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2361 if (contextData && contextData->activityLogger()) 2426 if (contextData && contextData->activityLogger())
2362 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 0, 0, "Getter"); 2427 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 0, 0, "Getter");
2363 TestObjV8Internal::activityLoggedAttr2AttributeGetterForMainWorld(info); 2428 TestObjV8Internal::activityLoggedAttr2AttributeGetterForMainWorld(info);
2364 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2429 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2365 } 2430 }
2366 2431
2367 static void activityLoggedAttr2AttributeSetterForMainWorld(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2432 static void activityLoggedAttr2AttributeSetterForMainWorld(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2368 { 2433 {
2434 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged Attr2", "TestObject", info.Holder(), info.GetIsolate());
2369 TestObj* imp = V8TestObject::toNative(info.Holder()); 2435 TestObj* imp = V8TestObject::toNative(info.Holder());
2370 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2436 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue));
2371 imp->setActivityLoggedAttr2(cppValue); 2437 imp->setActivityLoggedAttr2(cppValue);
2372 } 2438 }
2373 2439
2374 static void activityLoggedAttr2AttributeSetterCallbackForMainWorld(v8::Local<v8: :String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& in fo) 2440 static void activityLoggedAttr2AttributeSetterCallbackForMainWorld(v8::Local<v8: :String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& in fo)
2375 { 2441 {
2376 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2442 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2377 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 2443 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2378 if (contextData && contextData->activityLogger()) { 2444 if (contextData && contextData->activityLogger()) {
(...skipping 15 matching lines...) Expand all
2394 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2460 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2395 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 2461 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2396 if (contextData && contextData->activityLogger()) 2462 if (contextData && contextData->activityLogger())
2397 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW orldsAttr", 0, 0, "Getter"); 2463 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW orldsAttr", 0, 0, "Getter");
2398 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrAttributeGetter(info); 2464 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrAttributeGetter(info);
2399 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2465 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2400 } 2466 }
2401 2467
2402 static void activityLoggedInIsolatedWorldsAttrAttributeSetter(v8::Local<v8::Valu e> jsValue, const v8::PropertyCallbackInfo<void>& info) 2468 static void activityLoggedInIsolatedWorldsAttrAttributeSetter(v8::Local<v8::Valu e> jsValue, const v8::PropertyCallbackInfo<void>& info)
2403 { 2469 {
2470 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged InIsolatedWorldsAttr", "TestObject", info.Holder(), info.GetIsolate());
2404 TestObj* imp = V8TestObject::toNative(info.Holder()); 2471 TestObj* imp = V8TestObject::toNative(info.Holder());
2405 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2472 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue));
2406 imp->setActivityLoggedInIsolatedWorldsAttr(cppValue); 2473 imp->setActivityLoggedInIsolatedWorldsAttr(cppValue);
2407 } 2474 }
2408 2475
2409 static void activityLoggedInIsolatedWorldsAttrAttributeSetterCallback(v8::Local< v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2476 static void activityLoggedInIsolatedWorldsAttrAttributeSetterCallback(v8::Local< v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2410 { 2477 {
2411 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2478 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2412 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 2479 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2413 if (contextData && contextData->activityLogger()) { 2480 if (contextData && contextData->activityLogger()) {
(...skipping 12 matching lines...) Expand all
2426 2493
2427 static void activityLoggedInIsolatedWorldsAttrAttributeGetterCallbackForMainWorl d(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 2494 static void activityLoggedInIsolatedWorldsAttrAttributeGetterCallbackForMainWorl d(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2428 { 2495 {
2429 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2496 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2430 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrAttributeGetterForMainW orld(info); 2497 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrAttributeGetterForMainW orld(info);
2431 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2498 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2432 } 2499 }
2433 2500
2434 static void activityLoggedInIsolatedWorldsAttrAttributeSetterForMainWorld(v8::Lo cal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2501 static void activityLoggedInIsolatedWorldsAttrAttributeSetterForMainWorld(v8::Lo cal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2435 { 2502 {
2503 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged InIsolatedWorldsAttr", "TestObject", info.Holder(), info.GetIsolate());
2436 TestObj* imp = V8TestObject::toNative(info.Holder()); 2504 TestObj* imp = V8TestObject::toNative(info.Holder());
2437 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2505 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue));
2438 imp->setActivityLoggedInIsolatedWorldsAttr(cppValue); 2506 imp->setActivityLoggedInIsolatedWorldsAttr(cppValue);
2439 } 2507 }
2440 2508
2441 static void activityLoggedInIsolatedWorldsAttrAttributeSetterCallbackForMainWorl d(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbac kInfo<void>& info) 2509 static void activityLoggedInIsolatedWorldsAttrAttributeSetterCallbackForMainWorl d(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbac kInfo<void>& info)
2442 { 2510 {
2443 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2511 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2444 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrAttributeSetterForMainW orld(jsValue, info); 2512 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrAttributeSetterForMainW orld(jsValue, info);
2445 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2513 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2446 } 2514 }
2447 2515
2448 static void activityLoggedAttrSetter1AttributeGetter(const v8::PropertyCallbackI nfo<v8::Value>& info) 2516 static void activityLoggedAttrSetter1AttributeGetter(const v8::PropertyCallbackI nfo<v8::Value>& info)
2449 { 2517 {
2450 TestObj* imp = V8TestObject::toNative(info.Holder()); 2518 TestObj* imp = V8TestObject::toNative(info.Holder());
2451 v8SetReturnValueInt(info, imp->activityLoggedAttrSetter1()); 2519 v8SetReturnValueInt(info, imp->activityLoggedAttrSetter1());
2452 } 2520 }
2453 2521
2454 static void activityLoggedAttrSetter1AttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info) 2522 static void activityLoggedAttrSetter1AttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info)
2455 { 2523 {
2456 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2524 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2457 TestObjV8Internal::activityLoggedAttrSetter1AttributeGetter(info); 2525 TestObjV8Internal::activityLoggedAttrSetter1AttributeGetter(info);
2458 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2526 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2459 } 2527 }
2460 2528
2461 static void activityLoggedAttrSetter1AttributeSetter(v8::Local<v8::Value> jsValu e, const v8::PropertyCallbackInfo<void>& info) 2529 static void activityLoggedAttrSetter1AttributeSetter(v8::Local<v8::Value> jsValu e, const v8::PropertyCallbackInfo<void>& info)
2462 { 2530 {
2531 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged AttrSetter1", "TestObject", info.Holder(), info.GetIsolate());
2463 TestObj* imp = V8TestObject::toNative(info.Holder()); 2532 TestObj* imp = V8TestObject::toNative(info.Holder());
2464 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2533 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue));
2465 imp->setActivityLoggedAttrSetter1(cppValue); 2534 imp->setActivityLoggedAttrSetter1(cppValue);
2466 } 2535 }
2467 2536
2468 static void activityLoggedAttrSetter1AttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2537 static void activityLoggedAttrSetter1AttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2469 { 2538 {
2470 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2539 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2471 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 2540 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2472 if (contextData && contextData->activityLogger()) { 2541 if (contextData && contextData->activityLogger()) {
(...skipping 12 matching lines...) Expand all
2485 2554
2486 static void activityLoggedAttrSetter2AttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info) 2555 static void activityLoggedAttrSetter2AttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info)
2487 { 2556 {
2488 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2557 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2489 TestObjV8Internal::activityLoggedAttrSetter2AttributeGetter(info); 2558 TestObjV8Internal::activityLoggedAttrSetter2AttributeGetter(info);
2490 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2559 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2491 } 2560 }
2492 2561
2493 static void activityLoggedAttrSetter2AttributeSetter(v8::Local<v8::Value> jsValu e, const v8::PropertyCallbackInfo<void>& info) 2562 static void activityLoggedAttrSetter2AttributeSetter(v8::Local<v8::Value> jsValu e, const v8::PropertyCallbackInfo<void>& info)
2494 { 2563 {
2564 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged AttrSetter2", "TestObject", info.Holder(), info.GetIsolate());
2495 TestObj* imp = V8TestObject::toNative(info.Holder()); 2565 TestObj* imp = V8TestObject::toNative(info.Holder());
2496 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2566 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue));
2497 imp->setActivityLoggedAttrSetter2(cppValue); 2567 imp->setActivityLoggedAttrSetter2(cppValue);
2498 } 2568 }
2499 2569
2500 static void activityLoggedAttrSetter2AttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2570 static void activityLoggedAttrSetter2AttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2501 { 2571 {
2502 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2572 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2503 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 2573 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2504 if (contextData && contextData->activityLogger()) { 2574 if (contextData && contextData->activityLogger()) {
(...skipping 12 matching lines...) Expand all
2517 2587
2518 static void activityLoggedAttrSetter2AttributeGetterCallbackForMainWorld(v8::Loc al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 2588 static void activityLoggedAttrSetter2AttributeGetterCallbackForMainWorld(v8::Loc al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2519 { 2589 {
2520 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2590 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2521 TestObjV8Internal::activityLoggedAttrSetter2AttributeGetterForMainWorld(info ); 2591 TestObjV8Internal::activityLoggedAttrSetter2AttributeGetterForMainWorld(info );
2522 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2592 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2523 } 2593 }
2524 2594
2525 static void activityLoggedAttrSetter2AttributeSetterForMainWorld(v8::Local<v8::V alue> jsValue, const v8::PropertyCallbackInfo<void>& info) 2595 static void activityLoggedAttrSetter2AttributeSetterForMainWorld(v8::Local<v8::V alue> jsValue, const v8::PropertyCallbackInfo<void>& info)
2526 { 2596 {
2597 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged AttrSetter2", "TestObject", info.Holder(), info.GetIsolate());
2527 TestObj* imp = V8TestObject::toNative(info.Holder()); 2598 TestObj* imp = V8TestObject::toNative(info.Holder());
2528 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2599 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue));
2529 imp->setActivityLoggedAttrSetter2(cppValue); 2600 imp->setActivityLoggedAttrSetter2(cppValue);
2530 } 2601 }
2531 2602
2532 static void activityLoggedAttrSetter2AttributeSetterCallbackForMainWorld(v8::Loc al<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<voi d>& info) 2603 static void activityLoggedAttrSetter2AttributeSetterCallbackForMainWorld(v8::Loc al<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<voi d>& info)
2533 { 2604 {
2534 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2605 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2535 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 2606 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2536 if (contextData && contextData->activityLogger()) { 2607 if (contextData && contextData->activityLogger()) {
(...skipping 12 matching lines...) Expand all
2549 2620
2550 static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetterCallback(v8:: Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 2621 static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetterCallback(v8:: Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2551 { 2622 {
2552 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2623 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2553 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeGetter(i nfo); 2624 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeGetter(i nfo);
2554 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2625 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2555 } 2626 }
2556 2627
2557 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetter(v8::Local<v8 ::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2628 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetter(v8::Local<v8 ::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2558 { 2629 {
2630 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged InIsolatedWorldsAttrSetter", "TestObject", info.Holder(), info.GetIsolate());
2559 TestObj* imp = V8TestObject::toNative(info.Holder()); 2631 TestObj* imp = V8TestObject::toNative(info.Holder());
2560 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2632 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue));
2561 imp->setActivityLoggedInIsolatedWorldsAttrSetter(cppValue); 2633 imp->setActivityLoggedInIsolatedWorldsAttrSetter(cppValue);
2562 } 2634 }
2563 2635
2564 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetterCallback(v8:: Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo< void>& info) 2636 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetterCallback(v8:: Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo< void>& info)
2565 { 2637 {
2566 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2638 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2567 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 2639 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2568 if (contextData && contextData->activityLogger()) { 2640 if (contextData && contextData->activityLogger()) {
(...skipping 12 matching lines...) Expand all
2581 2653
2582 static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetterCallbackForMa inWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 2654 static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetterCallbackForMa inWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2583 { 2655 {
2584 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2656 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2585 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeGetterFo rMainWorld(info); 2657 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeGetterFo rMainWorld(info);
2586 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2658 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2587 } 2659 }
2588 2660
2589 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetterForMainWorld( v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2661 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetterForMainWorld( v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2590 { 2662 {
2663 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged InIsolatedWorldsAttrSetter", "TestObject", info.Holder(), info.GetIsolate());
2591 TestObj* imp = V8TestObject::toNative(info.Holder()); 2664 TestObj* imp = V8TestObject::toNative(info.Holder());
2592 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2665 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue));
2593 imp->setActivityLoggedInIsolatedWorldsAttrSetter(cppValue); 2666 imp->setActivityLoggedInIsolatedWorldsAttrSetter(cppValue);
2594 } 2667 }
2595 2668
2596 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetterCallbackForMa inWorld(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyC allbackInfo<void>& info) 2669 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetterCallbackForMa inWorld(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyC allbackInfo<void>& info)
2597 { 2670 {
2598 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2671 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2599 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeSetterFo rMainWorld(jsValue, info); 2672 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeSetterFo rMainWorld(jsValue, info);
2600 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2673 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
(...skipping 10 matching lines...) Expand all
2611 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2684 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2612 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 2685 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2613 if (contextData && contextData->activityLogger()) 2686 if (contextData && contextData->activityLogger())
2614 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter1 ", 0, 0, "Getter"); 2687 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter1 ", 0, 0, "Getter");
2615 TestObjV8Internal::activityLoggedAttrGetter1AttributeGetter(info); 2688 TestObjV8Internal::activityLoggedAttrGetter1AttributeGetter(info);
2616 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2689 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2617 } 2690 }
2618 2691
2619 static void activityLoggedAttrGetter1AttributeSetter(v8::Local<v8::Value> jsValu e, const v8::PropertyCallbackInfo<void>& info) 2692 static void activityLoggedAttrGetter1AttributeSetter(v8::Local<v8::Value> jsValu e, const v8::PropertyCallbackInfo<void>& info)
2620 { 2693 {
2694 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged AttrGetter1", "TestObject", info.Holder(), info.GetIsolate());
2621 TestObj* imp = V8TestObject::toNative(info.Holder()); 2695 TestObj* imp = V8TestObject::toNative(info.Holder());
2622 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2696 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue));
2623 imp->setActivityLoggedAttrGetter1(cppValue); 2697 imp->setActivityLoggedAttrGetter1(cppValue);
2624 } 2698 }
2625 2699
2626 static void activityLoggedAttrGetter1AttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2700 static void activityLoggedAttrGetter1AttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2627 { 2701 {
2628 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2702 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2629 TestObjV8Internal::activityLoggedAttrGetter1AttributeSetter(jsValue, info); 2703 TestObjV8Internal::activityLoggedAttrGetter1AttributeSetter(jsValue, info);
2630 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2704 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
(...skipping 10 matching lines...) Expand all
2641 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2715 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2642 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 2716 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2643 if (contextData && contextData->activityLogger()) 2717 if (contextData && contextData->activityLogger())
2644 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter2 ", 0, 0, "Getter"); 2718 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter2 ", 0, 0, "Getter");
2645 TestObjV8Internal::activityLoggedAttrGetter2AttributeGetter(info); 2719 TestObjV8Internal::activityLoggedAttrGetter2AttributeGetter(info);
2646 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2720 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2647 } 2721 }
2648 2722
2649 static void activityLoggedAttrGetter2AttributeSetter(v8::Local<v8::Value> jsValu e, const v8::PropertyCallbackInfo<void>& info) 2723 static void activityLoggedAttrGetter2AttributeSetter(v8::Local<v8::Value> jsValu e, const v8::PropertyCallbackInfo<void>& info)
2650 { 2724 {
2725 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged AttrGetter2", "TestObject", info.Holder(), info.GetIsolate());
2651 TestObj* imp = V8TestObject::toNative(info.Holder()); 2726 TestObj* imp = V8TestObject::toNative(info.Holder());
2652 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2727 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue));
2653 imp->setActivityLoggedAttrGetter2(cppValue); 2728 imp->setActivityLoggedAttrGetter2(cppValue);
2654 } 2729 }
2655 2730
2656 static void activityLoggedAttrGetter2AttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2731 static void activityLoggedAttrGetter2AttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2657 { 2732 {
2658 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2733 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2659 TestObjV8Internal::activityLoggedAttrGetter2AttributeSetter(jsValue, info); 2734 TestObjV8Internal::activityLoggedAttrGetter2AttributeSetter(jsValue, info);
2660 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2735 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
(...skipping 10 matching lines...) Expand all
2671 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2746 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2672 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 2747 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2673 if (contextData && contextData->activityLogger()) 2748 if (contextData && contextData->activityLogger())
2674 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter2 ", 0, 0, "Getter"); 2749 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter2 ", 0, 0, "Getter");
2675 TestObjV8Internal::activityLoggedAttrGetter2AttributeGetterForMainWorld(info ); 2750 TestObjV8Internal::activityLoggedAttrGetter2AttributeGetterForMainWorld(info );
2676 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2751 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2677 } 2752 }
2678 2753
2679 static void activityLoggedAttrGetter2AttributeSetterForMainWorld(v8::Local<v8::V alue> jsValue, const v8::PropertyCallbackInfo<void>& info) 2754 static void activityLoggedAttrGetter2AttributeSetterForMainWorld(v8::Local<v8::V alue> jsValue, const v8::PropertyCallbackInfo<void>& info)
2680 { 2755 {
2756 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged AttrGetter2", "TestObject", info.Holder(), info.GetIsolate());
2681 TestObj* imp = V8TestObject::toNative(info.Holder()); 2757 TestObj* imp = V8TestObject::toNative(info.Holder());
2682 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2758 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue));
2683 imp->setActivityLoggedAttrGetter2(cppValue); 2759 imp->setActivityLoggedAttrGetter2(cppValue);
2684 } 2760 }
2685 2761
2686 static void activityLoggedAttrGetter2AttributeSetterCallbackForMainWorld(v8::Loc al<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<voi d>& info) 2762 static void activityLoggedAttrGetter2AttributeSetterCallbackForMainWorld(v8::Loc al<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<voi d>& info)
2687 { 2763 {
2688 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2764 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2689 TestObjV8Internal::activityLoggedAttrGetter2AttributeSetterForMainWorld(jsVa lue, info); 2765 TestObjV8Internal::activityLoggedAttrGetter2AttributeSetterForMainWorld(jsVa lue, info);
2690 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2766 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
(...skipping 10 matching lines...) Expand all
2701 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2777 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2702 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 2778 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2703 if (contextData && contextData->activityLogger()) 2779 if (contextData && contextData->activityLogger())
2704 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW orldsAttrGetter", 0, 0, "Getter"); 2780 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW orldsAttrGetter", 0, 0, "Getter");
2705 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeGetter(i nfo); 2781 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeGetter(i nfo);
2706 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2782 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2707 } 2783 }
2708 2784
2709 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetter(v8::Local<v8 ::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2785 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetter(v8::Local<v8 ::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2710 { 2786 {
2787 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged InIsolatedWorldsAttrGetter", "TestObject", info.Holder(), info.GetIsolate());
2711 TestObj* imp = V8TestObject::toNative(info.Holder()); 2788 TestObj* imp = V8TestObject::toNative(info.Holder());
2712 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2789 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue));
2713 imp->setActivityLoggedInIsolatedWorldsAttrGetter(cppValue); 2790 imp->setActivityLoggedInIsolatedWorldsAttrGetter(cppValue);
2714 } 2791 }
2715 2792
2716 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetterCallback(v8:: Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo< void>& info) 2793 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetterCallback(v8:: Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo< void>& info)
2717 { 2794 {
2718 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2795 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2719 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeSetter(j sValue, info); 2796 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeSetter(j sValue, info);
2720 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2797 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2721 } 2798 }
2722 2799
2723 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetterForMainWorld( const v8::PropertyCallbackInfo<v8::Value>& info) 2800 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetterForMainWorld( const v8::PropertyCallbackInfo<v8::Value>& info)
2724 { 2801 {
2725 TestObj* imp = V8TestObject::toNative(info.Holder()); 2802 TestObj* imp = V8TestObject::toNative(info.Holder());
2726 v8SetReturnValueInt(info, imp->activityLoggedInIsolatedWorldsAttrGetter()); 2803 v8SetReturnValueInt(info, imp->activityLoggedInIsolatedWorldsAttrGetter());
2727 } 2804 }
2728 2805
2729 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetterCallbackForMa inWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 2806 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetterCallbackForMa inWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2730 { 2807 {
2731 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2808 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2732 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeGetterFo rMainWorld(info); 2809 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeGetterFo rMainWorld(info);
2733 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2810 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2734 } 2811 }
2735 2812
2736 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetterForMainWorld( v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2813 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetterForMainWorld( v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2737 { 2814 {
2815 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged InIsolatedWorldsAttrGetter", "TestObject", info.Holder(), info.GetIsolate());
2738 TestObj* imp = V8TestObject::toNative(info.Holder()); 2816 TestObj* imp = V8TestObject::toNative(info.Holder());
2739 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2817 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue));
2740 imp->setActivityLoggedInIsolatedWorldsAttrGetter(cppValue); 2818 imp->setActivityLoggedInIsolatedWorldsAttrGetter(cppValue);
2741 } 2819 }
2742 2820
2743 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetterCallbackForMa inWorld(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyC allbackInfo<void>& info) 2821 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetterCallbackForMa inWorld(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyC allbackInfo<void>& info)
2744 { 2822 {
2745 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2823 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2746 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeSetterFo rMainWorld(jsValue, info); 2824 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeSetterFo rMainWorld(jsValue, info);
2747 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2825 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
(...skipping 20 matching lines...) Expand all
2768 static void deprecatedStaticAttrAttributeGetterCallback(v8::Local<v8::String>, c onst v8::PropertyCallbackInfo<v8::Value>& info) 2846 static void deprecatedStaticAttrAttributeGetterCallback(v8::Local<v8::String>, c onst v8::PropertyCallbackInfo<v8::Value>& info)
2769 { 2847 {
2770 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2848 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2771 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::StaticAtt ribute); 2849 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::StaticAtt ribute);
2772 TestObjV8Internal::deprecatedStaticAttrAttributeGetter(info); 2850 TestObjV8Internal::deprecatedStaticAttrAttributeGetter(info);
2773 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2851 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2774 } 2852 }
2775 2853
2776 static void deprecatedStaticAttrAttributeSetter(v8::Local<v8::Value> jsValue, co nst v8::PropertyCallbackInfo<void>& info) 2854 static void deprecatedStaticAttrAttributeSetter(v8::Local<v8::Value> jsValue, co nst v8::PropertyCallbackInfo<void>& info)
2777 { 2855 {
2856 ExceptionState exceptionState(ExceptionState::SetterContext, "deprecatedStat icAttr", "TestObject", info.Holder(), info.GetIsolate());
2778 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2857 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue));
2779 TestObj::setDeprecatedStaticAttr(cppValue); 2858 TestObj::setDeprecatedStaticAttr(cppValue);
2780 } 2859 }
2781 2860
2782 static void deprecatedStaticAttrAttributeSetterCallback(v8::Local<v8::String>, v 8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2861 static void deprecatedStaticAttrAttributeSetterCallback(v8::Local<v8::String>, v 8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2783 { 2862 {
2784 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2863 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2785 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::StaticAtt ribute); 2864 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::StaticAtt ribute);
2786 TestObjV8Internal::deprecatedStaticAttrAttributeSetter(jsValue, info); 2865 TestObjV8Internal::deprecatedStaticAttrAttributeSetter(jsValue, info);
2787 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2866 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
(...skipping 22 matching lines...) Expand all
2810 static void deprecatedAttrAttributeGetterCallback(v8::Local<v8::String>, const v 8::PropertyCallbackInfo<v8::Value>& info) 2889 static void deprecatedAttrAttributeGetterCallback(v8::Local<v8::String>, const v 8::PropertyCallbackInfo<v8::Value>& info)
2811 { 2890 {
2812 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2891 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2813 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::Attribute ); 2892 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::Attribute );
2814 TestObjV8Internal::deprecatedAttrAttributeGetter(info); 2893 TestObjV8Internal::deprecatedAttrAttributeGetter(info);
2815 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2894 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2816 } 2895 }
2817 2896
2818 static void deprecatedAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8 ::PropertyCallbackInfo<void>& info) 2897 static void deprecatedAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8 ::PropertyCallbackInfo<void>& info)
2819 { 2898 {
2899 ExceptionState exceptionState(ExceptionState::SetterContext, "deprecatedAttr ", "TestObject", info.Holder(), info.GetIsolate());
2820 TestObj* imp = V8TestObject::toNative(info.Holder()); 2900 TestObj* imp = V8TestObject::toNative(info.Holder());
2821 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2901 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue));
2822 imp->setDeprecatedAttr(cppValue); 2902 imp->setDeprecatedAttr(cppValue);
2823 } 2903 }
2824 2904
2825 static void deprecatedAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Loc al<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2905 static void deprecatedAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Loc al<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2826 { 2906 {
2827 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2907 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2828 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::Attribute ); 2908 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::Attribute );
2829 TestObjV8Internal::deprecatedAttrAttributeSetter(jsValue, info); 2909 TestObjV8Internal::deprecatedAttrAttributeSetter(jsValue, info);
2830 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2910 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2831 } 2911 }
2832 2912
2833 static void locationAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& i nfo) 2913 static void locationAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& i nfo)
2834 { 2914 {
2835 TestObj* imp = V8TestObject::toNative(info.Holder()); 2915 TestObj* imp = V8TestObject::toNative(info.Holder());
2836 v8SetReturnValueFast(info, imp->location(), imp); 2916 v8SetReturnValueFast(info, imp->location(), imp);
2837 } 2917 }
2838 2918
2839 static void locationAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro pertyCallbackInfo<v8::Value>& info) 2919 static void locationAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro pertyCallbackInfo<v8::Value>& info)
2840 { 2920 {
2841 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2921 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2842 TestObjV8Internal::locationAttributeGetter(info); 2922 TestObjV8Internal::locationAttributeGetter(info);
2843 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2923 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2844 } 2924 }
2845 2925
2846 static void locationAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Prop ertyCallbackInfo<void>& info) 2926 static void locationAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Prop ertyCallbackInfo<void>& info)
2847 { 2927 {
2928 ExceptionState exceptionState(ExceptionState::SetterContext, "location", "Te stObject", info.Holder(), info.GetIsolate());
2848 TestObj* proxyImp = V8TestObject::toNative(info.Holder()); 2929 TestObj* proxyImp = V8TestObject::toNative(info.Holder());
2849 TestNode* imp = proxyImp->location(); 2930 TestNode* imp = proxyImp->location();
2850 if (!imp) 2931 if (!imp)
2851 return; 2932 return;
2852 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); 2933 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
2853 imp->setHref(cppValue); 2934 imp->setHref(cppValue);
2854 } 2935 }
2855 2936
2856 static void locationAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8: :Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2937 static void locationAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8: :Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2857 { 2938 {
(...skipping 10 matching lines...) Expand all
2868 2949
2869 static void locationWithExceptionAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 2950 static void locationWithExceptionAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2870 { 2951 {
2871 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2952 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2872 TestObjV8Internal::locationWithExceptionAttributeGetter(info); 2953 TestObjV8Internal::locationWithExceptionAttributeGetter(info);
2873 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2954 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2874 } 2955 }
2875 2956
2876 static void locationWithExceptionAttributeSetter(v8::Local<v8::Value> jsValue, c onst v8::PropertyCallbackInfo<void>& info) 2957 static void locationWithExceptionAttributeSetter(v8::Local<v8::Value> jsValue, c onst v8::PropertyCallbackInfo<void>& info)
2877 { 2958 {
2959 ExceptionState exceptionState(ExceptionState::SetterContext, "locationWithEx ception", "TestObject", info.Holder(), info.GetIsolate());
2878 TestObj* proxyImp = V8TestObject::toNative(info.Holder()); 2960 TestObj* proxyImp = V8TestObject::toNative(info.Holder());
2879 TestNode* imp = proxyImp->locationWithException(); 2961 TestNode* imp = proxyImp->locationWithException();
2880 if (!imp) 2962 if (!imp)
2881 return; 2963 return;
2882 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); 2964 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
2883 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); 2965 imp->setHrefThrows(cppValue);
2884 imp->setHrefThrows(cppValue, exceptionState);
2885 exceptionState.throwIfNeeded();
2886 } 2966 }
2887 2967
2888 static void locationWithExceptionAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2968 static void locationWithExceptionAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2889 { 2969 {
2890 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2970 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2891 TestObjV8Internal::locationWithExceptionAttributeSetter(jsValue, info); 2971 TestObjV8Internal::locationWithExceptionAttributeSetter(jsValue, info);
2892 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2972 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2893 } 2973 }
2894 2974
2895 static void TestObjConstructorGetter(v8::Local<v8::String>, const v8::PropertyCa llbackInfo<v8::Value>& info) 2975 static void TestObjConstructorGetter(v8::Local<v8::String>, const v8::PropertyCa llbackInfo<v8::Value>& info)
(...skipping 11 matching lines...) Expand all
2907 info.This()->ForceSet(name, jsValue); 2987 info.This()->ForceSet(name, jsValue);
2908 } 2988 }
2909 2989
2910 static void TestObjReplaceableAttributeSetterCallback(v8::Local<v8::String> name , v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2990 static void TestObjReplaceableAttributeSetterCallback(v8::Local<v8::String> name , v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2911 { 2991 {
2912 TestObjV8Internal::TestObjReplaceableAttributeSetter(name, jsValue, info); 2992 TestObjV8Internal::TestObjReplaceableAttributeSetter(name, jsValue, info);
2913 } 2993 }
2914 2994
2915 static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 2995 static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
2916 { 2996 {
2997 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethod" , "TestObject", info.Holder(), info.GetIsolate());
2917 TestObj* imp = V8TestObject::toNative(info.Holder()); 2998 TestObj* imp = V8TestObject::toNative(info.Holder());
2918 imp->voidMethod(); 2999 imp->voidMethod();
2919 } 3000 }
2920 3001
2921 static void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 3002 static void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
2922 { 3003 {
2923 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3004 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
2924 TestObjV8Internal::voidMethodMethod(info); 3005 TestObjV8Internal::voidMethodMethod(info);
2925 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3006 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2926 } 3007 }
2927 3008
2928 static void voidMethodWithArgsMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 3009 static void voidMethodWithArgsMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
2929 { 3010 {
3011 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodW ithArgs", "TestObject", info.Holder(), info.GetIsolate());
2930 if (UNLIKELY(info.Length() < 3)) { 3012 if (UNLIKELY(info.Length() < 3)) {
2931 throwTypeError(ExceptionMessages::failedToExecute("voidMethodWithArgs", "TestObject", ExceptionMessages::notEnoughArguments(3, info.Length())), info.Get Isolate()); 3013 throwTypeError(ExceptionMessages::failedToExecute("voidMethodWithArgs", "TestObject", ExceptionMessages::notEnoughArguments(3, info.Length())), info.Get Isolate());
2932 return; 3014 return;
2933 } 3015 }
2934 TestObj* imp = V8TestObject::toNative(info.Holder()); 3016 TestObj* imp = V8TestObject::toNative(info.Holder());
2935 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); 3017 V8TRYCATCH_VOID(int, longArg, toInt32(info[0]));
2936 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[1]); 3018 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[1]);
2937 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::hasInstance(info[2], info.Ge tIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8 ::Object>::Cast(info[2])) : 0); 3019 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::hasInstance(info[2], info.Ge tIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8 ::Object>::Cast(info[2])) : 0);
2938 imp->voidMethodWithArgs(longArg, strArg, objArg); 3020 imp->voidMethodWithArgs(longArg, strArg, objArg);
2939 } 3021 }
2940 3022
2941 static void voidMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info) 3023 static void voidMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info)
2942 { 3024 {
2943 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3025 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
2944 TestObjV8Internal::voidMethodWithArgsMethod(info); 3026 TestObjV8Internal::voidMethodWithArgsMethod(info);
2945 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3027 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2946 } 3028 }
2947 3029
2948 static void longMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 3030 static void longMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
2949 { 3031 {
3032 ExceptionState exceptionState(ExceptionState::ExecutionContext, "longMethod" , "TestObject", info.Holder(), info.GetIsolate());
2950 TestObj* imp = V8TestObject::toNative(info.Holder()); 3033 TestObj* imp = V8TestObject::toNative(info.Holder());
2951 v8SetReturnValueInt(info, imp->longMethod()); 3034 v8SetReturnValueInt(info, imp->longMethod());
2952 } 3035 }
2953 3036
2954 static void longMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 3037 static void longMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
2955 { 3038 {
2956 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3039 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
2957 TestObjV8Internal::longMethodMethod(info); 3040 TestObjV8Internal::longMethodMethod(info);
2958 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3041 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2959 } 3042 }
2960 3043
2961 static void longMethodWithArgsMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 3044 static void longMethodWithArgsMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
2962 { 3045 {
3046 ExceptionState exceptionState(ExceptionState::ExecutionContext, "longMethodW ithArgs", "TestObject", info.Holder(), info.GetIsolate());
2963 if (UNLIKELY(info.Length() < 3)) { 3047 if (UNLIKELY(info.Length() < 3)) {
2964 throwTypeError(ExceptionMessages::failedToExecute("longMethodWithArgs", "TestObject", ExceptionMessages::notEnoughArguments(3, info.Length())), info.Get Isolate()); 3048 throwTypeError(ExceptionMessages::failedToExecute("longMethodWithArgs", "TestObject", ExceptionMessages::notEnoughArguments(3, info.Length())), info.Get Isolate());
2965 return; 3049 return;
2966 } 3050 }
2967 TestObj* imp = V8TestObject::toNative(info.Holder()); 3051 TestObj* imp = V8TestObject::toNative(info.Holder());
2968 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); 3052 V8TRYCATCH_VOID(int, longArg, toInt32(info[0]));
2969 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[1]); 3053 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[1]);
2970 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::hasInstance(info[2], info.Ge tIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8 ::Object>::Cast(info[2])) : 0); 3054 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::hasInstance(info[2], info.Ge tIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8 ::Object>::Cast(info[2])) : 0);
2971 v8SetReturnValueInt(info, imp->longMethodWithArgs(longArg, strArg, objArg)); 3055 v8SetReturnValueInt(info, imp->longMethodWithArgs(longArg, strArg, objArg));
2972 } 3056 }
2973 3057
2974 static void longMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info) 3058 static void longMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info)
2975 { 3059 {
2976 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3060 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
2977 TestObjV8Internal::longMethodWithArgsMethod(info); 3061 TestObjV8Internal::longMethodWithArgsMethod(info);
2978 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3062 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2979 } 3063 }
2980 3064
2981 static void objMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 3065 static void objMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
2982 { 3066 {
3067 ExceptionState exceptionState(ExceptionState::ExecutionContext, "objMethod", "TestObject", info.Holder(), info.GetIsolate());
2983 TestObj* imp = V8TestObject::toNative(info.Holder()); 3068 TestObj* imp = V8TestObject::toNative(info.Holder());
2984 v8SetReturnValue(info, imp->objMethod()); 3069 v8SetReturnValue(info, imp->objMethod());
2985 } 3070 }
2986 3071
2987 static void objMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 3072 static void objMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
2988 { 3073 {
2989 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3074 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
2990 UseCounter::count(activeDOMWindow(), UseCounter::TestFeature); 3075 UseCounter::count(activeDOMWindow(), UseCounter::TestFeature);
2991 TestObjV8Internal::objMethodMethod(info); 3076 TestObjV8Internal::objMethodMethod(info);
2992 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3077 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2993 } 3078 }
2994 3079
2995 static void objMethodWithArgsMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 3080 static void objMethodWithArgsMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
2996 { 3081 {
3082 ExceptionState exceptionState(ExceptionState::ExecutionContext, "objMethodWi thArgs", "TestObject", info.Holder(), info.GetIsolate());
2997 if (UNLIKELY(info.Length() < 3)) { 3083 if (UNLIKELY(info.Length() < 3)) {
2998 throwTypeError(ExceptionMessages::failedToExecute("objMethodWithArgs", " TestObject", ExceptionMessages::notEnoughArguments(3, info.Length())), info.GetI solate()); 3084 throwTypeError(ExceptionMessages::failedToExecute("objMethodWithArgs", " TestObject", ExceptionMessages::notEnoughArguments(3, info.Length())), info.GetI solate());
2999 return; 3085 return;
3000 } 3086 }
3001 TestObj* imp = V8TestObject::toNative(info.Holder()); 3087 TestObj* imp = V8TestObject::toNative(info.Holder());
3002 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); 3088 V8TRYCATCH_VOID(int, longArg, toInt32(info[0]));
3003 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[1]); 3089 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[1]);
3004 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::hasInstance(info[2], info.Ge tIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8 ::Object>::Cast(info[2])) : 0); 3090 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::hasInstance(info[2], info.Ge tIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8 ::Object>::Cast(info[2])) : 0);
3005 v8SetReturnValue(info, imp->objMethodWithArgs(longArg, strArg, objArg)); 3091 v8SetReturnValue(info, imp->objMethodWithArgs(longArg, strArg, objArg));
3006 } 3092 }
3007 3093
3008 static void objMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info) 3094 static void objMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
3009 { 3095 {
3010 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3096 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3011 TestObjV8Internal::objMethodWithArgsMethod(info); 3097 TestObjV8Internal::objMethodWithArgsMethod(info);
3012 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3098 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3013 } 3099 }
3014 3100
3015 static void methodWithSequenceArgMethod(const v8::FunctionCallbackInfo<v8::Value >& info) 3101 static void methodWithSequenceArgMethod(const v8::FunctionCallbackInfo<v8::Value >& info)
3016 { 3102 {
3103 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithS equenceArg", "TestObject", info.Holder(), info.GetIsolate());
3017 if (UNLIKELY(info.Length() < 1)) { 3104 if (UNLIKELY(info.Length() < 1)) {
3018 throwTypeError(ExceptionMessages::failedToExecute("methodWithSequenceArg ", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info. GetIsolate()); 3105 throwTypeError(ExceptionMessages::failedToExecute("methodWithSequenceArg ", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info. GetIsolate());
3019 return; 3106 return;
3020 } 3107 }
3021 TestObj* imp = V8TestObject::toNative(info.Holder()); 3108 TestObj* imp = V8TestObject::toNative(info.Holder());
3022 V8TRYCATCH_VOID(Vector<RefPtr<TestInterface> >, sequenceArg, (toRefPtrNative Array<TestInterface, V8TestInterface>(info[0], 1, info.GetIsolate()))); 3109 V8TRYCATCH_VOID(Vector<RefPtr<TestInterface> >, sequenceArg, (toRefPtrNative Array<TestInterface, V8TestInterface>(info[0], 1, info.GetIsolate())));
3023 imp->methodWithSequenceArg(sequenceArg); 3110 imp->methodWithSequenceArg(sequenceArg);
3024 } 3111 }
3025 3112
3026 static void methodWithSequenceArgMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info) 3113 static void methodWithSequenceArgMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info)
3027 { 3114 {
3028 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3115 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3029 TestObjV8Internal::methodWithSequenceArgMethod(info); 3116 TestObjV8Internal::methodWithSequenceArgMethod(info);
3030 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3117 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3031 } 3118 }
3032 3119
3033 static void methodReturningSequenceMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info) 3120 static void methodReturningSequenceMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info)
3034 { 3121 {
3122 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodRetur ningSequence", "TestObject", info.Holder(), info.GetIsolate());
3035 if (UNLIKELY(info.Length() < 1)) { 3123 if (UNLIKELY(info.Length() < 1)) {
3036 throwTypeError(ExceptionMessages::failedToExecute("methodReturningSequen ce", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), inf o.GetIsolate()); 3124 throwTypeError(ExceptionMessages::failedToExecute("methodReturningSequen ce", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), inf o.GetIsolate());
3037 return; 3125 return;
3038 } 3126 }
3039 TestObj* imp = V8TestObject::toNative(info.Holder()); 3127 TestObj* imp = V8TestObject::toNative(info.Holder());
3040 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); 3128 V8TRYCATCH_VOID(int, longArg, toInt32(info[0]));
3041 v8SetReturnValue(info, v8Array(imp->methodReturningSequence(longArg), info.G etIsolate())); 3129 v8SetReturnValue(info, v8Array(imp->methodReturningSequence(longArg), info.G etIsolate()));
3042 } 3130 }
3043 3131
3044 static void methodReturningSequenceMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info) 3132 static void methodReturningSequenceMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
3045 { 3133 {
3046 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3134 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3047 TestObjV8Internal::methodReturningSequenceMethod(info); 3135 TestObjV8Internal::methodReturningSequenceMethod(info);
3048 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3136 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3049 } 3137 }
3050 3138
3051 static void methodWithEnumArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 3139 static void methodWithEnumArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
3052 { 3140 {
3141 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE numArg", "TestObject", info.Holder(), info.GetIsolate());
3053 if (UNLIKELY(info.Length() < 1)) { 3142 if (UNLIKELY(info.Length() < 1)) {
3054 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnumArg", " TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetI solate()); 3143 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnumArg", " TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetI solate());
3055 return; 3144 return;
3056 } 3145 }
3057 TestObj* imp = V8TestObject::toNative(info.Holder()); 3146 TestObj* imp = V8TestObject::toNative(info.Holder());
3058 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, enumArg, info[0]); 3147 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, enumArg, info[0]);
3059 String string = enumArg; 3148 String string = enumArg;
3060 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st ring == "EnumValue3")) { 3149 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st ring == "EnumValue3")) {
3061 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnumArg", " TestObject", "parameter 1 ('" + string + "') is not a valid enum value."), info. GetIsolate()); 3150 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnumArg", " TestObject", "parameter 1 ('" + string + "') is not a valid enum value."), info. GetIsolate());
3062 return; 3151 return;
3063 } 3152 }
3064 imp->methodWithEnumArg(enumArg); 3153 imp->methodWithEnumArg(enumArg);
3065 } 3154 }
3066 3155
3067 static void methodWithEnumArgMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info) 3156 static void methodWithEnumArgMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
3068 { 3157 {
3069 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3158 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3070 TestObjV8Internal::methodWithEnumArgMethod(info); 3159 TestObjV8Internal::methodWithEnumArgMethod(info);
3071 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3160 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3072 } 3161 }
3073 3162
3074 static void methodThatRequiresAllArgsAndThrowsMethod(const v8::FunctionCallbackI nfo<v8::Value>& info) 3163 static void methodThatRequiresAllArgsAndThrowsMethod(const v8::FunctionCallbackI nfo<v8::Value>& info)
3075 { 3164 {
3165 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodThatR equiresAllArgsAndThrows", "TestObject", info.Holder(), info.GetIsolate());
3076 if (UNLIKELY(info.Length() < 2)) { 3166 if (UNLIKELY(info.Length() < 2)) {
3077 throwTypeError(ExceptionMessages::failedToExecute("methodThatRequiresAll ArgsAndThrows", "TestObject", ExceptionMessages::notEnoughArguments(2, info.Leng th())), info.GetIsolate()); 3167 throwTypeError(ExceptionMessages::failedToExecute("methodThatRequiresAll ArgsAndThrows", "TestObject", ExceptionMessages::notEnoughArguments(2, info.Leng th())), info.GetIsolate());
3078 return; 3168 return;
3079 } 3169 }
3080 TestObj* imp = V8TestObject::toNative(info.Holder()); 3170 TestObj* imp = V8TestObject::toNative(info.Holder());
3081 ExceptionState exceptionState(info.Holder(), info.GetIsolate());
3082 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); 3171 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]);
3083 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::hasInstance(info[1], info.Ge tIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8 ::Object>::Cast(info[1])) : 0); 3172 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::hasInstance(info[1], info.Ge tIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8 ::Object>::Cast(info[1])) : 0);
3084 RefPtr<TestObj> result = imp->methodThatRequiresAllArgsAndThrows(strArg, obj Arg, exceptionState); 3173 RefPtr<TestObj> result = imp->methodThatRequiresAllArgsAndThrows(strArg, obj Arg, exceptionState);
3085 if (exceptionState.throwIfNeeded()) 3174 if (exceptionState.throwIfNeeded())
3086 return; 3175 return;
3087 v8SetReturnValue(info, result.release()); 3176 v8SetReturnValue(info, result.release());
3088 } 3177 }
3089 3178
3090 static void methodThatRequiresAllArgsAndThrowsMethodCallback(const v8::FunctionC allbackInfo<v8::Value>& info) 3179 static void methodThatRequiresAllArgsAndThrowsMethodCallback(const v8::FunctionC allbackInfo<v8::Value>& info)
3091 { 3180 {
3092 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3181 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3093 TestObjV8Internal::methodThatRequiresAllArgsAndThrowsMethod(info); 3182 TestObjV8Internal::methodThatRequiresAllArgsAndThrowsMethod(info);
3094 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3183 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3095 } 3184 }
3096 3185
3097 static void methodQueryListListenerMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info) 3186 static void methodQueryListListenerMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info)
3098 { 3187 {
3188 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodQuery ListListener", "TestObject", info.Holder(), info.GetIsolate());
3099 if (UNLIKELY(info.Length() < 1)) { 3189 if (UNLIKELY(info.Length() < 1)) {
3100 throwTypeError(ExceptionMessages::failedToExecute("methodQueryListListen er", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), inf o.GetIsolate()); 3190 throwTypeError(ExceptionMessages::failedToExecute("methodQueryListListen er", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), inf o.GetIsolate());
3101 return; 3191 return;
3102 } 3192 }
3103 TestObj* imp = V8TestObject::toNative(info.Holder()); 3193 TestObj* imp = V8TestObject::toNative(info.Holder());
3104 V8TRYCATCH_VOID(RefPtr<MediaQueryListListener>, listener, MediaQueryListList ener::create(ScriptValue(info[0], info.GetIsolate()))); 3194 V8TRYCATCH_VOID(RefPtr<MediaQueryListListener>, listener, MediaQueryListList ener::create(ScriptValue(info[0], info.GetIsolate())));
3105 imp->methodQueryListListener(listener); 3195 imp->methodQueryListListener(listener);
3106 } 3196 }
3107 3197
3108 static void methodQueryListListenerMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info) 3198 static void methodQueryListListenerMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
3109 { 3199 {
3110 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3200 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3111 TestObjV8Internal::methodQueryListListenerMethod(info); 3201 TestObjV8Internal::methodQueryListListenerMethod(info);
3112 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3202 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3113 } 3203 }
3114 3204
3115 static void serializedValueMethod(const v8::FunctionCallbackInfo<v8::Value>& inf o) 3205 static void serializedValueMethod(const v8::FunctionCallbackInfo<v8::Value>& inf o)
3116 { 3206 {
3207 ExceptionState exceptionState(ExceptionState::ExecutionContext, "serializedV alue", "TestObject", info.Holder(), info.GetIsolate());
3117 if (UNLIKELY(info.Length() < 1)) { 3208 if (UNLIKELY(info.Length() < 1)) {
3118 throwTypeError(ExceptionMessages::failedToExecute("serializedValue", "Te stObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIso late()); 3209 throwTypeError(ExceptionMessages::failedToExecute("serializedValue", "Te stObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIso late());
3119 return; 3210 return;
3120 } 3211 }
3121 TestObj* imp = V8TestObject::toNative(info.Holder()); 3212 TestObj* imp = V8TestObject::toNative(info.Holder());
3122 bool serializedArgDidThrow = false; 3213 bool serializedArgDidThrow = false;
3123 RefPtr<SerializedScriptValue> serializedArg = SerializedScriptValue::create( info[0], 0, 0, serializedArgDidThrow, info.GetIsolate()); 3214 RefPtr<SerializedScriptValue> serializedArg = SerializedScriptValue::create( info[0], 0, 0, serializedArgDidThrow, info.GetIsolate());
3124 if (serializedArgDidThrow) 3215 if (serializedArgDidThrow)
3125 return; 3216 return;
3126 imp->serializedValue(serializedArg); 3217 imp->serializedValue(serializedArg);
3127 } 3218 }
3128 3219
3129 static void serializedValueMethodCallback(const v8::FunctionCallbackInfo<v8::Val ue>& info) 3220 static void serializedValueMethodCallback(const v8::FunctionCallbackInfo<v8::Val ue>& info)
3130 { 3221 {
3131 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3222 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3132 TestObjV8Internal::serializedValueMethod(info); 3223 TestObjV8Internal::serializedValueMethod(info);
3133 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3224 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3134 } 3225 }
3135 3226
3136 static void optionsObjectMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 3227 static void optionsObjectMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
3137 { 3228 {
3229 ExceptionState exceptionState(ExceptionState::ExecutionContext, "optionsObje ct", "TestObject", info.Holder(), info.GetIsolate());
3138 if (UNLIKELY(info.Length() < 1)) { 3230 if (UNLIKELY(info.Length() < 1)) {
3139 throwTypeError(ExceptionMessages::failedToExecute("optionsObject", "Test Object", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsola te()); 3231 throwTypeError(ExceptionMessages::failedToExecute("optionsObject", "Test Object", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsola te());
3140 return; 3232 return;
3141 } 3233 }
3142 TestObj* imp = V8TestObject::toNative(info.Holder()); 3234 TestObj* imp = V8TestObject::toNative(info.Holder());
3143 V8TRYCATCH_VOID(Dictionary, oo, Dictionary(info[0], info.GetIsolate())); 3235 V8TRYCATCH_VOID(Dictionary, oo, Dictionary(info[0], info.GetIsolate()));
3144 if (!oo.isUndefinedOrNull() && !oo.isObject()) { 3236 if (!oo.isUndefinedOrNull() && !oo.isObject()) {
3145 throwTypeError(ExceptionMessages::failedToExecute("optionsObject", "Test Object", "parameter 1 ('oo') is not an object."), info.GetIsolate()); 3237 throwTypeError(ExceptionMessages::failedToExecute("optionsObject", "Test Object", "parameter 1 ('oo') is not an object."), info.GetIsolate());
3146 return; 3238 return;
3147 } 3239 }
3148 V8TRYCATCH_VOID(Dictionary, ooo, Dictionary(info[1], info.GetIsolate())); 3240 V8TRYCATCH_VOID(Dictionary, ooo, Dictionary(info[1], info.GetIsolate()));
3149 if (!ooo.isUndefinedOrNull() && !ooo.isObject()) { 3241 if (!ooo.isUndefinedOrNull() && !ooo.isObject()) {
3150 throwTypeError(ExceptionMessages::failedToExecute("optionsObject", "Test Object", "parameter 2 ('ooo') is not an object."), info.GetIsolate()); 3242 throwTypeError(ExceptionMessages::failedToExecute("optionsObject", "Test Object", "parameter 2 ('ooo') is not an object."), info.GetIsolate());
3151 return; 3243 return;
3152 } 3244 }
3153 imp->optionsObject(oo, ooo); 3245 imp->optionsObject(oo, ooo);
3154 } 3246 }
3155 3247
3156 static void optionsObjectMethodCallback(const v8::FunctionCallbackInfo<v8::Value >& info) 3248 static void optionsObjectMethodCallback(const v8::FunctionCallbackInfo<v8::Value >& info)
3157 { 3249 {
3158 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3250 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3159 TestObjV8Internal::optionsObjectMethod(info); 3251 TestObjV8Internal::optionsObjectMethod(info);
3160 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3252 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3161 } 3253 }
3162 3254
3163 static void optionsObjectListMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 3255 static void optionsObjectListMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
3164 { 3256 {
3257 ExceptionState exceptionState(ExceptionState::ExecutionContext, "optionsObje ctList", "TestObject", info.Holder(), info.GetIsolate());
3165 if (UNLIKELY(info.Length() < 1)) { 3258 if (UNLIKELY(info.Length() < 1)) {
3166 throwTypeError(ExceptionMessages::failedToExecute("optionsObjectList", " TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetI solate()); 3259 throwTypeError(ExceptionMessages::failedToExecute("optionsObjectList", " TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetI solate());
3167 return; 3260 return;
3168 } 3261 }
3169 TestObj* imp = V8TestObject::toNative(info.Holder()); 3262 TestObj* imp = V8TestObject::toNative(info.Holder());
3170 V8TRYCATCH_VOID(Vector<Dictionary>, list, toNativeArray<Dictionary>(info[0], 1, info.GetIsolate())); 3263 V8TRYCATCH_VOID(Vector<Dictionary>, list, toNativeArray<Dictionary>(info[0], 1, info.GetIsolate()));
3171 imp->optionsObjectList(list); 3264 imp->optionsObjectList(list);
3172 } 3265 }
3173 3266
3174 static void optionsObjectListMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info) 3267 static void optionsObjectListMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
3175 { 3268 {
3176 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3269 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3177 TestObjV8Internal::optionsObjectListMethod(info); 3270 TestObjV8Internal::optionsObjectListMethod(info);
3178 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3271 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3179 } 3272 }
3180 3273
3181 static void methodWithExceptionMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 3274 static void methodWithExceptionMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
3182 { 3275 {
3276 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE xception", "TestObject", info.Holder(), info.GetIsolate());
3183 TestObj* imp = V8TestObject::toNative(info.Holder()); 3277 TestObj* imp = V8TestObject::toNative(info.Holder());
3184 ExceptionState exceptionState(info.Holder(), info.GetIsolate());
3185 imp->methodWithException(exceptionState); 3278 imp->methodWithException(exceptionState);
3186 if (exceptionState.throwIfNeeded()) 3279 if (exceptionState.throwIfNeeded())
3187 return; 3280 return;
3188 } 3281 }
3189 3282
3190 static void methodWithExceptionMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info) 3283 static void methodWithExceptionMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info)
3191 { 3284 {
3192 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3285 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3193 TestObjV8Internal::methodWithExceptionMethod(info); 3286 TestObjV8Internal::methodWithExceptionMethod(info);
3194 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3287 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3195 } 3288 }
3196 3289
3197 static void customMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value> & info) 3290 static void customMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value> & info)
3198 { 3291 {
3199 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3292 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3200 UseCounter::count(activeDOMWindow(), UseCounter::CustomTestFeature); 3293 UseCounter::count(activeDOMWindow(), UseCounter::CustomTestFeature);
3201 V8TestObject::customMethodMethodCustom(info); 3294 V8TestObject::customMethodMethodCustom(info);
3202 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3295 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3203 } 3296 }
3204 3297
3205 static void customMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info) 3298 static void customMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info)
3206 { 3299 {
3207 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3300 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3208 V8TestObject::customMethodWithArgsMethodCustom(info); 3301 V8TestObject::customMethodWithArgsMethodCustom(info);
3209 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3302 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3210 } 3303 }
3211 3304
3212 static void addEventListenerMethod(const v8::FunctionCallbackInfo<v8::Value>& in fo) 3305 static void addEventListenerMethod(const v8::FunctionCallbackInfo<v8::Value>& in fo)
3213 { 3306 {
3307 ExceptionState exceptionState(ExceptionState::ExecutionContext, "addEventLis tener", "TestObject", info.Holder(), info.GetIsolate());
3214 EventTarget* impl = V8TestObject::toNative(info.Holder()); 3308 EventTarget* impl = V8TestObject::toNative(info.Holder());
3215 if (DOMWindow* window = impl->toDOMWindow()) { 3309 if (DOMWindow* window = impl->toDOMWindow()) {
3216 ExceptionState exceptionState(info.Holder(), info.GetIsolate());
3217 if (!BindingSecurity::shouldAllowAccessToFrame(window->frame(), exceptio nState)) { 3310 if (!BindingSecurity::shouldAllowAccessToFrame(window->frame(), exceptio nState)) {
3218 exceptionState.throwIfNeeded(); 3311 exceptionState.throwIfNeeded();
3219 return; 3312 return;
3220 } 3313 }
3221 if (!window->document()) 3314 if (!window->document())
3222 return; 3315 return;
3223 } 3316 }
3224 RefPtr<EventListener> listener = V8EventListenerList::getEventListener(info[ 1], false, ListenerFindOrCreate); 3317 RefPtr<EventListener> listener = V8EventListenerList::getEventListener(info[ 1], false, ListenerFindOrCreate);
3225 if (listener) { 3318 if (listener) {
3226 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, ev entName, info[0]); 3319 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, ev entName, info[0]);
3227 impl->addEventListener(eventName, listener, info[2]->BooleanValue()); 3320 impl->addEventListener(eventName, listener, info[2]->BooleanValue());
3228 if (!impl->toNode()) 3321 if (!impl->toNode())
3229 createHiddenDependency(info.Holder(), info[1], V8TestObject::eventLi stenerCacheIndex, info.GetIsolate()); 3322 createHiddenDependency(info.Holder(), info[1], V8TestObject::eventLi stenerCacheIndex, info.GetIsolate());
3230 } 3323 }
3231 } 3324 }
3232 3325
3233 static void addEventListenerMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& info) 3326 static void addEventListenerMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& info)
3234 { 3327 {
3235 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3328 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3236 TestObjV8Internal::addEventListenerMethod(info); 3329 TestObjV8Internal::addEventListenerMethod(info);
3237 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3330 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3238 } 3331 }
3239 3332
3240 static void removeEventListenerMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 3333 static void removeEventListenerMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
3241 { 3334 {
3335 ExceptionState exceptionState(ExceptionState::ExecutionContext, "removeEvent Listener", "TestObject", info.Holder(), info.GetIsolate());
3242 EventTarget* impl = V8TestObject::toNative(info.Holder()); 3336 EventTarget* impl = V8TestObject::toNative(info.Holder());
3243 if (DOMWindow* window = impl->toDOMWindow()) { 3337 if (DOMWindow* window = impl->toDOMWindow()) {
3244 ExceptionState exceptionState(info.Holder(), info.GetIsolate());
3245 if (!BindingSecurity::shouldAllowAccessToFrame(window->frame(), exceptio nState)) { 3338 if (!BindingSecurity::shouldAllowAccessToFrame(window->frame(), exceptio nState)) {
3246 exceptionState.throwIfNeeded(); 3339 exceptionState.throwIfNeeded();
3247 return; 3340 return;
3248 } 3341 }
3249 if (!window->document()) 3342 if (!window->document())
3250 return; 3343 return;
3251 } 3344 }
3252 RefPtr<EventListener> listener = V8EventListenerList::getEventListener(info[ 1], false, ListenerFindOnly); 3345 RefPtr<EventListener> listener = V8EventListenerList::getEventListener(info[ 1], false, ListenerFindOnly);
3253 if (listener) { 3346 if (listener) {
3254 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, ev entName, info[0]); 3347 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, ev entName, info[0]);
3255 impl->removeEventListener(eventName, listener.get(), info[2]->BooleanVal ue()); 3348 impl->removeEventListener(eventName, listener.get(), info[2]->BooleanVal ue());
3256 if (!impl->toNode()) 3349 if (!impl->toNode())
3257 removeHiddenDependency(info.Holder(), info[1], V8TestObject::eventLi stenerCacheIndex, info.GetIsolate()); 3350 removeHiddenDependency(info.Holder(), info[1], V8TestObject::eventLi stenerCacheIndex, info.GetIsolate());
3258 } 3351 }
3259 } 3352 }
3260 3353
3261 static void removeEventListenerMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info) 3354 static void removeEventListenerMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info)
3262 { 3355 {
3263 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3356 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3264 TestObjV8Internal::removeEventListenerMethod(info); 3357 TestObjV8Internal::removeEventListenerMethod(info);
3265 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3358 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3266 } 3359 }
3267 3360
3268 static void withScriptStateVoidMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 3361 static void withScriptStateVoidMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
3269 { 3362 {
3363 ExceptionState exceptionState(ExceptionState::ExecutionContext, "withScriptS tateVoid", "TestObject", info.Holder(), info.GetIsolate());
3270 TestObj* imp = V8TestObject::toNative(info.Holder()); 3364 TestObj* imp = V8TestObject::toNative(info.Holder());
3271 ScriptState* currentState = ScriptState::current(); 3365 ScriptState* currentState = ScriptState::current();
3272 if (!currentState) 3366 if (!currentState)
3273 return; 3367 return;
3274 ScriptState& state = *currentState; 3368 ScriptState& state = *currentState;
3275 imp->withScriptStateVoid(&state); 3369 imp->withScriptStateVoid(&state);
3276 if (state.hadException()) { 3370 if (state.hadException()) {
3277 v8::Local<v8::Value> exception = state.exception(); 3371 v8::Local<v8::Value> exception = state.exception();
3278 state.clearException(); 3372 state.clearException();
3279 throwError(exception, info.GetIsolate()); 3373 throwError(exception, info.GetIsolate());
3280 return; 3374 return;
3281 } 3375 }
3282 } 3376 }
3283 3377
3284 static void withScriptStateVoidMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info) 3378 static void withScriptStateVoidMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info)
3285 { 3379 {
3286 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3380 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3287 TestObjV8Internal::withScriptStateVoidMethod(info); 3381 TestObjV8Internal::withScriptStateVoidMethod(info);
3288 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3382 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3289 } 3383 }
3290 3384
3291 static void withScriptStateObjMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 3385 static void withScriptStateObjMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
3292 { 3386 {
3387 ExceptionState exceptionState(ExceptionState::ExecutionContext, "withScriptS tateObj", "TestObject", info.Holder(), info.GetIsolate());
3293 TestObj* imp = V8TestObject::toNative(info.Holder()); 3388 TestObj* imp = V8TestObject::toNative(info.Holder());
3294 ScriptState* currentState = ScriptState::current(); 3389 ScriptState* currentState = ScriptState::current();
3295 if (!currentState) 3390 if (!currentState)
3296 return; 3391 return;
3297 ScriptState& state = *currentState; 3392 ScriptState& state = *currentState;
3298 RefPtr<TestObj> result = imp->withScriptStateObj(&state); 3393 RefPtr<TestObj> result = imp->withScriptStateObj(&state);
3299 if (state.hadException()) { 3394 if (state.hadException()) {
3300 v8::Local<v8::Value> exception = state.exception(); 3395 v8::Local<v8::Value> exception = state.exception();
3301 state.clearException(); 3396 state.clearException();
3302 throwError(exception, info.GetIsolate()); 3397 throwError(exception, info.GetIsolate());
3303 return; 3398 return;
3304 } 3399 }
3305 v8SetReturnValue(info, result.release()); 3400 v8SetReturnValue(info, result.release());
3306 } 3401 }
3307 3402
3308 static void withScriptStateObjMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info) 3403 static void withScriptStateObjMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info)
3309 { 3404 {
3310 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3405 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3311 TestObjV8Internal::withScriptStateObjMethod(info); 3406 TestObjV8Internal::withScriptStateObjMethod(info);
3312 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3407 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3313 } 3408 }
3314 3409
3315 static void withScriptStateVoidExceptionMethod(const v8::FunctionCallbackInfo<v8 ::Value>& info) 3410 static void withScriptStateVoidExceptionMethod(const v8::FunctionCallbackInfo<v8 ::Value>& info)
3316 { 3411 {
3412 ExceptionState exceptionState(ExceptionState::ExecutionContext, "withScriptS tateVoidException", "TestObject", info.Holder(), info.GetIsolate());
3317 TestObj* imp = V8TestObject::toNative(info.Holder()); 3413 TestObj* imp = V8TestObject::toNative(info.Holder());
3318 ExceptionState exceptionState(info.Holder(), info.GetIsolate());
3319 ScriptState* currentState = ScriptState::current(); 3414 ScriptState* currentState = ScriptState::current();
3320 if (!currentState) 3415 if (!currentState)
3321 return; 3416 return;
3322 ScriptState& state = *currentState; 3417 ScriptState& state = *currentState;
3323 imp->withScriptStateVoidException(&state, exceptionState); 3418 imp->withScriptStateVoidException(&state, exceptionState);
3324 if (exceptionState.throwIfNeeded()) 3419 if (exceptionState.throwIfNeeded())
3325 return; 3420 return;
3326 if (state.hadException()) { 3421 if (state.hadException()) {
3327 v8::Local<v8::Value> exception = state.exception(); 3422 v8::Local<v8::Value> exception = state.exception();
3328 state.clearException(); 3423 state.clearException();
3329 throwError(exception, info.GetIsolate()); 3424 throwError(exception, info.GetIsolate());
3330 return; 3425 return;
3331 } 3426 }
3332 } 3427 }
3333 3428
3334 static void withScriptStateVoidExceptionMethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& info) 3429 static void withScriptStateVoidExceptionMethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& info)
3335 { 3430 {
3336 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3431 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3337 TestObjV8Internal::withScriptStateVoidExceptionMethod(info); 3432 TestObjV8Internal::withScriptStateVoidExceptionMethod(info);
3338 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3433 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3339 } 3434 }
3340 3435
3341 static void withScriptStateObjExceptionMethod(const v8::FunctionCallbackInfo<v8: :Value>& info) 3436 static void withScriptStateObjExceptionMethod(const v8::FunctionCallbackInfo<v8: :Value>& info)
3342 { 3437 {
3438 ExceptionState exceptionState(ExceptionState::ExecutionContext, "withScriptS tateObjException", "TestObject", info.Holder(), info.GetIsolate());
3343 TestObj* imp = V8TestObject::toNative(info.Holder()); 3439 TestObj* imp = V8TestObject::toNative(info.Holder());
3344 ExceptionState exceptionState(info.Holder(), info.GetIsolate());
3345 ScriptState* currentState = ScriptState::current(); 3440 ScriptState* currentState = ScriptState::current();
3346 if (!currentState) 3441 if (!currentState)
3347 return; 3442 return;
3348 ScriptState& state = *currentState; 3443 ScriptState& state = *currentState;
3349 RefPtr<TestObj> result = imp->withScriptStateObjException(&state, exceptionS tate); 3444 RefPtr<TestObj> result = imp->withScriptStateObjException(&state, exceptionS tate);
3350 if (exceptionState.throwIfNeeded()) 3445 if (exceptionState.throwIfNeeded())
3351 return; 3446 return;
3352 if (state.hadException()) { 3447 if (state.hadException()) {
3353 v8::Local<v8::Value> exception = state.exception(); 3448 v8::Local<v8::Value> exception = state.exception();
3354 state.clearException(); 3449 state.clearException();
3355 throwError(exception, info.GetIsolate()); 3450 throwError(exception, info.GetIsolate());
3356 return; 3451 return;
3357 } 3452 }
3358 v8SetReturnValue(info, result.release()); 3453 v8SetReturnValue(info, result.release());
3359 } 3454 }
3360 3455
3361 static void withScriptStateObjExceptionMethodCallback(const v8::FunctionCallback Info<v8::Value>& info) 3456 static void withScriptStateObjExceptionMethodCallback(const v8::FunctionCallback Info<v8::Value>& info)
3362 { 3457 {
3363 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3458 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3364 TestObjV8Internal::withScriptStateObjExceptionMethod(info); 3459 TestObjV8Internal::withScriptStateObjExceptionMethod(info);
3365 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3460 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3366 } 3461 }
3367 3462
3368 static void withExecutionContextMethod(const v8::FunctionCallbackInfo<v8::Value> & info) 3463 static void withExecutionContextMethod(const v8::FunctionCallbackInfo<v8::Value> & info)
3369 { 3464 {
3465 ExceptionState exceptionState(ExceptionState::ExecutionContext, "withExecuti onContext", "TestObject", info.Holder(), info.GetIsolate());
3370 TestObj* imp = V8TestObject::toNative(info.Holder()); 3466 TestObj* imp = V8TestObject::toNative(info.Holder());
3371 ExecutionContext* scriptContext = getExecutionContext(); 3467 ExecutionContext* scriptContext = getExecutionContext();
3372 imp->withExecutionContext(scriptContext); 3468 imp->withExecutionContext(scriptContext);
3373 } 3469 }
3374 3470
3375 static void withExecutionContextMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info) 3471 static void withExecutionContextMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info)
3376 { 3472 {
3377 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3473 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3378 TestObjV8Internal::withExecutionContextMethod(info); 3474 TestObjV8Internal::withExecutionContextMethod(info);
3379 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3475 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3380 } 3476 }
3381 3477
3382 static void withExecutionContextAndScriptStateMethod(const v8::FunctionCallbackI nfo<v8::Value>& info) 3478 static void withExecutionContextAndScriptStateMethod(const v8::FunctionCallbackI nfo<v8::Value>& info)
3383 { 3479 {
3480 ExceptionState exceptionState(ExceptionState::ExecutionContext, "withExecuti onContextAndScriptState", "TestObject", info.Holder(), info.GetIsolate());
3384 TestObj* imp = V8TestObject::toNative(info.Holder()); 3481 TestObj* imp = V8TestObject::toNative(info.Holder());
3385 ScriptState* currentState = ScriptState::current(); 3482 ScriptState* currentState = ScriptState::current();
3386 if (!currentState) 3483 if (!currentState)
3387 return; 3484 return;
3388 ScriptState& state = *currentState; 3485 ScriptState& state = *currentState;
3389 ExecutionContext* scriptContext = getExecutionContext(); 3486 ExecutionContext* scriptContext = getExecutionContext();
3390 imp->withExecutionContextAndScriptState(&state, scriptContext); 3487 imp->withExecutionContextAndScriptState(&state, scriptContext);
3391 if (state.hadException()) { 3488 if (state.hadException()) {
3392 v8::Local<v8::Value> exception = state.exception(); 3489 v8::Local<v8::Value> exception = state.exception();
3393 state.clearException(); 3490 state.clearException();
3394 throwError(exception, info.GetIsolate()); 3491 throwError(exception, info.GetIsolate());
3395 return; 3492 return;
3396 } 3493 }
3397 } 3494 }
3398 3495
3399 static void withExecutionContextAndScriptStateMethodCallback(const v8::FunctionC allbackInfo<v8::Value>& info) 3496 static void withExecutionContextAndScriptStateMethodCallback(const v8::FunctionC allbackInfo<v8::Value>& info)
3400 { 3497 {
3401 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3498 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3402 TestObjV8Internal::withExecutionContextAndScriptStateMethod(info); 3499 TestObjV8Internal::withExecutionContextAndScriptStateMethod(info);
3403 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3500 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3404 } 3501 }
3405 3502
3406 static void withExecutionContextAndScriptStateObjExceptionMethod(const v8::Funct ionCallbackInfo<v8::Value>& info) 3503 static void withExecutionContextAndScriptStateObjExceptionMethod(const v8::Funct ionCallbackInfo<v8::Value>& info)
3407 { 3504 {
3505 ExceptionState exceptionState(ExceptionState::ExecutionContext, "withExecuti onContextAndScriptStateObjException", "TestObject", info.Holder(), info.GetIsola te());
3408 TestObj* imp = V8TestObject::toNative(info.Holder()); 3506 TestObj* imp = V8TestObject::toNative(info.Holder());
3409 ExceptionState exceptionState(info.Holder(), info.GetIsolate());
3410 ScriptState* currentState = ScriptState::current(); 3507 ScriptState* currentState = ScriptState::current();
3411 if (!currentState) 3508 if (!currentState)
3412 return; 3509 return;
3413 ScriptState& state = *currentState; 3510 ScriptState& state = *currentState;
3414 ExecutionContext* scriptContext = getExecutionContext(); 3511 ExecutionContext* scriptContext = getExecutionContext();
3415 RefPtr<TestObj> result = imp->withExecutionContextAndScriptStateObjException (&state, scriptContext, exceptionState); 3512 RefPtr<TestObj> result = imp->withExecutionContextAndScriptStateObjException (&state, scriptContext, exceptionState);
3416 if (exceptionState.throwIfNeeded()) 3513 if (exceptionState.throwIfNeeded())
3417 return; 3514 return;
3418 if (state.hadException()) { 3515 if (state.hadException()) {
3419 v8::Local<v8::Value> exception = state.exception(); 3516 v8::Local<v8::Value> exception = state.exception();
3420 state.clearException(); 3517 state.clearException();
3421 throwError(exception, info.GetIsolate()); 3518 throwError(exception, info.GetIsolate());
3422 return; 3519 return;
3423 } 3520 }
3424 v8SetReturnValue(info, result.release()); 3521 v8SetReturnValue(info, result.release());
3425 } 3522 }
3426 3523
3427 static void withExecutionContextAndScriptStateObjExceptionMethodCallback(const v 8::FunctionCallbackInfo<v8::Value>& info) 3524 static void withExecutionContextAndScriptStateObjExceptionMethodCallback(const v 8::FunctionCallbackInfo<v8::Value>& info)
3428 { 3525 {
3429 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3526 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3430 TestObjV8Internal::withExecutionContextAndScriptStateObjExceptionMethod(info ); 3527 TestObjV8Internal::withExecutionContextAndScriptStateObjExceptionMethod(info );
3431 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3528 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3432 } 3529 }
3433 3530
3434 static void withExecutionContextAndScriptStateWithSpacesMethod(const v8::Functio nCallbackInfo<v8::Value>& info) 3531 static void withExecutionContextAndScriptStateWithSpacesMethod(const v8::Functio nCallbackInfo<v8::Value>& info)
3435 { 3532 {
3533 ExceptionState exceptionState(ExceptionState::ExecutionContext, "withExecuti onContextAndScriptStateWithSpaces", "TestObject", info.Holder(), info.GetIsolate ());
3436 TestObj* imp = V8TestObject::toNative(info.Holder()); 3534 TestObj* imp = V8TestObject::toNative(info.Holder());
3437 ScriptState* currentState = ScriptState::current(); 3535 ScriptState* currentState = ScriptState::current();
3438 if (!currentState) 3536 if (!currentState)
3439 return; 3537 return;
3440 ScriptState& state = *currentState; 3538 ScriptState& state = *currentState;
3441 ExecutionContext* scriptContext = getExecutionContext(); 3539 ExecutionContext* scriptContext = getExecutionContext();
3442 RefPtr<TestObj> result = imp->withExecutionContextAndScriptStateWithSpaces(& state, scriptContext); 3540 RefPtr<TestObj> result = imp->withExecutionContextAndScriptStateWithSpaces(& state, scriptContext);
3443 if (state.hadException()) { 3541 if (state.hadException()) {
3444 v8::Local<v8::Value> exception = state.exception(); 3542 v8::Local<v8::Value> exception = state.exception();
3445 state.clearException(); 3543 state.clearException();
3446 throwError(exception, info.GetIsolate()); 3544 throwError(exception, info.GetIsolate());
3447 return; 3545 return;
3448 } 3546 }
3449 v8SetReturnValue(info, result.release()); 3547 v8SetReturnValue(info, result.release());
3450 } 3548 }
3451 3549
3452 static void withExecutionContextAndScriptStateWithSpacesMethodCallback(const v8: :FunctionCallbackInfo<v8::Value>& info) 3550 static void withExecutionContextAndScriptStateWithSpacesMethodCallback(const v8: :FunctionCallbackInfo<v8::Value>& info)
3453 { 3551 {
3454 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3552 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3455 TestObjV8Internal::withExecutionContextAndScriptStateWithSpacesMethod(info); 3553 TestObjV8Internal::withExecutionContextAndScriptStateWithSpacesMethod(info);
3456 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3554 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3457 } 3555 }
3458 3556
3459 static void withActiveWindowAndFirstWindowMethod(const v8::FunctionCallbackInfo< v8::Value>& info) 3557 static void withActiveWindowAndFirstWindowMethod(const v8::FunctionCallbackInfo< v8::Value>& info)
3460 { 3558 {
3559 ExceptionState exceptionState(ExceptionState::ExecutionContext, "withActiveW indowAndFirstWindow", "TestObject", info.Holder(), info.GetIsolate());
3461 TestObj* imp = V8TestObject::toNative(info.Holder()); 3560 TestObj* imp = V8TestObject::toNative(info.Holder());
3462 imp->withActiveWindowAndFirstWindow(activeDOMWindow(), firstDOMWindow()); 3561 imp->withActiveWindowAndFirstWindow(activeDOMWindow(), firstDOMWindow());
3463 } 3562 }
3464 3563
3465 static void withActiveWindowAndFirstWindowMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& info) 3564 static void withActiveWindowAndFirstWindowMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& info)
3466 { 3565 {
3467 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3566 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3468 TestObjV8Internal::withActiveWindowAndFirstWindowMethod(info); 3567 TestObjV8Internal::withActiveWindowAndFirstWindowMethod(info);
3469 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3568 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3470 } 3569 }
3471 3570
3472 static void methodWithOptionalArgMethod(const v8::FunctionCallbackInfo<v8::Value >& info) 3571 static void methodWithOptionalArgMethod(const v8::FunctionCallbackInfo<v8::Value >& info)
3473 { 3572 {
3573 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithO ptionalArg", "TestObject", info.Holder(), info.GetIsolate());
3474 TestObj* imp = V8TestObject::toNative(info.Holder()); 3574 TestObj* imp = V8TestObject::toNative(info.Holder());
3475 if (UNLIKELY(info.Length() <= 0)) { 3575 if (UNLIKELY(info.Length() <= 0)) {
3476 imp->methodWithOptionalArg(); 3576 imp->methodWithOptionalArg();
3477 return; 3577 return;
3478 } 3578 }
3479 V8TRYCATCH_VOID(int, opt, toInt32(info[0])); 3579 V8TRYCATCH_VOID(int, opt, toInt32(info[0]));
3480 imp->methodWithOptionalArg(opt); 3580 imp->methodWithOptionalArg(opt);
3481 } 3581 }
3482 3582
3483 static void methodWithOptionalArgMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info) 3583 static void methodWithOptionalArgMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info)
3484 { 3584 {
3485 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3585 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3486 TestObjV8Internal::methodWithOptionalArgMethod(info); 3586 TestObjV8Internal::methodWithOptionalArgMethod(info);
3487 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3587 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3488 } 3588 }
3489 3589
3490 static void methodWithNonOptionalArgAndOptionalArgMethod(const v8::FunctionCallb ackInfo<v8::Value>& info) 3590 static void methodWithNonOptionalArgAndOptionalArgMethod(const v8::FunctionCallb ackInfo<v8::Value>& info)
3491 { 3591 {
3592 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithN onOptionalArgAndOptionalArg", "TestObject", info.Holder(), info.GetIsolate());
3492 if (UNLIKELY(info.Length() < 1)) { 3593 if (UNLIKELY(info.Length() < 1)) {
3493 throwTypeError(ExceptionMessages::failedToExecute("methodWithNonOptional ArgAndOptionalArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info. Length())), info.GetIsolate()); 3594 throwTypeError(ExceptionMessages::failedToExecute("methodWithNonOptional ArgAndOptionalArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info. Length())), info.GetIsolate());
3494 return; 3595 return;
3495 } 3596 }
3496 TestObj* imp = V8TestObject::toNative(info.Holder()); 3597 TestObj* imp = V8TestObject::toNative(info.Holder());
3497 V8TRYCATCH_VOID(int, nonOpt, toInt32(info[0])); 3598 V8TRYCATCH_VOID(int, nonOpt, toInt32(info[0]));
3498 if (UNLIKELY(info.Length() <= 1)) { 3599 if (UNLIKELY(info.Length() <= 1)) {
3499 imp->methodWithNonOptionalArgAndOptionalArg(nonOpt); 3600 imp->methodWithNonOptionalArgAndOptionalArg(nonOpt);
3500 return; 3601 return;
3501 } 3602 }
3502 V8TRYCATCH_VOID(int, opt, toInt32(info[1])); 3603 V8TRYCATCH_VOID(int, opt, toInt32(info[1]));
3503 imp->methodWithNonOptionalArgAndOptionalArg(nonOpt, opt); 3604 imp->methodWithNonOptionalArgAndOptionalArg(nonOpt, opt);
3504 } 3605 }
3505 3606
3506 static void methodWithNonOptionalArgAndOptionalArgMethodCallback(const v8::Funct ionCallbackInfo<v8::Value>& info) 3607 static void methodWithNonOptionalArgAndOptionalArgMethodCallback(const v8::Funct ionCallbackInfo<v8::Value>& info)
3507 { 3608 {
3508 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3609 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3509 TestObjV8Internal::methodWithNonOptionalArgAndOptionalArgMethod(info); 3610 TestObjV8Internal::methodWithNonOptionalArgAndOptionalArgMethod(info);
3510 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3611 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3511 } 3612 }
3512 3613
3513 static void methodWithNonOptionalArgAndTwoOptionalArgsMethod(const v8::FunctionC allbackInfo<v8::Value>& info) 3614 static void methodWithNonOptionalArgAndTwoOptionalArgsMethod(const v8::FunctionC allbackInfo<v8::Value>& info)
3514 { 3615 {
3616 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithN onOptionalArgAndTwoOptionalArgs", "TestObject", info.Holder(), info.GetIsolate() );
3515 if (UNLIKELY(info.Length() < 1)) { 3617 if (UNLIKELY(info.Length() < 1)) {
3516 throwTypeError(ExceptionMessages::failedToExecute("methodWithNonOptional ArgAndTwoOptionalArgs", "TestObject", ExceptionMessages::notEnoughArguments(1, i nfo.Length())), info.GetIsolate()); 3618 throwTypeError(ExceptionMessages::failedToExecute("methodWithNonOptional ArgAndTwoOptionalArgs", "TestObject", ExceptionMessages::notEnoughArguments(1, i nfo.Length())), info.GetIsolate());
3517 return; 3619 return;
3518 } 3620 }
3519 TestObj* imp = V8TestObject::toNative(info.Holder()); 3621 TestObj* imp = V8TestObject::toNative(info.Holder());
3520 V8TRYCATCH_VOID(int, nonOpt, toInt32(info[0])); 3622 V8TRYCATCH_VOID(int, nonOpt, toInt32(info[0]));
3521 if (UNLIKELY(info.Length() <= 1)) { 3623 if (UNLIKELY(info.Length() <= 1)) {
3522 imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt); 3624 imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt);
3523 return; 3625 return;
3524 } 3626 }
3525 V8TRYCATCH_VOID(int, opt1, toInt32(info[1])); 3627 V8TRYCATCH_VOID(int, opt1, toInt32(info[1]));
3526 if (UNLIKELY(info.Length() <= 2)) { 3628 if (UNLIKELY(info.Length() <= 2)) {
3527 imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1); 3629 imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1);
3528 return; 3630 return;
3529 } 3631 }
3530 V8TRYCATCH_VOID(int, opt2, toInt32(info[2])); 3632 V8TRYCATCH_VOID(int, opt2, toInt32(info[2]));
3531 imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1, opt2); 3633 imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1, opt2);
3532 } 3634 }
3533 3635
3534 static void methodWithNonOptionalArgAndTwoOptionalArgsMethodCallback(const v8::F unctionCallbackInfo<v8::Value>& info) 3636 static void methodWithNonOptionalArgAndTwoOptionalArgsMethodCallback(const v8::F unctionCallbackInfo<v8::Value>& info)
3535 { 3637 {
3536 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3638 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3537 TestObjV8Internal::methodWithNonOptionalArgAndTwoOptionalArgsMethod(info); 3639 TestObjV8Internal::methodWithNonOptionalArgAndTwoOptionalArgsMethod(info);
3538 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3640 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3539 } 3641 }
3540 3642
3541 static void methodWithOptionalStringMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info) 3643 static void methodWithOptionalStringMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info)
3542 { 3644 {
3645 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithO ptionalString", "TestObject", info.Holder(), info.GetIsolate());
3543 TestObj* imp = V8TestObject::toNative(info.Holder()); 3646 TestObj* imp = V8TestObject::toNative(info.Holder());
3544 if (UNLIKELY(info.Length() <= 0)) { 3647 if (UNLIKELY(info.Length() <= 0)) {
3545 imp->methodWithOptionalString(); 3648 imp->methodWithOptionalString();
3546 return; 3649 return;
3547 } 3650 }
3548 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str, info[0]); 3651 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str, info[0]);
3549 imp->methodWithOptionalString(str); 3652 imp->methodWithOptionalString(str);
3550 } 3653 }
3551 3654
3552 static void methodWithOptionalStringMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info) 3655 static void methodWithOptionalStringMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info)
3553 { 3656 {
3554 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3657 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3555 TestObjV8Internal::methodWithOptionalStringMethod(info); 3658 TestObjV8Internal::methodWithOptionalStringMethod(info);
3556 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3659 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3557 } 3660 }
3558 3661
3559 static void methodWithOptionalStringIsUndefinedMethod(const v8::FunctionCallback Info<v8::Value>& info) 3662 static void methodWithOptionalStringIsUndefinedMethod(const v8::FunctionCallback Info<v8::Value>& info)
3560 { 3663 {
3664 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithO ptionalStringIsUndefined", "TestObject", info.Holder(), info.GetIsolate());
3561 TestObj* imp = V8TestObject::toNative(info.Holder()); 3665 TestObj* imp = V8TestObject::toNative(info.Holder());
3562 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str, info[0]); 3666 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str, info[0]);
3563 imp->methodWithOptionalStringIsUndefined(str); 3667 imp->methodWithOptionalStringIsUndefined(str);
3564 } 3668 }
3565 3669
3566 static void methodWithOptionalStringIsUndefinedMethodCallback(const v8::Function CallbackInfo<v8::Value>& info) 3670 static void methodWithOptionalStringIsUndefinedMethodCallback(const v8::Function CallbackInfo<v8::Value>& info)
3567 { 3671 {
3568 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3672 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3569 TestObjV8Internal::methodWithOptionalStringIsUndefinedMethod(info); 3673 TestObjV8Internal::methodWithOptionalStringIsUndefinedMethod(info);
3570 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3674 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3571 } 3675 }
3572 3676
3573 static void methodWithOptionalStringIsNullStringMethod(const v8::FunctionCallbac kInfo<v8::Value>& info) 3677 static void methodWithOptionalStringIsNullStringMethod(const v8::FunctionCallbac kInfo<v8::Value>& info)
3574 { 3678 {
3679 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithO ptionalStringIsNullString", "TestObject", info.Holder(), info.GetIsolate());
3575 TestObj* imp = V8TestObject::toNative(info.Holder()); 3680 TestObj* imp = V8TestObject::toNative(info.Holder());
3576 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str, argumentOrNull (info, 0)); 3681 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str, argumentOrNull (info, 0));
3577 imp->methodWithOptionalStringIsNullString(str); 3682 imp->methodWithOptionalStringIsNullString(str);
3578 } 3683 }
3579 3684
3580 static void methodWithOptionalStringIsNullStringMethodCallback(const v8::Functio nCallbackInfo<v8::Value>& info) 3685 static void methodWithOptionalStringIsNullStringMethodCallback(const v8::Functio nCallbackInfo<v8::Value>& info)
3581 { 3686 {
3582 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3687 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3583 TestObjV8Internal::methodWithOptionalStringIsNullStringMethod(info); 3688 TestObjV8Internal::methodWithOptionalStringIsNullStringMethod(info);
3584 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3689 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3585 } 3690 }
3586 3691
3587 static void methodWithCallbackArgMethod(const v8::FunctionCallbackInfo<v8::Value >& info) 3692 static void methodWithCallbackArgMethod(const v8::FunctionCallbackInfo<v8::Value >& info)
3588 { 3693 {
3694 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithC allbackArg", "TestObject", info.Holder(), info.GetIsolate());
3589 if (UNLIKELY(info.Length() < 1)) { 3695 if (UNLIKELY(info.Length() < 1)) {
3590 throwTypeError(ExceptionMessages::failedToExecute("methodWithCallbackArg ", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info. GetIsolate()); 3696 throwTypeError(ExceptionMessages::failedToExecute("methodWithCallbackArg ", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info. GetIsolate());
3591 return; 3697 return;
3592 } 3698 }
3593 TestObj* imp = V8TestObject::toNative(info.Holder()); 3699 TestObj* imp = V8TestObject::toNative(info.Holder());
3594 if (info.Length() <= 0 || !info[0]->IsFunction()) { 3700 if (info.Length() <= 0 || !info[0]->IsFunction()) {
3595 throwTypeError(ExceptionMessages::failedToExecute("methodWithCallbackArg ", "TestObject", "The callback provided as parameter 1 is not a function."), inf o.GetIsolate()); 3701 throwTypeError(ExceptionMessages::failedToExecute("methodWithCallbackArg ", "TestObject", "The callback provided as parameter 1 is not a function."), inf o.GetIsolate());
3596 return; 3702 return;
3597 } 3703 }
3598 OwnPtr<TestCallback> callback = V8TestCallback::create(info[0], getExecution Context()); 3704 OwnPtr<TestCallback> callback = V8TestCallback::create(info[0], getExecution Context());
3599 imp->methodWithCallbackArg(callback.release()); 3705 imp->methodWithCallbackArg(callback.release());
3600 } 3706 }
3601 3707
3602 static void methodWithCallbackArgMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info) 3708 static void methodWithCallbackArgMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info)
3603 { 3709 {
3604 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3710 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3605 TestObjV8Internal::methodWithCallbackArgMethod(info); 3711 TestObjV8Internal::methodWithCallbackArgMethod(info);
3606 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3712 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3607 } 3713 }
3608 3714
3609 static void methodWithNonCallbackArgAndCallbackArgMethod(const v8::FunctionCallb ackInfo<v8::Value>& info) 3715 static void methodWithNonCallbackArgAndCallbackArgMethod(const v8::FunctionCallb ackInfo<v8::Value>& info)
3610 { 3716 {
3717 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithN onCallbackArgAndCallbackArg", "TestObject", info.Holder(), info.GetIsolate());
3611 if (UNLIKELY(info.Length() < 2)) { 3718 if (UNLIKELY(info.Length() < 2)) {
3612 throwTypeError(ExceptionMessages::failedToExecute("methodWithNonCallback ArgAndCallbackArg", "TestObject", ExceptionMessages::notEnoughArguments(2, info. Length())), info.GetIsolate()); 3719 throwTypeError(ExceptionMessages::failedToExecute("methodWithNonCallback ArgAndCallbackArg", "TestObject", ExceptionMessages::notEnoughArguments(2, info. Length())), info.GetIsolate());
3613 return; 3720 return;
3614 } 3721 }
3615 TestObj* imp = V8TestObject::toNative(info.Holder()); 3722 TestObj* imp = V8TestObject::toNative(info.Holder());
3616 V8TRYCATCH_VOID(int, nonCallback, toInt32(info[0])); 3723 V8TRYCATCH_VOID(int, nonCallback, toInt32(info[0]));
3617 if (info.Length() <= 1 || !info[1]->IsFunction()) { 3724 if (info.Length() <= 1 || !info[1]->IsFunction()) {
3618 throwTypeError(ExceptionMessages::failedToExecute("methodWithNonCallback ArgAndCallbackArg", "TestObject", "The callback provided as parameter 2 is not a function."), info.GetIsolate()); 3725 throwTypeError(ExceptionMessages::failedToExecute("methodWithNonCallback ArgAndCallbackArg", "TestObject", "The callback provided as parameter 2 is not a function."), info.GetIsolate());
3619 return; 3726 return;
3620 } 3727 }
3621 OwnPtr<TestCallback> callback = V8TestCallback::create(info[1], getExecution Context()); 3728 OwnPtr<TestCallback> callback = V8TestCallback::create(info[1], getExecution Context());
3622 imp->methodWithNonCallbackArgAndCallbackArg(nonCallback, callback.release()) ; 3729 imp->methodWithNonCallbackArgAndCallbackArg(nonCallback, callback.release()) ;
3623 } 3730 }
3624 3731
3625 static void methodWithNonCallbackArgAndCallbackArgMethodCallback(const v8::Funct ionCallbackInfo<v8::Value>& info) 3732 static void methodWithNonCallbackArgAndCallbackArgMethodCallback(const v8::Funct ionCallbackInfo<v8::Value>& info)
3626 { 3733 {
3627 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3734 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3628 TestObjV8Internal::methodWithNonCallbackArgAndCallbackArgMethod(info); 3735 TestObjV8Internal::methodWithNonCallbackArgAndCallbackArgMethod(info);
3629 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3736 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3630 } 3737 }
3631 3738
3632 static void methodWithCallbackAndOptionalArgMethod(const v8::FunctionCallbackInf o<v8::Value>& info) 3739 static void methodWithCallbackAndOptionalArgMethod(const v8::FunctionCallbackInf o<v8::Value>& info)
3633 { 3740 {
3741 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithC allbackAndOptionalArg", "TestObject", info.Holder(), info.GetIsolate());
3634 TestObj* imp = V8TestObject::toNative(info.Holder()); 3742 TestObj* imp = V8TestObject::toNative(info.Holder());
3635 OwnPtr<TestCallback> callback; 3743 OwnPtr<TestCallback> callback;
3636 if (info.Length() > 0 && !info[0]->IsNull() && !info[0]->IsUndefined()) { 3744 if (info.Length() > 0 && !info[0]->IsNull() && !info[0]->IsUndefined()) {
3637 if (!info[0]->IsFunction()) { 3745 if (!info[0]->IsFunction()) {
3638 throwTypeError(ExceptionMessages::failedToExecute("methodWithCallbac kAndOptionalArg", "TestObject", "The callback provided as parameter 1 is not a f unction."), info.GetIsolate()); 3746 throwTypeError(ExceptionMessages::failedToExecute("methodWithCallbac kAndOptionalArg", "TestObject", "The callback provided as parameter 1 is not a f unction."), info.GetIsolate());
3639 return; 3747 return;
3640 } 3748 }
3641 callback = V8TestCallback::create(info[0], getExecutionContext()); 3749 callback = V8TestCallback::create(info[0], getExecutionContext());
3642 } 3750 }
3643 imp->methodWithCallbackAndOptionalArg(callback.release()); 3751 imp->methodWithCallbackAndOptionalArg(callback.release());
3644 } 3752 }
3645 3753
3646 static void methodWithCallbackAndOptionalArgMethodCallback(const v8::FunctionCal lbackInfo<v8::Value>& info) 3754 static void methodWithCallbackAndOptionalArgMethodCallback(const v8::FunctionCal lbackInfo<v8::Value>& info)
3647 { 3755 {
3648 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3756 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3649 TestObjV8Internal::methodWithCallbackAndOptionalArgMethod(info); 3757 TestObjV8Internal::methodWithCallbackAndOptionalArgMethod(info);
3650 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3758 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3651 } 3759 }
3652 3760
3653 static void methodWithNullableCallbackArgMethod(const v8::FunctionCallbackInfo<v 8::Value>& info) 3761 static void methodWithNullableCallbackArgMethod(const v8::FunctionCallbackInfo<v 8::Value>& info)
3654 { 3762 {
3763 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithN ullableCallbackArg", "TestObject", info.Holder(), info.GetIsolate());
3655 if (UNLIKELY(info.Length() < 1)) { 3764 if (UNLIKELY(info.Length() < 1)) {
3656 throwTypeError(ExceptionMessages::failedToExecute("methodWithNullableCal lbackArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length()) ), info.GetIsolate()); 3765 throwTypeError(ExceptionMessages::failedToExecute("methodWithNullableCal lbackArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length()) ), info.GetIsolate());
3657 return; 3766 return;
3658 } 3767 }
3659 TestObj* imp = V8TestObject::toNative(info.Holder()); 3768 TestObj* imp = V8TestObject::toNative(info.Holder());
3660 if (info.Length() <= 0 || !(info[0]->IsFunction() || info[0]->IsNull())) { 3769 if (info.Length() <= 0 || !(info[0]->IsFunction() || info[0]->IsNull())) {
3661 throwTypeError(ExceptionMessages::failedToExecute("methodWithNullableCal lbackArg", "TestObject", "The callback provided as parameter 1 is not a function ."), info.GetIsolate()); 3770 throwTypeError(ExceptionMessages::failedToExecute("methodWithNullableCal lbackArg", "TestObject", "The callback provided as parameter 1 is not a function ."), info.GetIsolate());
3662 return; 3771 return;
3663 } 3772 }
3664 OwnPtr<TestCallback> callback = info[0]->IsNull() ? nullptr : V8TestCallback ::create(info[0], getExecutionContext()); 3773 OwnPtr<TestCallback> callback = info[0]->IsNull() ? nullptr : V8TestCallback ::create(info[0], getExecutionContext());
3665 imp->methodWithNullableCallbackArg(callback.release()); 3774 imp->methodWithNullableCallbackArg(callback.release());
3666 } 3775 }
3667 3776
3668 static void methodWithNullableCallbackArgMethodCallback(const v8::FunctionCallba ckInfo<v8::Value>& info) 3777 static void methodWithNullableCallbackArgMethodCallback(const v8::FunctionCallba ckInfo<v8::Value>& info)
3669 { 3778 {
3670 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3779 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3671 TestObjV8Internal::methodWithNullableCallbackArgMethod(info); 3780 TestObjV8Internal::methodWithNullableCallbackArgMethod(info);
3672 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3781 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3673 } 3782 }
3674 3783
3675 static void staticMethodWithCallbackAndOptionalArgMethod(const v8::FunctionCallb ackInfo<v8::Value>& info) 3784 static void staticMethodWithCallbackAndOptionalArgMethod(const v8::FunctionCallb ackInfo<v8::Value>& info)
3676 { 3785 {
3786 ExceptionState exceptionState(ExceptionState::ExecutionContext, "staticMetho dWithCallbackAndOptionalArg", "TestObject", info.Holder(), info.GetIsolate());
3677 OwnPtr<TestCallback> callback; 3787 OwnPtr<TestCallback> callback;
3678 if (info.Length() > 0 && !info[0]->IsNull() && !info[0]->IsUndefined()) { 3788 if (info.Length() > 0 && !info[0]->IsNull() && !info[0]->IsUndefined()) {
3679 if (!info[0]->IsFunction()) { 3789 if (!info[0]->IsFunction()) {
3680 throwTypeError(ExceptionMessages::failedToExecute("staticMethodWithC allbackAndOptionalArg", "TestObject", "The callback provided as parameter 1 is n ot a function."), info.GetIsolate()); 3790 throwTypeError(ExceptionMessages::failedToExecute("staticMethodWithC allbackAndOptionalArg", "TestObject", "The callback provided as parameter 1 is n ot a function."), info.GetIsolate());
3681 return; 3791 return;
3682 } 3792 }
3683 callback = V8TestCallback::create(info[0], getExecutionContext()); 3793 callback = V8TestCallback::create(info[0], getExecutionContext());
3684 } 3794 }
3685 TestObj::staticMethodWithCallbackAndOptionalArg(callback.release()); 3795 TestObj::staticMethodWithCallbackAndOptionalArg(callback.release());
3686 } 3796 }
3687 3797
3688 static void staticMethodWithCallbackAndOptionalArgMethodCallback(const v8::Funct ionCallbackInfo<v8::Value>& info) 3798 static void staticMethodWithCallbackAndOptionalArgMethodCallback(const v8::Funct ionCallbackInfo<v8::Value>& info)
3689 { 3799 {
3690 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3800 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3691 TestObjV8Internal::staticMethodWithCallbackAndOptionalArgMethod(info); 3801 TestObjV8Internal::staticMethodWithCallbackAndOptionalArgMethod(info);
3692 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3802 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3693 } 3803 }
3694 3804
3695 static void staticMethodWithCallbackArgMethod(const v8::FunctionCallbackInfo<v8: :Value>& info) 3805 static void staticMethodWithCallbackArgMethod(const v8::FunctionCallbackInfo<v8: :Value>& info)
3696 { 3806 {
3807 ExceptionState exceptionState(ExceptionState::ExecutionContext, "staticMetho dWithCallbackArg", "TestObject", info.Holder(), info.GetIsolate());
3697 if (UNLIKELY(info.Length() < 1)) { 3808 if (UNLIKELY(info.Length() < 1)) {
3698 throwTypeError(ExceptionMessages::failedToExecute("staticMethodWithCallb ackArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()); 3809 throwTypeError(ExceptionMessages::failedToExecute("staticMethodWithCallb ackArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
3699 return; 3810 return;
3700 } 3811 }
3701 if (info.Length() <= 0 || !info[0]->IsFunction()) { 3812 if (info.Length() <= 0 || !info[0]->IsFunction()) {
3702 throwTypeError(ExceptionMessages::failedToExecute("staticMethodWithCallb ackArg", "TestObject", "The callback provided as parameter 1 is not a function." ), info.GetIsolate()); 3813 throwTypeError(ExceptionMessages::failedToExecute("staticMethodWithCallb ackArg", "TestObject", "The callback provided as parameter 1 is not a function." ), info.GetIsolate());
3703 return; 3814 return;
3704 } 3815 }
3705 OwnPtr<TestCallback> callback = V8TestCallback::create(info[0], getExecution Context()); 3816 OwnPtr<TestCallback> callback = V8TestCallback::create(info[0], getExecution Context());
3706 TestObj::staticMethodWithCallbackArg(callback.release()); 3817 TestObj::staticMethodWithCallbackArg(callback.release());
3707 } 3818 }
3708 3819
3709 static void staticMethodWithCallbackArgMethodCallback(const v8::FunctionCallback Info<v8::Value>& info) 3820 static void staticMethodWithCallbackArgMethodCallback(const v8::FunctionCallback Info<v8::Value>& info)
3710 { 3821 {
3711 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3822 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3712 TestObjV8Internal::staticMethodWithCallbackArgMethod(info); 3823 TestObjV8Internal::staticMethodWithCallbackArgMethod(info);
3713 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3824 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3714 } 3825 }
3715 3826
3716 static void methodWithEnforceRangeInt8Method(const v8::FunctionCallbackInfo<v8:: Value>& info) 3827 static void methodWithEnforceRangeInt8Method(const v8::FunctionCallbackInfo<v8:: Value>& info)
3717 { 3828 {
3829 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE nforceRangeInt8", "TestObject", info.Holder(), info.GetIsolate());
3718 if (UNLIKELY(info.Length() < 1)) { 3830 if (UNLIKELY(info.Length() < 1)) {
3719 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRang eInt8", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()); 3831 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRang eInt8", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
3720 return; 3832 return;
3721 } 3833 }
3722 TestObj* imp = V8TestObject::toNative(info.Holder()); 3834 TestObj* imp = V8TestObject::toNative(info.Holder());
3723 V8TRYCATCH_WITH_TYPECHECK_VOID(int, value, toInt8(info[0], EnforceRange, ok) , info.GetIsolate()); 3835 V8TRYCATCH_WITH_TYPECHECK_VOID(int, value, toInt8(info[0], EnforceRange, ok) , info.GetIsolate());
3724 imp->methodWithEnforceRangeInt8(value); 3836 imp->methodWithEnforceRangeInt8(value);
3725 } 3837 }
3726 3838
3727 static void methodWithEnforceRangeInt8MethodCallback(const v8::FunctionCallbackI nfo<v8::Value>& info) 3839 static void methodWithEnforceRangeInt8MethodCallback(const v8::FunctionCallbackI nfo<v8::Value>& info)
3728 { 3840 {
3729 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3841 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3730 TestObjV8Internal::methodWithEnforceRangeInt8Method(info); 3842 TestObjV8Internal::methodWithEnforceRangeInt8Method(info);
3731 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3843 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3732 } 3844 }
3733 3845
3734 static void methodWithEnforceRangeUInt8Method(const v8::FunctionCallbackInfo<v8: :Value>& info) 3846 static void methodWithEnforceRangeUInt8Method(const v8::FunctionCallbackInfo<v8: :Value>& info)
3735 { 3847 {
3848 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE nforceRangeUInt8", "TestObject", info.Holder(), info.GetIsolate());
3736 if (UNLIKELY(info.Length() < 1)) { 3849 if (UNLIKELY(info.Length() < 1)) {
3737 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRang eUInt8", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()); 3850 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRang eUInt8", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
3738 return; 3851 return;
3739 } 3852 }
3740 TestObj* imp = V8TestObject::toNative(info.Holder()); 3853 TestObj* imp = V8TestObject::toNative(info.Holder());
3741 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, value, toUInt8(info[0], EnforceRang e, ok), info.GetIsolate()); 3854 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, value, toUInt8(info[0], EnforceRang e, ok), info.GetIsolate());
3742 imp->methodWithEnforceRangeUInt8(value); 3855 imp->methodWithEnforceRangeUInt8(value);
3743 } 3856 }
3744 3857
3745 static void methodWithEnforceRangeUInt8MethodCallback(const v8::FunctionCallback Info<v8::Value>& info) 3858 static void methodWithEnforceRangeUInt8MethodCallback(const v8::FunctionCallback Info<v8::Value>& info)
3746 { 3859 {
3747 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3860 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3748 TestObjV8Internal::methodWithEnforceRangeUInt8Method(info); 3861 TestObjV8Internal::methodWithEnforceRangeUInt8Method(info);
3749 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3862 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3750 } 3863 }
3751 3864
3752 static void methodWithEnforceRangeInt16Method(const v8::FunctionCallbackInfo<v8: :Value>& info) 3865 static void methodWithEnforceRangeInt16Method(const v8::FunctionCallbackInfo<v8: :Value>& info)
3753 { 3866 {
3867 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE nforceRangeInt16", "TestObject", info.Holder(), info.GetIsolate());
3754 if (UNLIKELY(info.Length() < 1)) { 3868 if (UNLIKELY(info.Length() < 1)) {
3755 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRang eInt16", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()); 3869 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRang eInt16", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
3756 return; 3870 return;
3757 } 3871 }
3758 TestObj* imp = V8TestObject::toNative(info.Holder()); 3872 TestObj* imp = V8TestObject::toNative(info.Holder());
3759 V8TRYCATCH_WITH_TYPECHECK_VOID(int, value, toInt16(info[0], EnforceRange, ok ), info.GetIsolate()); 3873 V8TRYCATCH_WITH_TYPECHECK_VOID(int, value, toInt16(info[0], EnforceRange, ok ), info.GetIsolate());
3760 imp->methodWithEnforceRangeInt16(value); 3874 imp->methodWithEnforceRangeInt16(value);
3761 } 3875 }
3762 3876
3763 static void methodWithEnforceRangeInt16MethodCallback(const v8::FunctionCallback Info<v8::Value>& info) 3877 static void methodWithEnforceRangeInt16MethodCallback(const v8::FunctionCallback Info<v8::Value>& info)
3764 { 3878 {
3765 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3879 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3766 TestObjV8Internal::methodWithEnforceRangeInt16Method(info); 3880 TestObjV8Internal::methodWithEnforceRangeInt16Method(info);
3767 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3881 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3768 } 3882 }
3769 3883
3770 static void methodWithEnforceRangeUInt16Method(const v8::FunctionCallbackInfo<v8 ::Value>& info) 3884 static void methodWithEnforceRangeUInt16Method(const v8::FunctionCallbackInfo<v8 ::Value>& info)
3771 { 3885 {
3886 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE nforceRangeUInt16", "TestObject", info.Holder(), info.GetIsolate());
3772 if (UNLIKELY(info.Length() < 1)) { 3887 if (UNLIKELY(info.Length() < 1)) {
3773 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRang eUInt16", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())) , info.GetIsolate()); 3888 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRang eUInt16", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())) , info.GetIsolate());
3774 return; 3889 return;
3775 } 3890 }
3776 TestObj* imp = V8TestObject::toNative(info.Holder()); 3891 TestObj* imp = V8TestObject::toNative(info.Holder());
3777 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, value, toUInt16(info[0], EnforceRan ge, ok), info.GetIsolate()); 3892 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, value, toUInt16(info[0], EnforceRan ge, ok), info.GetIsolate());
3778 imp->methodWithEnforceRangeUInt16(value); 3893 imp->methodWithEnforceRangeUInt16(value);
3779 } 3894 }
3780 3895
3781 static void methodWithEnforceRangeUInt16MethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& info) 3896 static void methodWithEnforceRangeUInt16MethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& info)
3782 { 3897 {
3783 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3898 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3784 TestObjV8Internal::methodWithEnforceRangeUInt16Method(info); 3899 TestObjV8Internal::methodWithEnforceRangeUInt16Method(info);
3785 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3900 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3786 } 3901 }
3787 3902
3788 static void methodWithEnforceRangeInt32Method(const v8::FunctionCallbackInfo<v8: :Value>& info) 3903 static void methodWithEnforceRangeInt32Method(const v8::FunctionCallbackInfo<v8: :Value>& info)
3789 { 3904 {
3905 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE nforceRangeInt32", "TestObject", info.Holder(), info.GetIsolate());
3790 if (UNLIKELY(info.Length() < 1)) { 3906 if (UNLIKELY(info.Length() < 1)) {
3791 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRang eInt32", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()); 3907 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRang eInt32", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
3792 return; 3908 return;
3793 } 3909 }
3794 TestObj* imp = V8TestObject::toNative(info.Holder()); 3910 TestObj* imp = V8TestObject::toNative(info.Holder());
3795 V8TRYCATCH_WITH_TYPECHECK_VOID(int, value, toInt32(info[0], EnforceRange, ok ), info.GetIsolate()); 3911 V8TRYCATCH_WITH_TYPECHECK_VOID(int, value, toInt32(info[0], EnforceRange, ok ), info.GetIsolate());
3796 imp->methodWithEnforceRangeInt32(value); 3912 imp->methodWithEnforceRangeInt32(value);
3797 } 3913 }
3798 3914
3799 static void methodWithEnforceRangeInt32MethodCallback(const v8::FunctionCallback Info<v8::Value>& info) 3915 static void methodWithEnforceRangeInt32MethodCallback(const v8::FunctionCallback Info<v8::Value>& info)
3800 { 3916 {
3801 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3917 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3802 TestObjV8Internal::methodWithEnforceRangeInt32Method(info); 3918 TestObjV8Internal::methodWithEnforceRangeInt32Method(info);
3803 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3919 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3804 } 3920 }
3805 3921
3806 static void methodWithEnforceRangeUInt32Method(const v8::FunctionCallbackInfo<v8 ::Value>& info) 3922 static void methodWithEnforceRangeUInt32Method(const v8::FunctionCallbackInfo<v8 ::Value>& info)
3807 { 3923 {
3924 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE nforceRangeUInt32", "TestObject", info.Holder(), info.GetIsolate());
3808 if (UNLIKELY(info.Length() < 1)) { 3925 if (UNLIKELY(info.Length() < 1)) {
3809 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRang eUInt32", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())) , info.GetIsolate()); 3926 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRang eUInt32", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())) , info.GetIsolate());
3810 return; 3927 return;
3811 } 3928 }
3812 TestObj* imp = V8TestObject::toNative(info.Holder()); 3929 TestObj* imp = V8TestObject::toNative(info.Holder());
3813 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, value, toUInt32(info[0], EnforceRan ge, ok), info.GetIsolate()); 3930 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, value, toUInt32(info[0], EnforceRan ge, ok), info.GetIsolate());
3814 imp->methodWithEnforceRangeUInt32(value); 3931 imp->methodWithEnforceRangeUInt32(value);
3815 } 3932 }
3816 3933
3817 static void methodWithEnforceRangeUInt32MethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& info) 3934 static void methodWithEnforceRangeUInt32MethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& info)
3818 { 3935 {
3819 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3936 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3820 TestObjV8Internal::methodWithEnforceRangeUInt32Method(info); 3937 TestObjV8Internal::methodWithEnforceRangeUInt32Method(info);
3821 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3938 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3822 } 3939 }
3823 3940
3824 static void methodWithEnforceRangeInt64Method(const v8::FunctionCallbackInfo<v8: :Value>& info) 3941 static void methodWithEnforceRangeInt64Method(const v8::FunctionCallbackInfo<v8: :Value>& info)
3825 { 3942 {
3943 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE nforceRangeInt64", "TestObject", info.Holder(), info.GetIsolate());
3826 if (UNLIKELY(info.Length() < 1)) { 3944 if (UNLIKELY(info.Length() < 1)) {
3827 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRang eInt64", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()); 3945 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRang eInt64", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
3828 return; 3946 return;
3829 } 3947 }
3830 TestObj* imp = V8TestObject::toNative(info.Holder()); 3948 TestObj* imp = V8TestObject::toNative(info.Holder());
3831 V8TRYCATCH_WITH_TYPECHECK_VOID(long long, value, toInt64(info[0], EnforceRan ge, ok), info.GetIsolate()); 3949 V8TRYCATCH_WITH_TYPECHECK_VOID(long long, value, toInt64(info[0], EnforceRan ge, ok), info.GetIsolate());
3832 imp->methodWithEnforceRangeInt64(value); 3950 imp->methodWithEnforceRangeInt64(value);
3833 } 3951 }
3834 3952
3835 static void methodWithEnforceRangeInt64MethodCallback(const v8::FunctionCallback Info<v8::Value>& info) 3953 static void methodWithEnforceRangeInt64MethodCallback(const v8::FunctionCallback Info<v8::Value>& info)
3836 { 3954 {
3837 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3955 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3838 TestObjV8Internal::methodWithEnforceRangeInt64Method(info); 3956 TestObjV8Internal::methodWithEnforceRangeInt64Method(info);
3839 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3957 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3840 } 3958 }
3841 3959
3842 static void methodWithEnforceRangeUInt64Method(const v8::FunctionCallbackInfo<v8 ::Value>& info) 3960 static void methodWithEnforceRangeUInt64Method(const v8::FunctionCallbackInfo<v8 ::Value>& info)
3843 { 3961 {
3962 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE nforceRangeUInt64", "TestObject", info.Holder(), info.GetIsolate());
3844 if (UNLIKELY(info.Length() < 1)) { 3963 if (UNLIKELY(info.Length() < 1)) {
3845 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRang eUInt64", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())) , info.GetIsolate()); 3964 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRang eUInt64", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())) , info.GetIsolate());
3846 return; 3965 return;
3847 } 3966 }
3848 TestObj* imp = V8TestObject::toNative(info.Holder()); 3967 TestObj* imp = V8TestObject::toNative(info.Holder());
3849 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned long long, value, toUInt64(info[0], EnforceRange, ok), info.GetIsolate()); 3968 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned long long, value, toUInt64(info[0], EnforceRange, ok), info.GetIsolate());
3850 imp->methodWithEnforceRangeUInt64(value); 3969 imp->methodWithEnforceRangeUInt64(value);
3851 } 3970 }
3852 3971
3853 static void methodWithEnforceRangeUInt64MethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& info) 3972 static void methodWithEnforceRangeUInt64MethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& info)
3854 { 3973 {
3855 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3974 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3856 TestObjV8Internal::methodWithEnforceRangeUInt64Method(info); 3975 TestObjV8Internal::methodWithEnforceRangeUInt64Method(info);
3857 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3976 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3858 } 3977 }
3859 3978
3860 #if ENABLE(Condition1) 3979 #if ENABLE(Condition1)
3861 static void conditionalMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info) 3980 static void conditionalMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
3862 { 3981 {
3982 ExceptionState exceptionState(ExceptionState::ExecutionContext, "conditional Method1", "TestObject", info.Holder(), info.GetIsolate());
3863 TestObj* imp = V8TestObject::toNative(info.Holder()); 3983 TestObj* imp = V8TestObject::toNative(info.Holder());
3864 v8SetReturnValueString(info, imp->conditionalMethod1(), info.GetIsolate()); 3984 v8SetReturnValueString(info, imp->conditionalMethod1(), info.GetIsolate());
3865 } 3985 }
3866 #endif // ENABLE(Condition1) 3986 #endif // ENABLE(Condition1)
3867 3987
3868 #if ENABLE(Condition1) 3988 #if ENABLE(Condition1)
3869 static void conditionalMethod1MethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info) 3989 static void conditionalMethod1MethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info)
3870 { 3990 {
3871 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3991 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3872 TestObjV8Internal::conditionalMethod1Method(info); 3992 TestObjV8Internal::conditionalMethod1Method(info);
3873 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3993 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3874 } 3994 }
3875 #endif // ENABLE(Condition1) 3995 #endif // ENABLE(Condition1)
3876 3996
3877 #if ENABLE(Condition1) && ENABLE(Condition2) 3997 #if ENABLE(Condition1) && ENABLE(Condition2)
3878 static void conditionalMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info) 3998 static void conditionalMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
3879 { 3999 {
4000 ExceptionState exceptionState(ExceptionState::ExecutionContext, "conditional Method2", "TestObject", info.Holder(), info.GetIsolate());
3880 TestObj* imp = V8TestObject::toNative(info.Holder()); 4001 TestObj* imp = V8TestObject::toNative(info.Holder());
3881 imp->conditionalMethod2(); 4002 imp->conditionalMethod2();
3882 } 4003 }
3883 #endif // ENABLE(Condition1) && ENABLE(Condition2) 4004 #endif // ENABLE(Condition1) && ENABLE(Condition2)
3884 4005
3885 #if ENABLE(Condition1) && ENABLE(Condition2) 4006 #if ENABLE(Condition1) && ENABLE(Condition2)
3886 static void conditionalMethod2MethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info) 4007 static void conditionalMethod2MethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info)
3887 { 4008 {
3888 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4009 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3889 TestObjV8Internal::conditionalMethod2Method(info); 4010 TestObjV8Internal::conditionalMethod2Method(info);
3890 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4011 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3891 } 4012 }
3892 #endif // ENABLE(Condition1) && ENABLE(Condition2) 4013 #endif // ENABLE(Condition1) && ENABLE(Condition2)
3893 4014
3894 #if ENABLE(Condition1) || ENABLE(Condition2) 4015 #if ENABLE(Condition1) || ENABLE(Condition2)
3895 static void conditionalMethod3Method(const v8::FunctionCallbackInfo<v8::Value>& info) 4016 static void conditionalMethod3Method(const v8::FunctionCallbackInfo<v8::Value>& info)
3896 { 4017 {
4018 ExceptionState exceptionState(ExceptionState::ExecutionContext, "conditional Method3", "TestObject", info.Holder(), info.GetIsolate());
3897 TestObj* imp = V8TestObject::toNative(info.Holder()); 4019 TestObj* imp = V8TestObject::toNative(info.Holder());
3898 imp->conditionalMethod3(); 4020 imp->conditionalMethod3();
3899 } 4021 }
3900 #endif // ENABLE(Condition1) || ENABLE(Condition2) 4022 #endif // ENABLE(Condition1) || ENABLE(Condition2)
3901 4023
3902 #if ENABLE(Condition1) || ENABLE(Condition2) 4024 #if ENABLE(Condition1) || ENABLE(Condition2)
3903 static void conditionalMethod3MethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info) 4025 static void conditionalMethod3MethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info)
3904 { 4026 {
3905 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4027 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3906 TestObjV8Internal::conditionalMethod3Method(info); 4028 TestObjV8Internal::conditionalMethod3Method(info);
3907 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4029 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3908 } 4030 }
3909 #endif // ENABLE(Condition1) || ENABLE(Condition2) 4031 #endif // ENABLE(Condition1) || ENABLE(Condition2)
3910 4032
3911 static void callbackFunctionReturnValueMethod(const v8::FunctionCallbackInfo<v8: :Value>& info) 4033 static void callbackFunctionReturnValueMethod(const v8::FunctionCallbackInfo<v8: :Value>& info)
3912 { 4034 {
4035 ExceptionState exceptionState(ExceptionState::ExecutionContext, "callbackFun ctionReturnValue", "TestObject", info.Holder(), info.GetIsolate());
3913 TestObj* imp = V8TestObject::toNative(info.Holder()); 4036 TestObj* imp = V8TestObject::toNative(info.Holder());
3914 v8SetReturnValue(info, imp->callbackFunctionReturnValue().v8Value()); 4037 v8SetReturnValue(info, imp->callbackFunctionReturnValue().v8Value());
3915 } 4038 }
3916 4039
3917 static void callbackFunctionReturnValueMethodCallback(const v8::FunctionCallback Info<v8::Value>& info) 4040 static void callbackFunctionReturnValueMethodCallback(const v8::FunctionCallback Info<v8::Value>& info)
3918 { 4041 {
3919 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4042 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3920 TestObjV8Internal::callbackFunctionReturnValueMethod(info); 4043 TestObjV8Internal::callbackFunctionReturnValueMethod(info);
3921 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4044 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3922 } 4045 }
3923 4046
3924 static void callbackFunctionArgumentMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info) 4047 static void callbackFunctionArgumentMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info)
3925 { 4048 {
4049 ExceptionState exceptionState(ExceptionState::ExecutionContext, "callbackFun ctionArgument", "TestObject", info.Holder(), info.GetIsolate());
3926 if (UNLIKELY(info.Length() < 1)) { 4050 if (UNLIKELY(info.Length() < 1)) {
3927 throwTypeError(ExceptionMessages::failedToExecute("callbackFunctionArgum ent", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), in fo.GetIsolate()); 4051 throwTypeError(ExceptionMessages::failedToExecute("callbackFunctionArgum ent", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), in fo.GetIsolate());
3928 return; 4052 return;
3929 } 4053 }
3930 TestObj* imp = V8TestObject::toNative(info.Holder()); 4054 TestObj* imp = V8TestObject::toNative(info.Holder());
3931 V8TRYCATCH_VOID(ScriptValue, function, ScriptValue(info[0], info.GetIsolate( ))); 4055 V8TRYCATCH_VOID(ScriptValue, function, ScriptValue(info[0], info.GetIsolate( )));
3932 imp->callbackFunctionArgument(function); 4056 imp->callbackFunctionArgument(function);
3933 } 4057 }
3934 4058
3935 static void callbackFunctionArgumentMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info) 4059 static void callbackFunctionArgumentMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info)
3936 { 4060 {
3937 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4061 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3938 TestObjV8Internal::callbackFunctionArgumentMethod(info); 4062 TestObjV8Internal::callbackFunctionArgumentMethod(info);
3939 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4063 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3940 } 4064 }
3941 4065
3942 static void overloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 4066 static void overloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
3943 { 4067 {
4068 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethod", "TestObject", info.Holder(), info.GetIsolate());
3944 if (UNLIKELY(info.Length() < 1)) { 4069 if (UNLIKELY(info.Length() < 1)) {
3945 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T estObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIs olate()); 4070 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T estObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIs olate());
3946 return; 4071 return;
3947 } 4072 }
3948 TestObj* imp = V8TestObject::toNative(info.Holder()); 4073 TestObj* imp = V8TestObject::toNative(info.Holder());
3949 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); 4074 V8TRYCATCH_VOID(int, longArg, toInt32(info[0]));
3950 imp->overloadedMethod(longArg); 4075 imp->overloadedMethod(longArg);
3951 } 4076 }
3952 4077
3953 static void overloadedMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 4078 static void overloadedMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
3954 { 4079 {
4080 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethod", "TestObject", info.Holder(), info.GetIsolate());
3955 if (UNLIKELY(info.Length() < 1)) { 4081 if (UNLIKELY(info.Length() < 1)) {
3956 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T estObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIs olate()); 4082 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T estObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIs olate());
3957 return; 4083 return;
3958 } 4084 }
3959 TestObj* imp = V8TestObject::toNative(info.Holder()); 4085 TestObj* imp = V8TestObject::toNative(info.Holder());
3960 if (info.Length() <= 0 || !info[0]->IsFunction()) { 4086 if (info.Length() <= 0 || !info[0]->IsFunction()) {
3961 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T estObject", "The callback provided as parameter 1 is not a function."), info.Get Isolate()); 4087 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T estObject", "The callback provided as parameter 1 is not a function."), info.Get Isolate());
3962 return; 4088 return;
3963 } 4089 }
3964 OwnPtr<TestCallback> callbackArg = V8TestCallback::create(info[0], getExecut ionContext()); 4090 OwnPtr<TestCallback> callbackArg = V8TestCallback::create(info[0], getExecut ionContext());
3965 imp->overloadedMethod(callbackArg.release()); 4091 imp->overloadedMethod(callbackArg.release());
3966 } 4092 }
3967 4093
3968 static void overloadedMethod3Method(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 4094 static void overloadedMethod3Method(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
3969 { 4095 {
4096 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethod", "TestObject", info.Holder(), info.GetIsolate());
3970 if (UNLIKELY(info.Length() < 1)) { 4097 if (UNLIKELY(info.Length() < 1)) {
3971 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T estObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIs olate()); 4098 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T estObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIs olate());
3972 return; 4099 return;
3973 } 4100 }
3974 TestObj* imp = V8TestObject::toNative(info.Holder()); 4101 TestObj* imp = V8TestObject::toNative(info.Holder());
3975 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::hasInstance(info[0], info.Ge tIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8 ::Object>::Cast(info[0])) : 0); 4102 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::hasInstance(info[0], info.Ge tIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8 ::Object>::Cast(info[0])) : 0);
3976 imp->overloadedMethod(objArg); 4103 imp->overloadedMethod(objArg);
3977 } 4104 }
3978 4105
3979 static void overloadedMethod4Method(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 4106 static void overloadedMethod4Method(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
3980 { 4107 {
4108 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethod", "TestObject", info.Holder(), info.GetIsolate());
3981 if (UNLIKELY(info.Length() < 1)) { 4109 if (UNLIKELY(info.Length() < 1)) {
3982 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T estObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIs olate()); 4110 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T estObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIs olate());
3983 return; 4111 return;
3984 } 4112 }
3985 TestObj* imp = V8TestObject::toNative(info.Holder()); 4113 TestObj* imp = V8TestObject::toNative(info.Holder());
3986 V8TRYCATCH_VOID(Vector<String>, arrayArg, toNativeArray<String>(info[0], 1, info.GetIsolate())); 4114 V8TRYCATCH_VOID(Vector<String>, arrayArg, toNativeArray<String>(info[0], 1, info.GetIsolate()));
3987 imp->overloadedMethod(arrayArg); 4115 imp->overloadedMethod(arrayArg);
3988 } 4116 }
3989 4117
3990 static void overloadedMethod5Method(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 4118 static void overloadedMethod5Method(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
3991 { 4119 {
4120 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethod", "TestObject", info.Holder(), info.GetIsolate());
3992 if (UNLIKELY(info.Length() < 1)) { 4121 if (UNLIKELY(info.Length() < 1)) {
3993 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T estObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIs olate()); 4122 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T estObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIs olate());
3994 return; 4123 return;
3995 } 4124 }
3996 TestObj* imp = V8TestObject::toNative(info.Holder()); 4125 TestObj* imp = V8TestObject::toNative(info.Holder());
3997 V8TRYCATCH_VOID(Vector<unsigned>, sequenceArg, toNativeArray<unsigned>(info[ 0], 1, info.GetIsolate())); 4126 V8TRYCATCH_VOID(Vector<unsigned>, sequenceArg, toNativeArray<unsigned>(info[ 0], 1, info.GetIsolate()));
3998 imp->overloadedMethod(sequenceArg); 4127 imp->overloadedMethod(sequenceArg);
3999 } 4128 }
4000 4129
4001 static void overloadedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in fo) 4130 static void overloadedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in fo)
(...skipping 27 matching lines...) Expand all
4029 4158
4030 static void overloadedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& info) 4159 static void overloadedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& info)
4031 { 4160 {
4032 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4161 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4033 TestObjV8Internal::overloadedMethodMethod(info); 4162 TestObjV8Internal::overloadedMethodMethod(info);
4034 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4163 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4035 } 4164 }
4036 4165
4037 static void overloadedMethodA1Method(const v8::FunctionCallbackInfo<v8::Value>& info) 4166 static void overloadedMethodA1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
4038 { 4167 {
4168 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethodA", "TestObject", info.Holder(), info.GetIsolate());
4039 if (UNLIKELY(info.Length() < 1)) { 4169 if (UNLIKELY(info.Length() < 1)) {
4040 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodA", " TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetI solate()); 4170 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodA", " TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetI solate());
4041 return; 4171 return;
4042 } 4172 }
4043 TestObj* imp = V8TestObject::toNative(info.Holder()); 4173 TestObj* imp = V8TestObject::toNative(info.Holder());
4044 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::hasInstance(info[0], info.Ge tIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8 ::Object>::Cast(info[0])) : 0); 4174 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::hasInstance(info[0], info.Ge tIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8 ::Object>::Cast(info[0])) : 0);
4045 if (UNLIKELY(info.Length() <= 1)) { 4175 if (UNLIKELY(info.Length() <= 1)) {
4046 imp->overloadedMethodA(objArg); 4176 imp->overloadedMethodA(objArg);
4047 return; 4177 return;
4048 } 4178 }
4049 V8TRYCATCH_VOID(int, longArg, toInt32(info[1])); 4179 V8TRYCATCH_VOID(int, longArg, toInt32(info[1]));
4050 imp->overloadedMethodA(objArg, longArg); 4180 imp->overloadedMethodA(objArg, longArg);
4051 } 4181 }
4052 4182
4053 static void overloadedMethodA2Method(const v8::FunctionCallbackInfo<v8::Value>& info) 4183 static void overloadedMethodA2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
4054 { 4184 {
4185 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethodA", "TestObject", info.Holder(), info.GetIsolate());
4055 if (UNLIKELY(info.Length() < 2)) { 4186 if (UNLIKELY(info.Length() < 2)) {
4056 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodA", " TestObject", ExceptionMessages::notEnoughArguments(2, info.Length())), info.GetI solate()); 4187 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodA", " TestObject", ExceptionMessages::notEnoughArguments(2, info.Length())), info.GetI solate());
4057 return; 4188 return;
4058 } 4189 }
4059 TestObj* imp = V8TestObject::toNative(info.Holder()); 4190 TestObj* imp = V8TestObject::toNative(info.Holder());
4060 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::hasInstance(info[0], info.Ge tIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8 ::Object>::Cast(info[0])) : 0); 4191 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::hasInstance(info[0], info.Ge tIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8 ::Object>::Cast(info[0])) : 0);
4061 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[1]); 4192 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[1]);
4062 imp->overloadedMethodA(objArg, strArg); 4193 imp->overloadedMethodA(objArg, strArg);
4063 } 4194 }
4064 4195
(...skipping 16 matching lines...) Expand all
4081 4212
4082 static void overloadedMethodAMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info) 4213 static void overloadedMethodAMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
4083 { 4214 {
4084 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4215 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4085 TestObjV8Internal::overloadedMethodAMethod(info); 4216 TestObjV8Internal::overloadedMethodAMethod(info);
4086 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4217 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4087 } 4218 }
4088 4219
4089 static void overloadedMethodB1Method(const v8::FunctionCallbackInfo<v8::Value>& info) 4220 static void overloadedMethodB1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
4090 { 4221 {
4222 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethodB", "TestObject", info.Holder(), info.GetIsolate());
4091 if (UNLIKELY(info.Length() < 1)) { 4223 if (UNLIKELY(info.Length() < 1)) {
4092 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodB", " TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetI solate()); 4224 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodB", " TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetI solate());
4093 return; 4225 return;
4094 } 4226 }
4095 TestObj* imp = V8TestObject::toNative(info.Holder()); 4227 TestObj* imp = V8TestObject::toNative(info.Holder());
4096 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); 4228 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]);
4097 imp->overloadedMethodB(strArg); 4229 imp->overloadedMethodB(strArg);
4098 } 4230 }
4099 4231
4100 static void overloadedMethodB2Method(const v8::FunctionCallbackInfo<v8::Value>& info) 4232 static void overloadedMethodB2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
4101 { 4233 {
4234 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethodB", "TestObject", info.Holder(), info.GetIsolate());
4102 if (UNLIKELY(info.Length() < 1)) { 4235 if (UNLIKELY(info.Length() < 1)) {
4103 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodB", " TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetI solate()); 4236 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodB", " TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetI solate());
4104 return; 4237 return;
4105 } 4238 }
4106 TestObj* imp = V8TestObject::toNative(info.Holder()); 4239 TestObj* imp = V8TestObject::toNative(info.Holder());
4107 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); 4240 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]);
4108 imp->overloadedMethodB(strArg); 4241 imp->overloadedMethodB(strArg);
4109 } 4242 }
4110 4243
4111 static void overloadedMethodBMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 4244 static void overloadedMethodBMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
(...skipping 15 matching lines...) Expand all
4127 4260
4128 static void overloadedMethodBMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info) 4261 static void overloadedMethodBMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
4129 { 4262 {
4130 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4263 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4131 TestObjV8Internal::overloadedMethodBMethod(info); 4264 TestObjV8Internal::overloadedMethodBMethod(info);
4132 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4265 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4133 } 4266 }
4134 4267
4135 static void classMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 4268 static void classMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4136 { 4269 {
4270 ExceptionState exceptionState(ExceptionState::ExecutionContext, "classMethod ", "TestObject", info.Holder(), info.GetIsolate());
4137 TestObj::classMethod(); 4271 TestObj::classMethod();
4138 } 4272 }
4139 4273
4140 static void classMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 4274 static void classMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4141 { 4275 {
4142 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4276 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4143 TestObjV8Internal::classMethodMethod(info); 4277 TestObjV8Internal::classMethodMethod(info);
4144 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4278 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4145 } 4279 }
4146 4280
4147 static void classMethodWithOptionalMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info) 4281 static void classMethodWithOptionalMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info)
4148 { 4282 {
4283 ExceptionState exceptionState(ExceptionState::ExecutionContext, "classMethod WithOptional", "TestObject", info.Holder(), info.GetIsolate());
4149 if (UNLIKELY(info.Length() <= 0)) { 4284 if (UNLIKELY(info.Length() <= 0)) {
4150 v8SetReturnValueInt(info, TestObj::classMethodWithOptional()); 4285 v8SetReturnValueInt(info, TestObj::classMethodWithOptional());
4151 return; 4286 return;
4152 } 4287 }
4153 V8TRYCATCH_VOID(int, arg, toInt32(info[0])); 4288 V8TRYCATCH_VOID(int, arg, toInt32(info[0]));
4154 v8SetReturnValueInt(info, TestObj::classMethodWithOptional(arg)); 4289 v8SetReturnValueInt(info, TestObj::classMethodWithOptional(arg));
4155 } 4290 }
4156 4291
4157 static void classMethodWithOptionalMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info) 4292 static void classMethodWithOptionalMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
4158 { 4293 {
4159 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4294 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4160 TestObjV8Internal::classMethodWithOptionalMethod(info); 4295 TestObjV8Internal::classMethodWithOptionalMethod(info);
4161 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4296 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4162 } 4297 }
4163 4298
4164 static void classMethod2MethodCallback(const v8::FunctionCallbackInfo<v8::Value> & info) 4299 static void classMethod2MethodCallback(const v8::FunctionCallbackInfo<v8::Value> & info)
4165 { 4300 {
4166 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4301 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4167 V8TestObject::classMethod2MethodCustom(info); 4302 V8TestObject::classMethod2MethodCustom(info);
4168 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4303 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4169 } 4304 }
4170 4305
4171 static void classMethodWithClampMethod(const v8::FunctionCallbackInfo<v8::Value> & info) 4306 static void classMethodWithClampMethod(const v8::FunctionCallbackInfo<v8::Value> & info)
4172 { 4307 {
4308 ExceptionState exceptionState(ExceptionState::ExecutionContext, "classMethod WithClamp", "TestObject", info.Holder(), info.GetIsolate());
4173 if (UNLIKELY(info.Length() < 2)) { 4309 if (UNLIKELY(info.Length() < 2)) {
4174 throwTypeError(ExceptionMessages::failedToExecute("classMethodWithClamp" , "TestObject", ExceptionMessages::notEnoughArguments(2, info.Length())), info.G etIsolate()); 4310 throwTypeError(ExceptionMessages::failedToExecute("classMethodWithClamp" , "TestObject", ExceptionMessages::notEnoughArguments(2, info.Length())), info.G etIsolate());
4175 return; 4311 return;
4176 } 4312 }
4177 TestObj* imp = V8TestObject::toNative(info.Holder()); 4313 TestObj* imp = V8TestObject::toNative(info.Holder());
4178 unsigned objArgsShort = 0; 4314 unsigned objArgsShort = 0;
4179 V8TRYCATCH_VOID(double, objArgsShortNativeValue, info[0]->NumberValue()); 4315 V8TRYCATCH_VOID(double, objArgsShortNativeValue, info[0]->NumberValue());
4180 if (!std::isnan(objArgsShortNativeValue)) 4316 if (!std::isnan(objArgsShortNativeValue))
4181 objArgsShort = clampTo<unsigned short>(objArgsShortNativeValue); 4317 objArgsShort = clampTo<unsigned short>(objArgsShortNativeValue);
4182 unsigned objArgsLong = 0; 4318 unsigned objArgsLong = 0;
4183 V8TRYCATCH_VOID(double, objArgsLongNativeValue, info[1]->NumberValue()); 4319 V8TRYCATCH_VOID(double, objArgsLongNativeValue, info[1]->NumberValue());
4184 if (!std::isnan(objArgsLongNativeValue)) 4320 if (!std::isnan(objArgsLongNativeValue))
4185 objArgsLong = clampTo<unsigned long>(objArgsLongNativeValue); 4321 objArgsLong = clampTo<unsigned long>(objArgsLongNativeValue);
4186 imp->classMethodWithClamp(objArgsShort, objArgsLong); 4322 imp->classMethodWithClamp(objArgsShort, objArgsLong);
4187 } 4323 }
4188 4324
4189 static void classMethodWithClampMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info) 4325 static void classMethodWithClampMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info)
4190 { 4326 {
4191 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4327 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4192 TestObjV8Internal::classMethodWithClampMethod(info); 4328 TestObjV8Internal::classMethodWithClampMethod(info);
4193 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4329 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4194 } 4330 }
4195 4331
4196 static void enabledAtRuntimeMethodMethod(const v8::FunctionCallbackInfo<v8::Valu e>& info) 4332 static void enabledAtRuntimeMethodMethod(const v8::FunctionCallbackInfo<v8::Valu e>& info)
4197 { 4333 {
4334 ExceptionState exceptionState(ExceptionState::ExecutionContext, "enabledAtRu ntimeMethod", "TestObject", info.Holder(), info.GetIsolate());
4198 if (UNLIKELY(info.Length() < 1)) { 4335 if (UNLIKELY(info.Length() < 1)) {
4199 throwTypeError(ExceptionMessages::failedToExecute("enabledAtRuntimeMetho d", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info .GetIsolate()); 4336 throwTypeError(ExceptionMessages::failedToExecute("enabledAtRuntimeMetho d", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info .GetIsolate());
4200 return; 4337 return;
4201 } 4338 }
4202 TestObj* imp = V8TestObject::toNative(info.Holder()); 4339 TestObj* imp = V8TestObject::toNative(info.Holder());
4203 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); 4340 V8TRYCATCH_VOID(int, longArg, toInt32(info[0]));
4204 imp->enabledAtRuntimeMethod(longArg); 4341 imp->enabledAtRuntimeMethod(longArg);
4205 } 4342 }
4206 4343
4207 static void enabledAtRuntimeMethodMethodCallback(const v8::FunctionCallbackInfo< v8::Value>& info) 4344 static void enabledAtRuntimeMethodMethodCallback(const v8::FunctionCallbackInfo< v8::Value>& info)
4208 { 4345 {
4209 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4346 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4210 TestObjV8Internal::enabledAtRuntimeMethodMethod(info); 4347 TestObjV8Internal::enabledAtRuntimeMethodMethod(info);
4211 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4348 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4212 } 4349 }
4213 4350
4214 static void enabledPerContextMethodMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info) 4351 static void enabledPerContextMethodMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info)
4215 { 4352 {
4353 ExceptionState exceptionState(ExceptionState::ExecutionContext, "enabledPerC ontextMethod", "TestObject", info.Holder(), info.GetIsolate());
4216 if (UNLIKELY(info.Length() < 1)) { 4354 if (UNLIKELY(info.Length() < 1)) {
4217 throwTypeError(ExceptionMessages::failedToExecute("enabledPerContextMeth od", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), inf o.GetIsolate()); 4355 throwTypeError(ExceptionMessages::failedToExecute("enabledPerContextMeth od", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), inf o.GetIsolate());
4218 return; 4356 return;
4219 } 4357 }
4220 TestObj* imp = V8TestObject::toNative(info.Holder()); 4358 TestObj* imp = V8TestObject::toNative(info.Holder());
4221 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); 4359 V8TRYCATCH_VOID(int, longArg, toInt32(info[0]));
4222 imp->enabledPerContextMethod(longArg); 4360 imp->enabledPerContextMethod(longArg);
4223 } 4361 }
4224 4362
4225 static void enabledPerContextMethodMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info) 4363 static void enabledPerContextMethodMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
4226 { 4364 {
4227 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4365 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4228 TestObjV8Internal::enabledPerContextMethodMethod(info); 4366 TestObjV8Internal::enabledPerContextMethodMethod(info);
4229 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4367 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4230 } 4368 }
4231 4369
4232 static void methodWithUnsignedLongSequenceMethod(const v8::FunctionCallbackInfo< v8::Value>& info) 4370 static void methodWithUnsignedLongSequenceMethod(const v8::FunctionCallbackInfo< v8::Value>& info)
4233 { 4371 {
4372 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithU nsignedLongSequence", "TestObject", info.Holder(), info.GetIsolate());
4234 if (UNLIKELY(info.Length() < 1)) { 4373 if (UNLIKELY(info.Length() < 1)) {
4235 throwTypeError(ExceptionMessages::failedToExecute("methodWithUnsignedLon gSequence", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length() )), info.GetIsolate()); 4374 throwTypeError(ExceptionMessages::failedToExecute("methodWithUnsignedLon gSequence", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length() )), info.GetIsolate());
4236 return; 4375 return;
4237 } 4376 }
4238 TestObj* imp = V8TestObject::toNative(info.Holder()); 4377 TestObj* imp = V8TestObject::toNative(info.Holder());
4239 V8TRYCATCH_VOID(Vector<unsigned>, unsignedLongSequence, toNativeArray<unsign ed>(info[0], 1, info.GetIsolate())); 4378 V8TRYCATCH_VOID(Vector<unsigned>, unsignedLongSequence, toNativeArray<unsign ed>(info[0], 1, info.GetIsolate()));
4240 imp->methodWithUnsignedLongSequence(unsignedLongSequence); 4379 imp->methodWithUnsignedLongSequence(unsignedLongSequence);
4241 } 4380 }
4242 4381
4243 static void methodWithUnsignedLongSequenceMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& info) 4382 static void methodWithUnsignedLongSequenceMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& info)
4244 { 4383 {
4245 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4384 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4246 TestObjV8Internal::methodWithUnsignedLongSequenceMethod(info); 4385 TestObjV8Internal::methodWithUnsignedLongSequenceMethod(info);
4247 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4386 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4248 } 4387 }
4249 4388
4250 static void stringArrayFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 4389 static void stringArrayFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4251 { 4390 {
4391 ExceptionState exceptionState(ExceptionState::ExecutionContext, "stringArray Function", "TestObject", info.Holder(), info.GetIsolate());
4252 if (UNLIKELY(info.Length() < 1)) { 4392 if (UNLIKELY(info.Length() < 1)) {
4253 throwTypeError(ExceptionMessages::failedToExecute("stringArrayFunction", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.Ge tIsolate()); 4393 throwTypeError(ExceptionMessages::failedToExecute("stringArrayFunction", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.Ge tIsolate());
4254 return; 4394 return;
4255 } 4395 }
4256 TestObj* imp = V8TestObject::toNative(info.Holder()); 4396 TestObj* imp = V8TestObject::toNative(info.Holder());
4257 ExceptionState exceptionState(info.Holder(), info.GetIsolate());
4258 V8TRYCATCH_VOID(Vector<String>, values, toNativeArray<String>(info[0], 1, in fo.GetIsolate())); 4397 V8TRYCATCH_VOID(Vector<String>, values, toNativeArray<String>(info[0], 1, in fo.GetIsolate()));
4259 Vector<String> result = imp->stringArrayFunction(values, exceptionState); 4398 Vector<String> result = imp->stringArrayFunction(values, exceptionState);
4260 if (exceptionState.throwIfNeeded()) 4399 if (exceptionState.throwIfNeeded())
4261 return; 4400 return;
4262 v8SetReturnValue(info, v8Array(result, info.GetIsolate())); 4401 v8SetReturnValue(info, v8Array(result, info.GetIsolate()));
4263 } 4402 }
4264 4403
4265 static void stringArrayFunctionMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info) 4404 static void stringArrayFunctionMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info)
4266 { 4405 {
4267 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4406 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4268 TestObjV8Internal::stringArrayFunctionMethod(info); 4407 TestObjV8Internal::stringArrayFunctionMethod(info);
4269 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4408 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4270 } 4409 }
4271 4410
4272 static void domStringListFunctionMethod(const v8::FunctionCallbackInfo<v8::Value >& info) 4411 static void domStringListFunctionMethod(const v8::FunctionCallbackInfo<v8::Value >& info)
4273 { 4412 {
4413 ExceptionState exceptionState(ExceptionState::ExecutionContext, "domStringLi stFunction", "TestObject", info.Holder(), info.GetIsolate());
4274 if (UNLIKELY(info.Length() < 1)) { 4414 if (UNLIKELY(info.Length() < 1)) {
4275 throwTypeError(ExceptionMessages::failedToExecute("domStringListFunction ", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info. GetIsolate()); 4415 throwTypeError(ExceptionMessages::failedToExecute("domStringListFunction ", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info. GetIsolate());
4276 return; 4416 return;
4277 } 4417 }
4278 TestObj* imp = V8TestObject::toNative(info.Holder()); 4418 TestObj* imp = V8TestObject::toNative(info.Holder());
4279 ExceptionState exceptionState(info.Holder(), info.GetIsolate());
4280 V8TRYCATCH_VOID(DOMStringList*, values, V8DOMStringList::hasInstance(info[0] , info.GetIsolate(), worldType(info.GetIsolate())) ? V8DOMStringList::toNative(v 8::Handle<v8::Object>::Cast(info[0])) : 0); 4419 V8TRYCATCH_VOID(DOMStringList*, values, V8DOMStringList::hasInstance(info[0] , info.GetIsolate(), worldType(info.GetIsolate())) ? V8DOMStringList::toNative(v 8::Handle<v8::Object>::Cast(info[0])) : 0);
4281 RefPtr<DOMStringList> result = imp->domStringListFunction(values, exceptionS tate); 4420 RefPtr<DOMStringList> result = imp->domStringListFunction(values, exceptionS tate);
4282 if (exceptionState.throwIfNeeded()) 4421 if (exceptionState.throwIfNeeded())
4283 return; 4422 return;
4284 v8SetReturnValue(info, result.release()); 4423 v8SetReturnValue(info, result.release());
4285 } 4424 }
4286 4425
4287 static void domStringListFunctionMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info) 4426 static void domStringListFunctionMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info)
4288 { 4427 {
4289 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4428 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4290 TestObjV8Internal::domStringListFunctionMethod(info); 4429 TestObjV8Internal::domStringListFunctionMethod(info);
4291 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4430 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4292 } 4431 }
4293 4432
4294 static void getSVGDocumentMethod(const v8::FunctionCallbackInfo<v8::Value>& info ) 4433 static void getSVGDocumentMethod(const v8::FunctionCallbackInfo<v8::Value>& info )
4295 { 4434 {
4435 ExceptionState exceptionState(ExceptionState::ExecutionContext, "getSVGDocum ent", "TestObject", info.Holder(), info.GetIsolate());
4296 TestObj* imp = V8TestObject::toNative(info.Holder()); 4436 TestObj* imp = V8TestObject::toNative(info.Holder());
4297 ExceptionState exceptionState(info.Holder(), info.GetIsolate());
4298 if (!BindingSecurity::shouldAllowAccessToNode(imp->getSVGDocument(exceptionS tate), exceptionState)) { 4437 if (!BindingSecurity::shouldAllowAccessToNode(imp->getSVGDocument(exceptionS tate), exceptionState)) {
4299 v8SetReturnValueNull(info); 4438 v8SetReturnValueNull(info);
4300 exceptionState.throwIfNeeded(); 4439 exceptionState.throwIfNeeded();
4301 return; 4440 return;
4302 } 4441 }
4303 RefPtr<SVGDocument> result = imp->getSVGDocument(exceptionState); 4442 RefPtr<SVGDocument> result = imp->getSVGDocument(exceptionState);
4304 if (exceptionState.throwIfNeeded()) 4443 if (exceptionState.throwIfNeeded())
4305 return; 4444 return;
4306 v8SetReturnValue(info, result.release()); 4445 v8SetReturnValue(info, result.release());
4307 } 4446 }
4308 4447
4309 static void getSVGDocumentMethodCallback(const v8::FunctionCallbackInfo<v8::Valu e>& info) 4448 static void getSVGDocumentMethodCallback(const v8::FunctionCallbackInfo<v8::Valu e>& info)
4310 { 4449 {
4311 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4450 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4312 TestObjV8Internal::getSVGDocumentMethod(info); 4451 TestObjV8Internal::getSVGDocumentMethod(info);
4313 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4452 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4314 } 4453 }
4315 4454
4316 static void convert1Method(const v8::FunctionCallbackInfo<v8::Value>& info) 4455 static void convert1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
4317 { 4456 {
4457 ExceptionState exceptionState(ExceptionState::ExecutionContext, "convert1", "TestObject", info.Holder(), info.GetIsolate());
4318 if (UNLIKELY(info.Length() < 1)) { 4458 if (UNLIKELY(info.Length() < 1)) {
4319 throwTypeError(ExceptionMessages::failedToExecute("convert1", "TestObjec t", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()) ; 4459 throwTypeError(ExceptionMessages::failedToExecute("convert1", "TestObjec t", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()) ;
4320 return; 4460 return;
4321 } 4461 }
4322 TestObj* imp = V8TestObject::toNative(info.Holder()); 4462 TestObj* imp = V8TestObject::toNative(info.Holder());
4323 V8TRYCATCH_VOID(TestNode*, value, V8TestNode::hasInstance(info[0], info.GetI solate(), worldType(info.GetIsolate())) ? V8TestNode::toNative(v8::Handle<v8::Ob ject>::Cast(info[0])) : 0); 4463 V8TRYCATCH_VOID(TestNode*, value, V8TestNode::hasInstance(info[0], info.GetI solate(), worldType(info.GetIsolate())) ? V8TestNode::toNative(v8::Handle<v8::Ob ject>::Cast(info[0])) : 0);
4324 imp->convert1(value); 4464 imp->convert1(value);
4325 } 4465 }
4326 4466
4327 static void convert1MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in fo) 4467 static void convert1MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in fo)
4328 { 4468 {
4329 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4469 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4330 TestObjV8Internal::convert1Method(info); 4470 TestObjV8Internal::convert1Method(info);
4331 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4471 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4332 } 4472 }
4333 4473
4334 static void convert2Method(const v8::FunctionCallbackInfo<v8::Value>& info) 4474 static void convert2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
4335 { 4475 {
4476 ExceptionState exceptionState(ExceptionState::ExecutionContext, "convert2", "TestObject", info.Holder(), info.GetIsolate());
4336 if (UNLIKELY(info.Length() < 1)) { 4477 if (UNLIKELY(info.Length() < 1)) {
4337 throwTypeError(ExceptionMessages::failedToExecute("convert2", "TestObjec t", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()) ; 4478 throwTypeError(ExceptionMessages::failedToExecute("convert2", "TestObjec t", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()) ;
4338 return; 4479 return;
4339 } 4480 }
4340 TestObj* imp = V8TestObject::toNative(info.Holder()); 4481 TestObj* imp = V8TestObject::toNative(info.Holder());
4341 V8TRYCATCH_VOID(TestNode*, value, V8TestNode::hasInstance(info[0], info.GetI solate(), worldType(info.GetIsolate())) ? V8TestNode::toNative(v8::Handle<v8::Ob ject>::Cast(info[0])) : 0); 4482 V8TRYCATCH_VOID(TestNode*, value, V8TestNode::hasInstance(info[0], info.GetI solate(), worldType(info.GetIsolate())) ? V8TestNode::toNative(v8::Handle<v8::Ob ject>::Cast(info[0])) : 0);
4342 imp->convert2(value); 4483 imp->convert2(value);
4343 } 4484 }
4344 4485
4345 static void convert2MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in fo) 4486 static void convert2MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in fo)
4346 { 4487 {
4347 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4488 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4348 TestObjV8Internal::convert2Method(info); 4489 TestObjV8Internal::convert2Method(info);
4349 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4490 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4350 } 4491 }
4351 4492
4352 static void mutablePointFunctionMethod(const v8::FunctionCallbackInfo<v8::Value> & info) 4493 static void mutablePointFunctionMethod(const v8::FunctionCallbackInfo<v8::Value> & info)
4353 { 4494 {
4495 ExceptionState exceptionState(ExceptionState::ExecutionContext, "mutablePoin tFunction", "TestObject", info.Holder(), info.GetIsolate());
4354 TestObj* imp = V8TestObject::toNative(info.Holder()); 4496 TestObj* imp = V8TestObject::toNative(info.Holder());
4355 v8SetReturnValue(info, WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(imp- >mutablePointFunction()))); 4497 v8SetReturnValue(info, WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(imp- >mutablePointFunction())));
4356 } 4498 }
4357 4499
4358 static void mutablePointFunctionMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info) 4500 static void mutablePointFunctionMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info)
4359 { 4501 {
4360 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4502 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4361 TestObjV8Internal::mutablePointFunctionMethod(info); 4503 TestObjV8Internal::mutablePointFunctionMethod(info);
4362 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4504 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4363 } 4505 }
4364 4506
4365 static void immutablePointFunctionMethod(const v8::FunctionCallbackInfo<v8::Valu e>& info) 4507 static void immutablePointFunctionMethod(const v8::FunctionCallbackInfo<v8::Valu e>& info)
4366 { 4508 {
4509 ExceptionState exceptionState(ExceptionState::ExecutionContext, "immutablePo intFunction", "TestObject", info.Holder(), info.GetIsolate());
4367 TestObj* imp = V8TestObject::toNative(info.Holder()); 4510 TestObj* imp = V8TestObject::toNative(info.Holder());
4368 v8SetReturnValue(info, WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(imp- >immutablePointFunction()))); 4511 v8SetReturnValue(info, WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(imp- >immutablePointFunction())));
4369 } 4512 }
4370 4513
4371 static void immutablePointFunctionMethodCallback(const v8::FunctionCallbackInfo< v8::Value>& info) 4514 static void immutablePointFunctionMethodCallback(const v8::FunctionCallbackInfo< v8::Value>& info)
4372 { 4515 {
4373 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4516 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4374 TestObjV8Internal::immutablePointFunctionMethod(info); 4517 TestObjV8Internal::immutablePointFunctionMethod(info);
4375 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4518 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4376 } 4519 }
4377 4520
4378 static void svgPointMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info ) 4521 static void svgPointMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info )
4379 { 4522 {
4523 ExceptionState exceptionState(ExceptionState::ExecutionContext, "svgPointMet hod", "TestObject", info.Holder(), info.GetIsolate());
4380 if (UNLIKELY(info.Length() < 2)) { 4524 if (UNLIKELY(info.Length() < 2)) {
4381 throwTypeError(ExceptionMessages::failedToExecute("svgPointMethod", "Tes tObject", ExceptionMessages::notEnoughArguments(2, info.Length())), info.GetIsol ate()); 4525 throwTypeError(ExceptionMessages::failedToExecute("svgPointMethod", "Tes tObject", ExceptionMessages::notEnoughArguments(2, info.Length())), info.GetIsol ate());
4382 return; 4526 return;
4383 } 4527 }
4384 TestObj* imp = V8TestObject::toNative(info.Holder()); 4528 TestObj* imp = V8TestObject::toNative(info.Holder());
4385 V8TRYCATCH_VOID(RefPtr<SVGPropertyTearOff<SVGPoint> >, item, V8SVGPoint::has Instance(info[0], info.GetIsolate(), worldType(info.GetIsolate())) ? V8SVGPoint: :toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0); 4529 V8TRYCATCH_VOID(RefPtr<SVGPropertyTearOff<SVGPoint> >, item, V8SVGPoint::has Instance(info[0], info.GetIsolate(), worldType(info.GetIsolate())) ? V8SVGPoint: :toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0);
4386 V8TRYCATCH_VOID(unsigned, index, toUInt32(info[1])); 4530 V8TRYCATCH_VOID(unsigned, index, toUInt32(info[1]));
4387 if (!item) { 4531 if (!item) {
4388 throwTypeError(ExceptionMessages::failedToExecute("svgPointMethod", "Tes tObject", "parameter 1 is not of type 'SVGPoint'."), info.GetIsolate()); 4532 throwTypeError(ExceptionMessages::failedToExecute("svgPointMethod", "Tes tObject", "parameter 1 is not of type 'SVGPoint'."), info.GetIsolate());
4389 return; 4533 return;
4390 } 4534 }
4391 v8SetReturnValue(info, WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(imp- >svgPointMethod(item->propertyReference(), index)))); 4535 v8SetReturnValue(info, WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(imp- >svgPointMethod(item->propertyReference(), index))));
4392 } 4536 }
4393 4537
4394 static void svgPointMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Valu e>& info) 4538 static void svgPointMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Valu e>& info)
4395 { 4539 {
4396 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4540 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4397 TestObjV8Internal::svgPointMethodMethod(info); 4541 TestObjV8Internal::svgPointMethodMethod(info);
4398 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4542 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4399 } 4543 }
4400 4544
4401 static void strictSVGPointMethodMethod(const v8::FunctionCallbackInfo<v8::Value> & info) 4545 static void strictSVGPointMethodMethod(const v8::FunctionCallbackInfo<v8::Value> & info)
4402 { 4546 {
4547 ExceptionState exceptionState(ExceptionState::ExecutionContext, "strictSVGPo intMethod", "TestObject", info.Holder(), info.GetIsolate());
4403 if (UNLIKELY(info.Length() < 2)) { 4548 if (UNLIKELY(info.Length() < 2)) {
4404 throwTypeError(ExceptionMessages::failedToExecute("strictSVGPointMethod" , "TestObject", ExceptionMessages::notEnoughArguments(2, info.Length())), info.G etIsolate()); 4549 throwTypeError(ExceptionMessages::failedToExecute("strictSVGPointMethod" , "TestObject", ExceptionMessages::notEnoughArguments(2, info.Length())), info.G etIsolate());
4405 return; 4550 return;
4406 } 4551 }
4407 TestObj* imp = V8TestObject::toNative(info.Holder()); 4552 TestObj* imp = V8TestObject::toNative(info.Holder());
4408 ExceptionState exceptionState(info.Holder(), info.GetIsolate());
4409 if (info.Length() > 0 && !isUndefinedOrNull(info[0]) && !V8SVGPoint::hasInst ance(info[0], info.GetIsolate(), worldType(info.GetIsolate()))) { 4553 if (info.Length() > 0 && !isUndefinedOrNull(info[0]) && !V8SVGPoint::hasInst ance(info[0], info.GetIsolate(), worldType(info.GetIsolate()))) {
4410 throwTypeError(ExceptionMessages::failedToExecute("strictSVGPointMethod" , "TestObject", "parameter 1 is not of type 'SVGPoint'."), info.GetIsolate()); 4554 throwTypeError(ExceptionMessages::failedToExecute("strictSVGPointMethod" , "TestObject", "parameter 1 is not of type 'SVGPoint'."), info.GetIsolate());
4411 return; 4555 return;
4412 } 4556 }
4413 V8TRYCATCH_VOID(RefPtr<SVGPropertyTearOff<SVGPoint> >, item, V8SVGPoint::has Instance(info[0], info.GetIsolate(), worldType(info.GetIsolate())) ? V8SVGPoint: :toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0); 4557 V8TRYCATCH_VOID(RefPtr<SVGPropertyTearOff<SVGPoint> >, item, V8SVGPoint::has Instance(info[0], info.GetIsolate(), worldType(info.GetIsolate())) ? V8SVGPoint: :toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0);
4414 V8TRYCATCH_VOID(unsigned, index, toUInt32(info[1])); 4558 V8TRYCATCH_VOID(unsigned, index, toUInt32(info[1]));
4415 if (!item) { 4559 if (!item) {
4416 throwTypeError(ExceptionMessages::failedToExecute("strictSVGPointMethod" , "TestObject", "parameter 1 is not of type 'SVGPoint'."), info.GetIsolate()); 4560 throwTypeError(ExceptionMessages::failedToExecute("strictSVGPointMethod" , "TestObject", "parameter 1 is not of type 'SVGPoint'."), info.GetIsolate());
4417 return; 4561 return;
4418 } 4562 }
4419 SVGPoint result = imp->strictSVGPointMethod(item->propertyReference(), index , exceptionState); 4563 SVGPoint result = imp->strictSVGPointMethod(item->propertyReference(), index , exceptionState);
4420 if (exceptionState.throwIfNeeded()) 4564 if (exceptionState.throwIfNeeded())
4421 return; 4565 return;
4422 v8SetReturnValue(info, WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(resu lt))); 4566 v8SetReturnValue(info, WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(resu lt)));
4423 } 4567 }
4424 4568
4425 static void strictSVGPointMethodMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info) 4569 static void strictSVGPointMethodMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info)
4426 { 4570 {
4427 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4571 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4428 TestObjV8Internal::strictSVGPointMethodMethod(info); 4572 TestObjV8Internal::strictSVGPointMethodMethod(info);
4429 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4573 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4430 } 4574 }
4431 4575
4432 static void orangeMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 4576 static void orangeMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4433 { 4577 {
4578 ExceptionState exceptionState(ExceptionState::ExecutionContext, "orange", "T estObject", info.Holder(), info.GetIsolate());
4434 TestObj* imp = V8TestObject::toNative(info.Holder()); 4579 TestObj* imp = V8TestObject::toNative(info.Holder());
4435 imp->banana(); 4580 imp->banana();
4436 } 4581 }
4437 4582
4438 static void orangeMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info ) 4583 static void orangeMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info )
4439 { 4584 {
4440 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4585 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4441 TestObjV8Internal::orangeMethod(info); 4586 TestObjV8Internal::orangeMethod(info);
4442 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4587 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4443 } 4588 }
4444 4589
4445 static void strictFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>& info ) 4590 static void strictFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>& info )
4446 { 4591 {
4592 ExceptionState exceptionState(ExceptionState::ExecutionContext, "strictFunct ion", "TestObject", info.Holder(), info.GetIsolate());
4447 if (UNLIKELY(info.Length() < 3)) { 4593 if (UNLIKELY(info.Length() < 3)) {
4448 throwTypeError(ExceptionMessages::failedToExecute("strictFunction", "Tes tObject", ExceptionMessages::notEnoughArguments(3, info.Length())), info.GetIsol ate()); 4594 throwTypeError(ExceptionMessages::failedToExecute("strictFunction", "Tes tObject", ExceptionMessages::notEnoughArguments(3, info.Length())), info.GetIsol ate());
4449 return; 4595 return;
4450 } 4596 }
4451 TestObj* imp = V8TestObject::toNative(info.Holder()); 4597 TestObj* imp = V8TestObject::toNative(info.Holder());
4452 ExceptionState exceptionState(info.Holder(), info.GetIsolate());
4453 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str, info[0]); 4598 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str, info[0]);
4454 V8TRYCATCH_VOID(float, a, static_cast<float>(info[1]->NumberValue())); 4599 V8TRYCATCH_VOID(float, a, static_cast<float>(info[1]->NumberValue()));
4455 V8TRYCATCH_VOID(int, b, toInt32(info[2])); 4600 V8TRYCATCH_VOID(int, b, toInt32(info[2]));
4456 bool result = imp->strictFunction(str, a, b, exceptionState); 4601 bool result = imp->strictFunction(str, a, b, exceptionState);
4457 if (exceptionState.throwIfNeeded()) 4602 if (exceptionState.throwIfNeeded())
4458 return; 4603 return;
4459 v8SetReturnValueBool(info, result); 4604 v8SetReturnValueBool(info, result);
4460 } 4605 }
4461 4606
4462 static void strictFunctionMethodCallback(const v8::FunctionCallbackInfo<v8::Valu e>& info) 4607 static void strictFunctionMethodCallback(const v8::FunctionCallbackInfo<v8::Valu e>& info)
4463 { 4608 {
4464 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4609 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4465 TestObjV8Internal::strictFunctionMethod(info); 4610 TestObjV8Internal::strictFunctionMethod(info);
4466 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4611 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4467 } 4612 }
4468 4613
4469 static void variadicStringMethodMethod(const v8::FunctionCallbackInfo<v8::Value> & info) 4614 static void variadicStringMethodMethod(const v8::FunctionCallbackInfo<v8::Value> & info)
4470 { 4615 {
4616 ExceptionState exceptionState(ExceptionState::ExecutionContext, "variadicStr ingMethod", "TestObject", info.Holder(), info.GetIsolate());
4471 if (UNLIKELY(info.Length() < 1)) { 4617 if (UNLIKELY(info.Length() < 1)) {
4472 throwTypeError(ExceptionMessages::failedToExecute("variadicStringMethod" , "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.G etIsolate()); 4618 throwTypeError(ExceptionMessages::failedToExecute("variadicStringMethod" , "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.G etIsolate());
4473 return; 4619 return;
4474 } 4620 }
4475 TestObj* imp = V8TestObject::toNative(info.Holder()); 4621 TestObj* imp = V8TestObject::toNative(info.Holder());
4476 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, head, info[0]); 4622 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, head, info[0]);
4477 V8TRYCATCH_VOID(Vector<String>, tail, toNativeArguments<String>(info, 1)); 4623 V8TRYCATCH_VOID(Vector<String>, tail, toNativeArguments<String>(info, 1));
4478 imp->variadicStringMethod(head, tail); 4624 imp->variadicStringMethod(head, tail);
4479 } 4625 }
4480 4626
4481 static void variadicStringMethodMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info) 4627 static void variadicStringMethodMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info)
4482 { 4628 {
4483 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4629 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4484 TestObjV8Internal::variadicStringMethodMethod(info); 4630 TestObjV8Internal::variadicStringMethodMethod(info);
4485 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4631 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4486 } 4632 }
4487 4633
4488 static void variadicDoubleMethodMethod(const v8::FunctionCallbackInfo<v8::Value> & info) 4634 static void variadicDoubleMethodMethod(const v8::FunctionCallbackInfo<v8::Value> & info)
4489 { 4635 {
4636 ExceptionState exceptionState(ExceptionState::ExecutionContext, "variadicDou bleMethod", "TestObject", info.Holder(), info.GetIsolate());
4490 if (UNLIKELY(info.Length() < 1)) { 4637 if (UNLIKELY(info.Length() < 1)) {
4491 throwTypeError(ExceptionMessages::failedToExecute("variadicDoubleMethod" , "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.G etIsolate()); 4638 throwTypeError(ExceptionMessages::failedToExecute("variadicDoubleMethod" , "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.G etIsolate());
4492 return; 4639 return;
4493 } 4640 }
4494 TestObj* imp = V8TestObject::toNative(info.Holder()); 4641 TestObj* imp = V8TestObject::toNative(info.Holder());
4495 V8TRYCATCH_VOID(double, head, static_cast<double>(info[0]->NumberValue())); 4642 V8TRYCATCH_VOID(double, head, static_cast<double>(info[0]->NumberValue()));
4496 V8TRYCATCH_VOID(Vector<double>, tail, toNativeArguments<double>(info, 1)); 4643 V8TRYCATCH_VOID(Vector<double>, tail, toNativeArguments<double>(info, 1));
4497 imp->variadicDoubleMethod(head, tail); 4644 imp->variadicDoubleMethod(head, tail);
4498 } 4645 }
4499 4646
4500 static void variadicDoubleMethodMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info) 4647 static void variadicDoubleMethodMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info)
4501 { 4648 {
4502 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4649 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4503 TestObjV8Internal::variadicDoubleMethodMethod(info); 4650 TestObjV8Internal::variadicDoubleMethodMethod(info);
4504 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4651 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4505 } 4652 }
4506 4653
4507 static void variadicNodeMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 4654 static void variadicNodeMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4508 { 4655 {
4656 ExceptionState exceptionState(ExceptionState::ExecutionContext, "variadicNod eMethod", "TestObject", info.Holder(), info.GetIsolate());
4509 if (UNLIKELY(info.Length() < 1)) { 4657 if (UNLIKELY(info.Length() < 1)) {
4510 throwTypeError(ExceptionMessages::failedToExecute("variadicNodeMethod", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.Get Isolate()); 4658 throwTypeError(ExceptionMessages::failedToExecute("variadicNodeMethod", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.Get Isolate());
4511 return; 4659 return;
4512 } 4660 }
4513 TestObj* imp = V8TestObject::toNative(info.Holder()); 4661 TestObj* imp = V8TestObject::toNative(info.Holder());
4514 V8TRYCATCH_VOID(Node*, head, V8Node::hasInstance(info[0], info.GetIsolate(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(i nfo[0])) : 0); 4662 V8TRYCATCH_VOID(Node*, head, V8Node::hasInstance(info[0], info.GetIsolate(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(i nfo[0])) : 0);
4515 Vector<RefPtr<Node> > tail; 4663 Vector<RefPtr<Node> > tail;
4516 for (int i = 1; i < info.Length(); ++i) { 4664 for (int i = 1; i < info.Length(); ++i) {
4517 if (!V8Node::hasInstance(info[i], info.GetIsolate(), worldType(info.GetI solate()))) { 4665 if (!V8Node::hasInstance(info[i], info.GetIsolate(), worldType(info.GetI solate()))) {
4518 throwTypeError(ExceptionMessages::failedToExecute("variadicNodeMetho d", "TestObject", "parameter 2 is not of type 'Node'."), info.GetIsolate()); 4666 throwTypeError(ExceptionMessages::failedToExecute("variadicNodeMetho d", "TestObject", "parameter 2 is not of type 'Node'."), info.GetIsolate());
4519 return; 4667 return;
4520 } 4668 }
4521 tail.append(V8Node::toNative(v8::Handle<v8::Object>::Cast(info[i]))); 4669 tail.append(V8Node::toNative(v8::Handle<v8::Object>::Cast(info[i])));
4522 } 4670 }
4523 imp->variadicNodeMethod(head, tail); 4671 imp->variadicNodeMethod(head, tail);
4524 } 4672 }
4525 4673
4526 static void variadicNodeMethodMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info) 4674 static void variadicNodeMethodMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info)
4527 { 4675 {
4528 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4676 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4529 TestObjV8Internal::variadicNodeMethodMethod(info); 4677 TestObjV8Internal::variadicNodeMethodMethod(info);
4530 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4678 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4531 } 4679 }
4532 4680
4533 static void methodWithNullableArgumentsMethod(const v8::FunctionCallbackInfo<v8: :Value>& info) 4681 static void methodWithNullableArgumentsMethod(const v8::FunctionCallbackInfo<v8: :Value>& info)
4534 { 4682 {
4683 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithN ullableArguments", "TestObject", info.Holder(), info.GetIsolate());
4535 if (UNLIKELY(info.Length() < 3)) { 4684 if (UNLIKELY(info.Length() < 3)) {
4536 throwTypeError(ExceptionMessages::failedToExecute("methodWithNullableArg uments", "TestObject", ExceptionMessages::notEnoughArguments(3, info.Length())), info.GetIsolate()); 4685 throwTypeError(ExceptionMessages::failedToExecute("methodWithNullableArg uments", "TestObject", ExceptionMessages::notEnoughArguments(3, info.Length())), info.GetIsolate());
4537 return; 4686 return;
4538 } 4687 }
4539 TestObj* imp = V8TestObject::toNative(info.Holder()); 4688 TestObj* imp = V8TestObject::toNative(info.Holder());
4540 bool strIsNull = info[0]->IsNull(); 4689 bool strIsNull = info[0]->IsNull();
4541 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strStringResource, info[0]); 4690 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strStringResource, info[0]);
4542 String str = strStringResource; 4691 String str = strStringResource;
4543 bool lIsNull = info[1]->IsNull(); 4692 bool lIsNull = info[1]->IsNull();
4544 V8TRYCATCH_VOID(int, l, toInt32(info[1])); 4693 V8TRYCATCH_VOID(int, l, toInt32(info[1]));
4545 V8TRYCATCH_VOID(TestObj*, obj, V8TestObject::hasInstance(info[2], info.GetIs olate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::O bject>::Cast(info[2])) : 0); 4694 V8TRYCATCH_VOID(TestObj*, obj, V8TestObject::hasInstance(info[2], info.GetIs olate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::O bject>::Cast(info[2])) : 0);
4546 if (UNLIKELY(info.Length() <= 3)) { 4695 if (UNLIKELY(info.Length() <= 3)) {
4547 imp->methodWithNullableArguments(strIsNull ? 0 : &str, lIsNull ? 0 : &l, obj); 4696 imp->methodWithNullableArguments(strIsNull ? 0 : &str, lIsNull ? 0 : &l, obj);
4548 return; 4697 return;
4549 } 4698 }
4550 bool dIsNull = info[3]->IsNull(); 4699 bool dIsNull = info[3]->IsNull();
4551 V8TRYCATCH_VOID(double, d, static_cast<double>(info[3]->NumberValue())); 4700 V8TRYCATCH_VOID(double, d, static_cast<double>(info[3]->NumberValue()));
4552 imp->methodWithNullableArguments(strIsNull ? 0 : &str, lIsNull ? 0 : &l, obj , dIsNull ? 0 : &d); 4701 imp->methodWithNullableArguments(strIsNull ? 0 : &str, lIsNull ? 0 : &l, obj , dIsNull ? 0 : &d);
4553 } 4702 }
4554 4703
4555 static void methodWithNullableArgumentsMethodCallback(const v8::FunctionCallback Info<v8::Value>& info) 4704 static void methodWithNullableArgumentsMethodCallback(const v8::FunctionCallback Info<v8::Value>& info)
4556 { 4705 {
4557 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4706 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4558 TestObjV8Internal::methodWithNullableArgumentsMethod(info); 4707 TestObjV8Internal::methodWithNullableArgumentsMethod(info);
4559 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4708 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4560 } 4709 }
4561 4710
4562 static void perWorldMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info ) 4711 static void perWorldMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info )
4563 { 4712 {
4713 ExceptionState exceptionState(ExceptionState::ExecutionContext, "perWorldMet hod", "TestObject", info.Holder(), info.GetIsolate());
4564 TestObj* imp = V8TestObject::toNative(info.Holder()); 4714 TestObj* imp = V8TestObject::toNative(info.Holder());
4565 imp->perWorldMethod(); 4715 imp->perWorldMethod();
4566 } 4716 }
4567 4717
4568 static void perWorldMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Valu e>& info) 4718 static void perWorldMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Valu e>& info)
4569 { 4719 {
4570 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4720 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4571 TestObjV8Internal::perWorldMethodMethod(info); 4721 TestObjV8Internal::perWorldMethodMethod(info);
4572 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4722 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4573 } 4723 }
4574 4724
4575 static void perWorldMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8:: Value>& info) 4725 static void perWorldMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8:: Value>& info)
4576 { 4726 {
4727 ExceptionState exceptionState(ExceptionState::ExecutionContext, "perWorldMet hod", "TestObject", info.Holder(), info.GetIsolate());
4577 TestObj* imp = V8TestObject::toNative(info.Holder()); 4728 TestObj* imp = V8TestObject::toNative(info.Holder());
4578 imp->perWorldMethod(); 4729 imp->perWorldMethod();
4579 } 4730 }
4580 4731
4581 static void perWorldMethodMethodCallbackForMainWorld(const v8::FunctionCallbackI nfo<v8::Value>& info) 4732 static void perWorldMethodMethodCallbackForMainWorld(const v8::FunctionCallbackI nfo<v8::Value>& info)
4582 { 4733 {
4583 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4734 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4584 TestObjV8Internal::perWorldMethodMethodForMainWorld(info); 4735 TestObjV8Internal::perWorldMethodMethodForMainWorld(info);
4585 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4736 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4586 } 4737 }
4587 4738
4588 static void overloadedPerWorldMethod1Method(const v8::FunctionCallbackInfo<v8::V alue>& info) 4739 static void overloadedPerWorldMethod1Method(const v8::FunctionCallbackInfo<v8::V alue>& info)
4589 { 4740 {
4741 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP erWorldMethod", "TestObject", info.Holder(), info.GetIsolate());
4590 if (UNLIKELY(info.Length() < 1)) { 4742 if (UNLIKELY(info.Length() < 1)) {
4591 throwTypeError(ExceptionMessages::failedToExecute("overloadedPerWorldMet hod", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), in fo.GetIsolate()); 4743 throwTypeError(ExceptionMessages::failedToExecute("overloadedPerWorldMet hod", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), in fo.GetIsolate());
4592 return; 4744 return;
4593 } 4745 }
4594 TestObj* imp = V8TestObject::toNative(info.Holder()); 4746 TestObj* imp = V8TestObject::toNative(info.Holder());
4595 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); 4747 V8TRYCATCH_VOID(int, longArg, toInt32(info[0]));
4596 imp->overloadedPerWorldMethod(longArg); 4748 imp->overloadedPerWorldMethod(longArg);
4597 } 4749 }
4598 4750
4599 static void overloadedPerWorldMethod1MethodForMainWorld(const v8::FunctionCallba ckInfo<v8::Value>& info) 4751 static void overloadedPerWorldMethod1MethodForMainWorld(const v8::FunctionCallba ckInfo<v8::Value>& info)
4600 { 4752 {
4753 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP erWorldMethod", "TestObject", info.Holder(), info.GetIsolate());
4601 if (UNLIKELY(info.Length() < 1)) { 4754 if (UNLIKELY(info.Length() < 1)) {
4602 throwTypeError(ExceptionMessages::failedToExecute("overloadedPerWorldMet hod", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), in fo.GetIsolate()); 4755 throwTypeError(ExceptionMessages::failedToExecute("overloadedPerWorldMet hod", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), in fo.GetIsolate());
4603 return; 4756 return;
4604 } 4757 }
4605 TestObj* imp = V8TestObject::toNative(info.Holder()); 4758 TestObj* imp = V8TestObject::toNative(info.Holder());
4606 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); 4759 V8TRYCATCH_VOID(int, longArg, toInt32(info[0]));
4607 imp->overloadedPerWorldMethod(longArg); 4760 imp->overloadedPerWorldMethod(longArg);
4608 } 4761 }
4609 4762
4610 static void overloadedPerWorldMethod2Method(const v8::FunctionCallbackInfo<v8::V alue>& info) 4763 static void overloadedPerWorldMethod2Method(const v8::FunctionCallbackInfo<v8::V alue>& info)
4611 { 4764 {
4765 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP erWorldMethod", "TestObject", info.Holder(), info.GetIsolate());
4612 if (UNLIKELY(info.Length() < 2)) { 4766 if (UNLIKELY(info.Length() < 2)) {
4613 throwTypeError(ExceptionMessages::failedToExecute("overloadedPerWorldMet hod", "TestObject", ExceptionMessages::notEnoughArguments(2, info.Length())), in fo.GetIsolate()); 4767 throwTypeError(ExceptionMessages::failedToExecute("overloadedPerWorldMet hod", "TestObject", ExceptionMessages::notEnoughArguments(2, info.Length())), in fo.GetIsolate());
4614 return; 4768 return;
4615 } 4769 }
4616 TestObj* imp = V8TestObject::toNative(info.Holder()); 4770 TestObj* imp = V8TestObject::toNative(info.Holder());
4617 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); 4771 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]);
4618 V8TRYCATCH_VOID(int, longArg, toInt32(info[1])); 4772 V8TRYCATCH_VOID(int, longArg, toInt32(info[1]));
4619 imp->overloadedPerWorldMethod(strArg, longArg); 4773 imp->overloadedPerWorldMethod(strArg, longArg);
4620 } 4774 }
4621 4775
(...skipping 16 matching lines...) Expand all
4638 4792
4639 static void overloadedPerWorldMethodMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info) 4793 static void overloadedPerWorldMethodMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info)
4640 { 4794 {
4641 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4795 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4642 TestObjV8Internal::overloadedPerWorldMethodMethod(info); 4796 TestObjV8Internal::overloadedPerWorldMethodMethod(info);
4643 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4797 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4644 } 4798 }
4645 4799
4646 static void overloadedPerWorldMethod2MethodForMainWorld(const v8::FunctionCallba ckInfo<v8::Value>& info) 4800 static void overloadedPerWorldMethod2MethodForMainWorld(const v8::FunctionCallba ckInfo<v8::Value>& info)
4647 { 4801 {
4802 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP erWorldMethod", "TestObject", info.Holder(), info.GetIsolate());
4648 if (UNLIKELY(info.Length() < 2)) { 4803 if (UNLIKELY(info.Length() < 2)) {
4649 throwTypeError(ExceptionMessages::failedToExecute("overloadedPerWorldMet hod", "TestObject", ExceptionMessages::notEnoughArguments(2, info.Length())), in fo.GetIsolate()); 4804 throwTypeError(ExceptionMessages::failedToExecute("overloadedPerWorldMet hod", "TestObject", ExceptionMessages::notEnoughArguments(2, info.Length())), in fo.GetIsolate());
4650 return; 4805 return;
4651 } 4806 }
4652 TestObj* imp = V8TestObject::toNative(info.Holder()); 4807 TestObj* imp = V8TestObject::toNative(info.Holder());
4653 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); 4808 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]);
4654 V8TRYCATCH_VOID(int, longArg, toInt32(info[1])); 4809 V8TRYCATCH_VOID(int, longArg, toInt32(info[1]));
4655 imp->overloadedPerWorldMethod(strArg, longArg); 4810 imp->overloadedPerWorldMethod(strArg, longArg);
4656 } 4811 }
4657 4812
(...skipping 16 matching lines...) Expand all
4674 4829
4675 static void overloadedPerWorldMethodMethodCallbackForMainWorld(const v8::Functio nCallbackInfo<v8::Value>& info) 4830 static void overloadedPerWorldMethodMethodCallbackForMainWorld(const v8::Functio nCallbackInfo<v8::Value>& info)
4676 { 4831 {
4677 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4832 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4678 TestObjV8Internal::overloadedPerWorldMethodMethodForMainWorld(info); 4833 TestObjV8Internal::overloadedPerWorldMethodMethodForMainWorld(info);
4679 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4834 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4680 } 4835 }
4681 4836
4682 static void activityLoggedMethod1Method(const v8::FunctionCallbackInfo<v8::Value >& info) 4837 static void activityLoggedMethod1Method(const v8::FunctionCallbackInfo<v8::Value >& info)
4683 { 4838 {
4839 ExceptionState exceptionState(ExceptionState::ExecutionContext, "activityLog gedMethod1", "TestObject", info.Holder(), info.GetIsolate());
4684 if (UNLIKELY(info.Length() < 1)) { 4840 if (UNLIKELY(info.Length() < 1)) {
4685 throwTypeError(ExceptionMessages::failedToExecute("activityLoggedMethod1 ", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info. GetIsolate()); 4841 throwTypeError(ExceptionMessages::failedToExecute("activityLoggedMethod1 ", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info. GetIsolate());
4686 return; 4842 return;
4687 } 4843 }
4688 TestObj* imp = V8TestObject::toNative(info.Holder()); 4844 TestObj* imp = V8TestObject::toNative(info.Holder());
4689 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); 4845 V8TRYCATCH_VOID(int, longArg, toInt32(info[0]));
4690 imp->activityLoggedMethod1(longArg); 4846 imp->activityLoggedMethod1(longArg);
4691 } 4847 }
4692 4848
4693 static void activityLoggedMethod1MethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info) 4849 static void activityLoggedMethod1MethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info)
4694 { 4850 {
4695 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4851 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4696 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 4852 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
4697 if (contextData && contextData->activityLogger()) { 4853 if (contextData && contextData->activityLogger()) {
4698 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle <v8::Value> >(info, 0); 4854 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle <v8::Value> >(info, 0);
4699 contextData->activityLogger()->log("TestObject.activityLoggedMethod1", i nfo.Length(), loggerArgs.data(), "Method"); 4855 contextData->activityLogger()->log("TestObject.activityLoggedMethod1", i nfo.Length(), loggerArgs.data(), "Method");
4700 } 4856 }
4701 TestObjV8Internal::activityLoggedMethod1Method(info); 4857 TestObjV8Internal::activityLoggedMethod1Method(info);
4702 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4858 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4703 } 4859 }
4704 4860
4705 static void activityLoggedMethod2Method(const v8::FunctionCallbackInfo<v8::Value >& info) 4861 static void activityLoggedMethod2Method(const v8::FunctionCallbackInfo<v8::Value >& info)
4706 { 4862 {
4863 ExceptionState exceptionState(ExceptionState::ExecutionContext, "activityLog gedMethod2", "TestObject", info.Holder(), info.GetIsolate());
4707 if (UNLIKELY(info.Length() < 1)) { 4864 if (UNLIKELY(info.Length() < 1)) {
4708 throwTypeError(ExceptionMessages::failedToExecute("activityLoggedMethod2 ", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info. GetIsolate()); 4865 throwTypeError(ExceptionMessages::failedToExecute("activityLoggedMethod2 ", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info. GetIsolate());
4709 return; 4866 return;
4710 } 4867 }
4711 TestObj* imp = V8TestObject::toNative(info.Holder()); 4868 TestObj* imp = V8TestObject::toNative(info.Holder());
4712 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); 4869 V8TRYCATCH_VOID(int, longArg, toInt32(info[0]));
4713 imp->activityLoggedMethod2(longArg); 4870 imp->activityLoggedMethod2(longArg);
4714 } 4871 }
4715 4872
4716 static void activityLoggedMethod2MethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info) 4873 static void activityLoggedMethod2MethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info)
4717 { 4874 {
4718 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4875 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4719 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 4876 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
4720 if (contextData && contextData->activityLogger()) { 4877 if (contextData && contextData->activityLogger()) {
4721 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle <v8::Value> >(info, 0); 4878 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle <v8::Value> >(info, 0);
4722 contextData->activityLogger()->log("TestObject.activityLoggedMethod2", i nfo.Length(), loggerArgs.data(), "Method"); 4879 contextData->activityLogger()->log("TestObject.activityLoggedMethod2", i nfo.Length(), loggerArgs.data(), "Method");
4723 } 4880 }
4724 TestObjV8Internal::activityLoggedMethod2Method(info); 4881 TestObjV8Internal::activityLoggedMethod2Method(info);
4725 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4882 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4726 } 4883 }
4727 4884
4728 static void activityLoggedMethod2MethodForMainWorld(const v8::FunctionCallbackIn fo<v8::Value>& info) 4885 static void activityLoggedMethod2MethodForMainWorld(const v8::FunctionCallbackIn fo<v8::Value>& info)
4729 { 4886 {
4887 ExceptionState exceptionState(ExceptionState::ExecutionContext, "activityLog gedMethod2", "TestObject", info.Holder(), info.GetIsolate());
4730 if (UNLIKELY(info.Length() < 1)) { 4888 if (UNLIKELY(info.Length() < 1)) {
4731 throwTypeError(ExceptionMessages::failedToExecute("activityLoggedMethod2 ", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info. GetIsolate()); 4889 throwTypeError(ExceptionMessages::failedToExecute("activityLoggedMethod2 ", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info. GetIsolate());
4732 return; 4890 return;
4733 } 4891 }
4734 TestObj* imp = V8TestObject::toNative(info.Holder()); 4892 TestObj* imp = V8TestObject::toNative(info.Holder());
4735 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); 4893 V8TRYCATCH_VOID(int, longArg, toInt32(info[0]));
4736 imp->activityLoggedMethod2(longArg); 4894 imp->activityLoggedMethod2(longArg);
4737 } 4895 }
4738 4896
4739 static void activityLoggedMethod2MethodCallbackForMainWorld(const v8::FunctionCa llbackInfo<v8::Value>& info) 4897 static void activityLoggedMethod2MethodCallbackForMainWorld(const v8::FunctionCa llbackInfo<v8::Value>& info)
4740 { 4898 {
4741 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4899 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4742 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 4900 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
4743 if (contextData && contextData->activityLogger()) { 4901 if (contextData && contextData->activityLogger()) {
4744 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle <v8::Value> >(info, 0); 4902 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle <v8::Value> >(info, 0);
4745 contextData->activityLogger()->log("TestObject.activityLoggedMethod2", i nfo.Length(), loggerArgs.data(), "Method"); 4903 contextData->activityLogger()->log("TestObject.activityLoggedMethod2", i nfo.Length(), loggerArgs.data(), "Method");
4746 } 4904 }
4747 TestObjV8Internal::activityLoggedMethod2MethodForMainWorld(info); 4905 TestObjV8Internal::activityLoggedMethod2MethodForMainWorld(info);
4748 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4906 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4749 } 4907 }
4750 4908
4751 static void activityLoggedInIsolatedWorldMethodMethod(const v8::FunctionCallback Info<v8::Value>& info) 4909 static void activityLoggedInIsolatedWorldMethodMethod(const v8::FunctionCallback Info<v8::Value>& info)
4752 { 4910 {
4911 ExceptionState exceptionState(ExceptionState::ExecutionContext, "activityLog gedInIsolatedWorldMethod", "TestObject", info.Holder(), info.GetIsolate());
4753 if (UNLIKELY(info.Length() < 1)) { 4912 if (UNLIKELY(info.Length() < 1)) {
4754 throwTypeError(ExceptionMessages::failedToExecute("activityLoggedInIsola tedWorldMethod", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Len gth())), info.GetIsolate()); 4913 throwTypeError(ExceptionMessages::failedToExecute("activityLoggedInIsola tedWorldMethod", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Len gth())), info.GetIsolate());
4755 return; 4914 return;
4756 } 4915 }
4757 TestObj* imp = V8TestObject::toNative(info.Holder()); 4916 TestObj* imp = V8TestObject::toNative(info.Holder());
4758 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); 4917 V8TRYCATCH_VOID(int, longArg, toInt32(info[0]));
4759 imp->activityLoggedInIsolatedWorldMethod(longArg); 4918 imp->activityLoggedInIsolatedWorldMethod(longArg);
4760 } 4919 }
4761 4920
4762 static void activityLoggedInIsolatedWorldMethodMethodCallback(const v8::Function CallbackInfo<v8::Value>& info) 4921 static void activityLoggedInIsolatedWorldMethodMethodCallback(const v8::Function CallbackInfo<v8::Value>& info)
4763 { 4922 {
4764 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4923 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4765 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 4924 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
4766 if (contextData && contextData->activityLogger()) { 4925 if (contextData && contextData->activityLogger()) {
4767 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle <v8::Value> >(info, 0); 4926 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle <v8::Value> >(info, 0);
4768 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW orldMethod", info.Length(), loggerArgs.data(), "Method"); 4927 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW orldMethod", info.Length(), loggerArgs.data(), "Method");
4769 } 4928 }
4770 TestObjV8Internal::activityLoggedInIsolatedWorldMethodMethod(info); 4929 TestObjV8Internal::activityLoggedInIsolatedWorldMethodMethod(info);
4771 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4930 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4772 } 4931 }
4773 4932
4774 static void activityLoggedInIsolatedWorldMethodMethodForMainWorld(const v8::Func tionCallbackInfo<v8::Value>& info) 4933 static void activityLoggedInIsolatedWorldMethodMethodForMainWorld(const v8::Func tionCallbackInfo<v8::Value>& info)
4775 { 4934 {
4935 ExceptionState exceptionState(ExceptionState::ExecutionContext, "activityLog gedInIsolatedWorldMethod", "TestObject", info.Holder(), info.GetIsolate());
4776 if (UNLIKELY(info.Length() < 1)) { 4936 if (UNLIKELY(info.Length() < 1)) {
4777 throwTypeError(ExceptionMessages::failedToExecute("activityLoggedInIsola tedWorldMethod", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Len gth())), info.GetIsolate()); 4937 throwTypeError(ExceptionMessages::failedToExecute("activityLoggedInIsola tedWorldMethod", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Len gth())), info.GetIsolate());
4778 return; 4938 return;
4779 } 4939 }
4780 TestObj* imp = V8TestObject::toNative(info.Holder()); 4940 TestObj* imp = V8TestObject::toNative(info.Holder());
4781 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); 4941 V8TRYCATCH_VOID(int, longArg, toInt32(info[0]));
4782 imp->activityLoggedInIsolatedWorldMethod(longArg); 4942 imp->activityLoggedInIsolatedWorldMethod(longArg);
4783 } 4943 }
4784 4944
4785 static void activityLoggedInIsolatedWorldMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) 4945 static void activityLoggedInIsolatedWorldMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
4786 { 4946 {
4787 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4947 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4788 TestObjV8Internal::activityLoggedInIsolatedWorldMethodMethodForMainWorld(inf o); 4948 TestObjV8Internal::activityLoggedInIsolatedWorldMethodMethodForMainWorld(inf o);
4789 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4949 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4790 } 4950 }
4791 4951
4792 static void overloadedActivityLoggedMethod1Method(const v8::FunctionCallbackInfo <v8::Value>& info) 4952 static void overloadedActivityLoggedMethod1Method(const v8::FunctionCallbackInfo <v8::Value>& info)
4793 { 4953 {
4954 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedA ctivityLoggedMethod", "TestObject", info.Holder(), info.GetIsolate());
4794 if (UNLIKELY(info.Length() < 1)) { 4955 if (UNLIKELY(info.Length() < 1)) {
4795 throwTypeError(ExceptionMessages::failedToExecute("overloadedActivityLog gedMethod", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length() )), info.GetIsolate()); 4956 throwTypeError(ExceptionMessages::failedToExecute("overloadedActivityLog gedMethod", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length() )), info.GetIsolate());
4796 return; 4957 return;
4797 } 4958 }
4798 TestObj* imp = V8TestObject::toNative(info.Holder()); 4959 TestObj* imp = V8TestObject::toNative(info.Holder());
4799 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); 4960 V8TRYCATCH_VOID(int, longArg, toInt32(info[0]));
4800 imp->overloadedActivityLoggedMethod(longArg); 4961 imp->overloadedActivityLoggedMethod(longArg);
4801 } 4962 }
4802 4963
4803 static void overloadedActivityLoggedMethod1MethodForMainWorld(const v8::Function CallbackInfo<v8::Value>& info) 4964 static void overloadedActivityLoggedMethod1MethodForMainWorld(const v8::Function CallbackInfo<v8::Value>& info)
4804 { 4965 {
4966 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedA ctivityLoggedMethod", "TestObject", info.Holder(), info.GetIsolate());
4805 if (UNLIKELY(info.Length() < 1)) { 4967 if (UNLIKELY(info.Length() < 1)) {
4806 throwTypeError(ExceptionMessages::failedToExecute("overloadedActivityLog gedMethod", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length() )), info.GetIsolate()); 4968 throwTypeError(ExceptionMessages::failedToExecute("overloadedActivityLog gedMethod", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length() )), info.GetIsolate());
4807 return; 4969 return;
4808 } 4970 }
4809 TestObj* imp = V8TestObject::toNative(info.Holder()); 4971 TestObj* imp = V8TestObject::toNative(info.Holder());
4810 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); 4972 V8TRYCATCH_VOID(int, longArg, toInt32(info[0]));
4811 imp->overloadedActivityLoggedMethod(longArg); 4973 imp->overloadedActivityLoggedMethod(longArg);
4812 } 4974 }
4813 4975
4814 static void overloadedActivityLoggedMethod2Method(const v8::FunctionCallbackInfo <v8::Value>& info) 4976 static void overloadedActivityLoggedMethod2Method(const v8::FunctionCallbackInfo <v8::Value>& info)
4815 { 4977 {
4978 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedA ctivityLoggedMethod", "TestObject", info.Holder(), info.GetIsolate());
4816 if (UNLIKELY(info.Length() < 2)) { 4979 if (UNLIKELY(info.Length() < 2)) {
4817 throwTypeError(ExceptionMessages::failedToExecute("overloadedActivityLog gedMethod", "TestObject", ExceptionMessages::notEnoughArguments(2, info.Length() )), info.GetIsolate()); 4980 throwTypeError(ExceptionMessages::failedToExecute("overloadedActivityLog gedMethod", "TestObject", ExceptionMessages::notEnoughArguments(2, info.Length() )), info.GetIsolate());
4818 return; 4981 return;
4819 } 4982 }
4820 TestObj* imp = V8TestObject::toNative(info.Holder()); 4983 TestObj* imp = V8TestObject::toNative(info.Holder());
4821 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); 4984 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]);
4822 V8TRYCATCH_VOID(int, longArg, toInt32(info[1])); 4985 V8TRYCATCH_VOID(int, longArg, toInt32(info[1]));
4823 imp->overloadedActivityLoggedMethod(strArg, longArg); 4986 imp->overloadedActivityLoggedMethod(strArg, longArg);
4824 } 4987 }
4825 4988
(...skipping 21 matching lines...) Expand all
4847 if (contextData && contextData->activityLogger()) { 5010 if (contextData && contextData->activityLogger()) {
4848 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle <v8::Value> >(info, 0); 5011 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle <v8::Value> >(info, 0);
4849 contextData->activityLogger()->log("TestObject.overloadedActivityLoggedM ethod", info.Length(), loggerArgs.data(), "Method"); 5012 contextData->activityLogger()->log("TestObject.overloadedActivityLoggedM ethod", info.Length(), loggerArgs.data(), "Method");
4850 } 5013 }
4851 TestObjV8Internal::overloadedActivityLoggedMethodMethod(info); 5014 TestObjV8Internal::overloadedActivityLoggedMethodMethod(info);
4852 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 5015 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4853 } 5016 }
4854 5017
4855 static void overloadedActivityLoggedMethod2MethodForMainWorld(const v8::Function CallbackInfo<v8::Value>& info) 5018 static void overloadedActivityLoggedMethod2MethodForMainWorld(const v8::Function CallbackInfo<v8::Value>& info)
4856 { 5019 {
5020 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedA ctivityLoggedMethod", "TestObject", info.Holder(), info.GetIsolate());
4857 if (UNLIKELY(info.Length() < 2)) { 5021 if (UNLIKELY(info.Length() < 2)) {
4858 throwTypeError(ExceptionMessages::failedToExecute("overloadedActivityLog gedMethod", "TestObject", ExceptionMessages::notEnoughArguments(2, info.Length() )), info.GetIsolate()); 5022 throwTypeError(ExceptionMessages::failedToExecute("overloadedActivityLog gedMethod", "TestObject", ExceptionMessages::notEnoughArguments(2, info.Length() )), info.GetIsolate());
4859 return; 5023 return;
4860 } 5024 }
4861 TestObj* imp = V8TestObject::toNative(info.Holder()); 5025 TestObj* imp = V8TestObject::toNative(info.Holder());
4862 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); 5026 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]);
4863 V8TRYCATCH_VOID(int, longArg, toInt32(info[1])); 5027 V8TRYCATCH_VOID(int, longArg, toInt32(info[1]));
4864 imp->overloadedActivityLoggedMethod(strArg, longArg); 5028 imp->overloadedActivityLoggedMethod(strArg, longArg);
4865 } 5029 }
4866 5030
(...skipping 21 matching lines...) Expand all
4888 if (contextData && contextData->activityLogger()) { 5052 if (contextData && contextData->activityLogger()) {
4889 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle <v8::Value> >(info, 0); 5053 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle <v8::Value> >(info, 0);
4890 contextData->activityLogger()->log("TestObject.overloadedActivityLoggedM ethod", info.Length(), loggerArgs.data(), "Method"); 5054 contextData->activityLogger()->log("TestObject.overloadedActivityLoggedM ethod", info.Length(), loggerArgs.data(), "Method");
4891 } 5055 }
4892 TestObjV8Internal::overloadedActivityLoggedMethodMethodForMainWorld(info); 5056 TestObjV8Internal::overloadedActivityLoggedMethodMethodForMainWorld(info);
4893 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 5057 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4894 } 5058 }
4895 5059
4896 static void deprecatedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in fo) 5060 static void deprecatedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in fo)
4897 { 5061 {
5062 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deprecatedM ethod", "TestObject", info.Holder(), info.GetIsolate());
4898 TestObj* imp = V8TestObject::toNative(info.Holder()); 5063 TestObj* imp = V8TestObject::toNative(info.Holder());
4899 imp->deprecatedMethod(); 5064 imp->deprecatedMethod();
4900 } 5065 }
4901 5066
4902 static void deprecatedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& info) 5067 static void deprecatedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& info)
4903 { 5068 {
4904 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 5069 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4905 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::Method); 5070 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::Method);
4906 TestObjV8Internal::deprecatedMethodMethod(info); 5071 TestObjV8Internal::deprecatedMethodMethod(info);
4907 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 5072 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4908 } 5073 }
4909 5074
4910 static void deprecatedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::Valu e>& info) 5075 static void deprecatedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::Valu e>& info)
4911 { 5076 {
5077 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deprecatedS taticMethod", "TestObject", info.Holder(), info.GetIsolate());
4912 TestObj::deprecatedStaticMethod(); 5078 TestObj::deprecatedStaticMethod();
4913 } 5079 }
4914 5080
4915 static void deprecatedStaticMethodMethodCallback(const v8::FunctionCallbackInfo< v8::Value>& info) 5081 static void deprecatedStaticMethodMethodCallback(const v8::FunctionCallbackInfo< v8::Value>& info)
4916 { 5082 {
4917 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 5083 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4918 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::StaticMet hod); 5084 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::StaticMet hod);
4919 TestObjV8Internal::deprecatedStaticMethodMethod(info); 5085 TestObjV8Internal::deprecatedStaticMethodMethod(info);
4920 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 5086 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4921 } 5087 }
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
5407 fromInternalPointer(object)->deref(); 5573 fromInternalPointer(object)->deref();
5408 } 5574 }
5409 5575
5410 template<> 5576 template<>
5411 v8::Handle<v8::Value> toV8NoInline(TestObj* impl, v8::Handle<v8::Object> creatio nContext, v8::Isolate* isolate) 5577 v8::Handle<v8::Value> toV8NoInline(TestObj* impl, v8::Handle<v8::Object> creatio nContext, v8::Isolate* isolate)
5412 { 5578 {
5413 return toV8(impl, creationContext, isolate); 5579 return toV8(impl, creationContext, isolate);
5414 } 5580 }
5415 5581
5416 } // namespace WebCore 5582 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698