| OLD | NEW |
| 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 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 523 static void eventHandlerAttrAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 523 static void eventHandlerAttrAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
| 524 { | 524 { |
| 525 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 525 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 526 TestObjectV8Internal::eventHandlerAttrAttributeSetter(jsValue, info); | 526 TestObjectV8Internal::eventHandlerAttrAttributeSetter(jsValue, info); |
| 527 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 527 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 528 } | 528 } |
| 529 | 529 |
| 530 static void testObjAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>
& info) | 530 static void testObjAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>
& info) |
| 531 { | 531 { |
| 532 TestObject* imp = V8TestObject::toNative(info.Holder()); | 532 TestObject* imp = V8TestObject::toNative(info.Holder()); |
| 533 v8SetReturnValueFast(info, imp->testObjAttr(), imp); | 533 v8SetReturnValueFast(info, WTF::getPtr(imp->testObjAttr()), imp); |
| 534 } | 534 } |
| 535 | 535 |
| 536 static void testObjAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::
PropertyCallbackInfo<v8::Value>& info) | 536 static void testObjAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::
PropertyCallbackInfo<v8::Value>& info) |
| 537 { | 537 { |
| 538 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 538 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 539 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::Te
stFeature); | 539 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::Te
stFeature); |
| 540 TestObjectV8Internal::testObjAttrAttributeGetter(info); | 540 TestObjectV8Internal::testObjAttrAttributeGetter(info); |
| 541 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 541 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 542 } | 542 } |
| 543 | 543 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 580 { | 580 { |
| 581 v8::Local<v8::Value> jsValue = info[0]; | 581 v8::Local<v8::Value> jsValue = info[0]; |
| 582 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 582 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 583 TestObjectV8Internal::attrWithJSGetterAndSetterAttributeSetter(jsValue, info
); | 583 TestObjectV8Internal::attrWithJSGetterAndSetterAttributeSetter(jsValue, info
); |
| 584 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 584 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 585 } | 585 } |
| 586 | 586 |
| 587 static void XMLObjAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>&
info) | 587 static void XMLObjAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>&
info) |
| 588 { | 588 { |
| 589 TestObject* imp = V8TestObject::toNative(info.Holder()); | 589 TestObject* imp = V8TestObject::toNative(info.Holder()); |
| 590 v8SetReturnValueFast(info, imp->xmlObjAttr(), imp); | 590 v8SetReturnValueFast(info, WTF::getPtr(imp->xmlObjAttr()), imp); |
| 591 } | 591 } |
| 592 | 592 |
| 593 static void XMLObjAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::P
ropertyCallbackInfo<v8::Value>& info) | 593 static void XMLObjAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::P
ropertyCallbackInfo<v8::Value>& info) |
| 594 { | 594 { |
| 595 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 595 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 596 TestObjectV8Internal::XMLObjAttrAttributeGetter(info); | 596 TestObjectV8Internal::XMLObjAttrAttributeGetter(info); |
| 597 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 597 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 598 } | 598 } |
| 599 | 599 |
| 600 static void XMLObjAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pr
opertyCallbackInfo<void>& info) | 600 static void XMLObjAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pr
opertyCallbackInfo<void>& info) |
| (...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1393 static void limitedWithEmptyMissingInvalidAttributeAttributeGetterCallback(v8::L
ocal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1393 static void limitedWithEmptyMissingInvalidAttributeAttributeGetterCallback(v8::L
ocal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1394 { | 1394 { |
| 1395 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1395 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1396 TestObjectV8Internal::limitedWithEmptyMissingInvalidAttributeAttributeGetter
(info); | 1396 TestObjectV8Internal::limitedWithEmptyMissingInvalidAttributeAttributeGetter
(info); |
| 1397 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1397 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 1398 } | 1398 } |
| 1399 | 1399 |
| 1400 static void typedArrayAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) | 1400 static void typedArrayAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) |
| 1401 { | 1401 { |
| 1402 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1402 TestObject* imp = V8TestObject::toNative(info.Holder()); |
| 1403 v8SetReturnValueFast(info, imp->typedArrayAttr(), imp); | 1403 v8SetReturnValueFast(info, WTF::getPtr(imp->typedArrayAttr()), imp); |
| 1404 } | 1404 } |
| 1405 | 1405 |
| 1406 static void typedArrayAttrAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) | 1406 static void typedArrayAttrAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) |
| 1407 { | 1407 { |
| 1408 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1408 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1409 TestObjectV8Internal::typedArrayAttrAttributeGetter(info); | 1409 TestObjectV8Internal::typedArrayAttrAttributeGetter(info); |
| 1410 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1410 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 1411 } | 1411 } |
| 1412 | 1412 |
| 1413 static void typedArrayAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8
::PropertyCallbackInfo<void>& info) | 1413 static void typedArrayAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8
::PropertyCallbackInfo<void>& info) |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1556 { | 1556 { |
| 1557 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1557 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1558 V8TestObject::customAttrAttributeSetterCustom(jsValue, info); | 1558 V8TestObject::customAttrAttributeSetterCustom(jsValue, info); |
| 1559 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1559 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 1560 } | 1560 } |
| 1561 | 1561 |
| 1562 static void withExecutionContextAttributeAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) | 1562 static void withExecutionContextAttributeAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) |
| 1563 { | 1563 { |
| 1564 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1564 TestObject* imp = V8TestObject::toNative(info.Holder()); |
| 1565 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate())
; | 1565 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate())
; |
| 1566 v8SetReturnValueFast(info, imp->withExecutionContextAttribute(scriptContext)
, imp); | 1566 v8SetReturnValueFast(info, WTF::getPtr(imp->withExecutionContextAttribute(sc
riptContext)), imp); |
| 1567 } | 1567 } |
| 1568 | 1568 |
| 1569 static void withExecutionContextAttributeAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1569 static void withExecutionContextAttributeAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1570 { | 1570 { |
| 1571 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1571 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1572 TestObjectV8Internal::withExecutionContextAttributeAttributeGetter(info); | 1572 TestObjectV8Internal::withExecutionContextAttributeAttributeGetter(info); |
| 1573 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1573 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 1574 } | 1574 } |
| 1575 | 1575 |
| 1576 static void withExecutionContextAttributeAttributeSetter(v8::Local<v8::Value> js
Value, const v8::PropertyCallbackInfo<void>& info) | 1576 static void withExecutionContextAttributeAttributeSetter(v8::Local<v8::Value> js
Value, const v8::PropertyCallbackInfo<void>& info) |
| 1577 { | 1577 { |
| 1578 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1578 TestObject* imp = V8TestObject::toNative(info.Holder()); |
| 1579 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), jsValue)); | 1579 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), jsValue)); |
| 1580 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate())
; | 1580 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate())
; |
| 1581 imp->setWithExecutionContextAttribute(scriptContext, WTF::getPtr(cppValue)); | 1581 imp->setWithExecutionContextAttribute(scriptContext, WTF::getPtr(cppValue)); |
| 1582 } | 1582 } |
| 1583 | 1583 |
| 1584 static void withExecutionContextAttributeAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info
) | 1584 static void withExecutionContextAttributeAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info
) |
| 1585 { | 1585 { |
| 1586 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1586 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1587 TestObjectV8Internal::withExecutionContextAttributeAttributeSetter(jsValue,
info); | 1587 TestObjectV8Internal::withExecutionContextAttributeAttributeSetter(jsValue,
info); |
| 1588 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1588 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 1589 } | 1589 } |
| 1590 | 1590 |
| 1591 static void withActiveWindowAndFirstWindowAttributeAttributeGetter(const v8::Pro
pertyCallbackInfo<v8::Value>& info) | 1591 static void withActiveWindowAndFirstWindowAttributeAttributeGetter(const v8::Pro
pertyCallbackInfo<v8::Value>& info) |
| 1592 { | 1592 { |
| 1593 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1593 TestObject* imp = V8TestObject::toNative(info.Holder()); |
| 1594 v8SetReturnValueFast(info, imp->withActiveWindowAndFirstWindowAttribute(), i
mp); | 1594 v8SetReturnValueFast(info, WTF::getPtr(imp->withActiveWindowAndFirstWindowAt
tribute()), imp); |
| 1595 } | 1595 } |
| 1596 | 1596 |
| 1597 static void withActiveWindowAndFirstWindowAttributeAttributeGetterCallback(v8::L
ocal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1597 static void withActiveWindowAndFirstWindowAttributeAttributeGetterCallback(v8::L
ocal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1598 { | 1598 { |
| 1599 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1599 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1600 TestObjectV8Internal::withActiveWindowAndFirstWindowAttributeAttributeGetter
(info); | 1600 TestObjectV8Internal::withActiveWindowAndFirstWindowAttributeAttributeGetter
(info); |
| 1601 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1601 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 1602 } | 1602 } |
| 1603 | 1603 |
| 1604 static void withActiveWindowAndFirstWindowAttributeAttributeSetter(v8::Local<v8:
:Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1604 static void withActiveWindowAndFirstWindowAttributeAttributeSetter(v8::Local<v8:
:Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
| (...skipping 10 matching lines...) Expand all Loading... |
| 1615 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1615 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 1616 } | 1616 } |
| 1617 | 1617 |
| 1618 static void withScriptStateAttributeRaisesAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) | 1618 static void withScriptStateAttributeRaisesAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) |
| 1619 { | 1619 { |
| 1620 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1620 TestObject* imp = V8TestObject::toNative(info.Holder()); |
| 1621 ExceptionState exceptionState(ExceptionState::GetterContext, "withScriptStat
eAttributeRaises", "TestObject", info.Holder(), info.GetIsolate()); | 1621 ExceptionState exceptionState(ExceptionState::GetterContext, "withScriptStat
eAttributeRaises", "TestObject", info.Holder(), info.GetIsolate()); |
| 1622 RefPtr<TestObject> jsValue = imp->withScriptStateAttributeRaises(exceptionSt
ate); | 1622 RefPtr<TestObject> jsValue = imp->withScriptStateAttributeRaises(exceptionSt
ate); |
| 1623 if (UNLIKELY(exceptionState.throwIfNeeded())) | 1623 if (UNLIKELY(exceptionState.throwIfNeeded())) |
| 1624 return; | 1624 return; |
| 1625 v8SetReturnValueFast(info, jsValue.release(), imp); | 1625 v8SetReturnValueFast(info, WTF::getPtr(jsValue.release()), imp); |
| 1626 } | 1626 } |
| 1627 | 1627 |
| 1628 static void withScriptStateAttributeRaisesAttributeGetterCallback(v8::Local<v8::
String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1628 static void withScriptStateAttributeRaisesAttributeGetterCallback(v8::Local<v8::
String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1629 { | 1629 { |
| 1630 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1630 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1631 TestObjectV8Internal::withScriptStateAttributeRaisesAttributeGetter(info); | 1631 TestObjectV8Internal::withScriptStateAttributeRaisesAttributeGetter(info); |
| 1632 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1632 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 1633 } | 1633 } |
| 1634 | 1634 |
| 1635 static void withScriptStateAttributeRaisesAttributeSetter(v8::Local<v8::Value> j
sValue, const v8::PropertyCallbackInfo<void>& info) | 1635 static void withScriptStateAttributeRaisesAttributeSetter(v8::Local<v8::Value> j
sValue, const v8::PropertyCallbackInfo<void>& info) |
| (...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2246 | 2246 |
| 2247 static void contentDocumentAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) | 2247 static void contentDocumentAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) |
| 2248 { | 2248 { |
| 2249 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2249 TestObject* imp = V8TestObject::toNative(info.Holder()); |
| 2250 ExceptionState exceptionState(ExceptionState::GetterContext, "contentDocumen
t", "TestObject", info.Holder(), info.GetIsolate()); | 2250 ExceptionState exceptionState(ExceptionState::GetterContext, "contentDocumen
t", "TestObject", info.Holder(), info.GetIsolate()); |
| 2251 if (!BindingSecurity::shouldAllowAccessToNode(info.GetIsolate(), imp->conten
tDocument(), exceptionState)) { | 2251 if (!BindingSecurity::shouldAllowAccessToNode(info.GetIsolate(), imp->conten
tDocument(), exceptionState)) { |
| 2252 v8SetReturnValueNull(info); | 2252 v8SetReturnValueNull(info); |
| 2253 exceptionState.throwIfNeeded(); | 2253 exceptionState.throwIfNeeded(); |
| 2254 return; | 2254 return; |
| 2255 } | 2255 } |
| 2256 v8SetReturnValueFast(info, imp->contentDocument(), imp); | 2256 v8SetReturnValueFast(info, WTF::getPtr(imp->contentDocument()), imp); |
| 2257 } | 2257 } |
| 2258 | 2258 |
| 2259 static void contentDocumentAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 2259 static void contentDocumentAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 2260 { | 2260 { |
| 2261 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2261 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2262 TestObjectV8Internal::contentDocumentAttributeGetter(info); | 2262 TestObjectV8Internal::contentDocumentAttributeGetter(info); |
| 2263 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2263 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2264 } | 2264 } |
| 2265 | 2265 |
| 2266 static void strawberryAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>&
info) | 2266 static void strawberryAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>&
info) |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2477 static void perWorldReadOnlyAttributeAttributeGetterCallbackForMainWorld(v8::Loc
al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2477 static void perWorldReadOnlyAttributeAttributeGetterCallbackForMainWorld(v8::Loc
al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2478 { | 2478 { |
| 2479 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2479 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2480 TestObjectV8Internal::perWorldReadOnlyAttributeAttributeGetterForMainWorld(i
nfo); | 2480 TestObjectV8Internal::perWorldReadOnlyAttributeAttributeGetterForMainWorld(i
nfo); |
| 2481 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2481 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2482 } | 2482 } |
| 2483 | 2483 |
| 2484 static void perWorldAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::
Value>& info) | 2484 static void perWorldAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::
Value>& info) |
| 2485 { | 2485 { |
| 2486 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2486 TestObject* imp = V8TestObject::toNative(info.Holder()); |
| 2487 v8SetReturnValueFast(info, imp->perWorldAttribute(), imp); | 2487 v8SetReturnValueFast(info, WTF::getPtr(imp->perWorldAttribute()), imp); |
| 2488 } | 2488 } |
| 2489 | 2489 |
| 2490 static void perWorldAttributeAttributeGetterCallback(v8::Local<v8::String>, cons
t v8::PropertyCallbackInfo<v8::Value>& info) | 2490 static void perWorldAttributeAttributeGetterCallback(v8::Local<v8::String>, cons
t v8::PropertyCallbackInfo<v8::Value>& info) |
| 2491 { | 2491 { |
| 2492 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2492 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2493 TestObjectV8Internal::perWorldAttributeAttributeGetter(info); | 2493 TestObjectV8Internal::perWorldAttributeAttributeGetter(info); |
| 2494 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2494 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2495 } | 2495 } |
| 2496 | 2496 |
| 2497 static void perWorldAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) | 2497 static void perWorldAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) |
| 2498 { | 2498 { |
| 2499 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2499 TestObject* imp = V8TestObject::toNative(info.Holder()); |
| 2500 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), jsValue)); | 2500 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), jsValue)); |
| 2501 imp->setPerWorldAttribute(WTF::getPtr(cppValue)); | 2501 imp->setPerWorldAttribute(WTF::getPtr(cppValue)); |
| 2502 } | 2502 } |
| 2503 | 2503 |
| 2504 static void perWorldAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::
Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2504 static void perWorldAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::
Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
| 2505 { | 2505 { |
| 2506 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2506 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 2507 TestObjectV8Internal::perWorldAttributeAttributeSetter(jsValue, info); | 2507 TestObjectV8Internal::perWorldAttributeAttributeSetter(jsValue, info); |
| 2508 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2508 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2509 } | 2509 } |
| 2510 | 2510 |
| 2511 static void perWorldAttributeAttributeGetterForMainWorld(const v8::PropertyCallb
ackInfo<v8::Value>& info) | 2511 static void perWorldAttributeAttributeGetterForMainWorld(const v8::PropertyCallb
ackInfo<v8::Value>& info) |
| 2512 { | 2512 { |
| 2513 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2513 TestObject* imp = V8TestObject::toNative(info.Holder()); |
| 2514 v8SetReturnValueForMainWorld(info, imp->perWorldAttribute()); | 2514 v8SetReturnValueForMainWorld(info, WTF::getPtr(imp->perWorldAttribute())); |
| 2515 } | 2515 } |
| 2516 | 2516 |
| 2517 static void perWorldAttributeAttributeGetterCallbackForMainWorld(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2517 static void perWorldAttributeAttributeGetterCallbackForMainWorld(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2518 { | 2518 { |
| 2519 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2519 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2520 TestObjectV8Internal::perWorldAttributeAttributeGetterForMainWorld(info); | 2520 TestObjectV8Internal::perWorldAttributeAttributeGetterForMainWorld(info); |
| 2521 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2521 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2522 } | 2522 } |
| 2523 | 2523 |
| 2524 static void perWorldAttributeAttributeSetterForMainWorld(v8::Local<v8::Value> js
Value, const v8::PropertyCallbackInfo<void>& info) | 2524 static void perWorldAttributeAttributeSetterForMainWorld(v8::Local<v8::Value> js
Value, const v8::PropertyCallbackInfo<void>& info) |
| (...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3100 { | 3100 { |
| 3101 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 3101 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 3102 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::Attribute); | 3102 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::Attribute); |
| 3103 TestObjectV8Internal::deprecatedAttrAttributeSetter(jsValue, info); | 3103 TestObjectV8Internal::deprecatedAttrAttributeSetter(jsValue, info); |
| 3104 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3104 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 3105 } | 3105 } |
| 3106 | 3106 |
| 3107 static void locationAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& i
nfo) | 3107 static void locationAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& i
nfo) |
| 3108 { | 3108 { |
| 3109 TestObject* imp = V8TestObject::toNative(info.Holder()); | 3109 TestObject* imp = V8TestObject::toNative(info.Holder()); |
| 3110 v8SetReturnValueFast(info, imp->location(), imp); | 3110 v8SetReturnValueFast(info, WTF::getPtr(imp->location()), imp); |
| 3111 } | 3111 } |
| 3112 | 3112 |
| 3113 static void locationAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro
pertyCallbackInfo<v8::Value>& info) | 3113 static void locationAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro
pertyCallbackInfo<v8::Value>& info) |
| 3114 { | 3114 { |
| 3115 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 3115 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 3116 TestObjectV8Internal::locationAttributeGetter(info); | 3116 TestObjectV8Internal::locationAttributeGetter(info); |
| 3117 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3117 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 3118 } | 3118 } |
| 3119 | 3119 |
| 3120 static void locationAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Prop
ertyCallbackInfo<void>& info) | 3120 static void locationAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Prop
ertyCallbackInfo<void>& info) |
| 3121 { | 3121 { |
| 3122 TestObject* proxyImp = V8TestObject::toNative(info.Holder()); | 3122 TestObject* proxyImp = V8TestObject::toNative(info.Holder()); |
| 3123 TestNode* imp = proxyImp->location(); | 3123 TestNode* imp = proxyImp->location(); |
| 3124 if (!imp) | 3124 if (!imp) |
| 3125 return; | 3125 return; |
| 3126 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 3126 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
| 3127 imp->setHref(cppValue); | 3127 imp->setHref(cppValue); |
| 3128 } | 3128 } |
| 3129 | 3129 |
| 3130 static void locationAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8:
:Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 3130 static void locationAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8:
:Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
| 3131 { | 3131 { |
| 3132 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 3132 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 3133 TestObjectV8Internal::locationAttributeSetter(jsValue, info); | 3133 TestObjectV8Internal::locationAttributeSetter(jsValue, info); |
| 3134 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3134 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 3135 } | 3135 } |
| 3136 | 3136 |
| 3137 static void locationWithExceptionAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 3137 static void locationWithExceptionAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
| 3138 { | 3138 { |
| 3139 TestObject* imp = V8TestObject::toNative(info.Holder()); | 3139 TestObject* imp = V8TestObject::toNative(info.Holder()); |
| 3140 v8SetReturnValueFast(info, imp->locationWithException(), imp); | 3140 v8SetReturnValueFast(info, WTF::getPtr(imp->locationWithException()), imp); |
| 3141 } | 3141 } |
| 3142 | 3142 |
| 3143 static void locationWithExceptionAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 3143 static void locationWithExceptionAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3144 { | 3144 { |
| 3145 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 3145 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 3146 TestObjectV8Internal::locationWithExceptionAttributeGetter(info); | 3146 TestObjectV8Internal::locationWithExceptionAttributeGetter(info); |
| 3147 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3147 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 3148 } | 3148 } |
| 3149 | 3149 |
| 3150 static void locationWithExceptionAttributeSetter(v8::Local<v8::Value> jsValue, c
onst v8::PropertyCallbackInfo<void>& info) | 3150 static void locationWithExceptionAttributeSetter(v8::Local<v8::Value> jsValue, c
onst v8::PropertyCallbackInfo<void>& info) |
| (...skipping 2057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5208 TestObjectV8Internal::deprecatedStaticMethodMethod(info); | 5208 TestObjectV8Internal::deprecatedStaticMethodMethod(info); |
| 5209 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 5209 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 5210 } | 5210 } |
| 5211 | 5211 |
| 5212 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo
<v8::Value>& info) | 5212 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo
<v8::Value>& info) |
| 5213 { | 5213 { |
| 5214 TestObject* imp = V8TestObject::toNative(info.Holder()); | 5214 TestObject* imp = V8TestObject::toNative(info.Holder()); |
| 5215 RefPtr<Node> result = imp->anonymousIndexedGetter(index); | 5215 RefPtr<Node> result = imp->anonymousIndexedGetter(index); |
| 5216 if (!result) | 5216 if (!result) |
| 5217 return; | 5217 return; |
| 5218 v8SetReturnValueFast(info, result.release(), imp); | 5218 v8SetReturnValueFast(info, WTF::getPtr(result.release()), imp); |
| 5219 } | 5219 } |
| 5220 | 5220 |
| 5221 static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCall
backInfo<v8::Value>& info) | 5221 static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCall
backInfo<v8::Value>& info) |
| 5222 { | 5222 { |
| 5223 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMIndexedProperty"); | 5223 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMIndexedProperty"); |
| 5224 TestObjectV8Internal::indexedPropertyGetter(index, info); | 5224 TestObjectV8Internal::indexedPropertyGetter(index, info); |
| 5225 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 5225 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 5226 } | 5226 } |
| 5227 | 5227 |
| 5228 static void namedPropertyGetter(v8::Local<v8::String> name, const v8::PropertyCa
llbackInfo<v8::Value>& info) | 5228 static void namedPropertyGetter(v8::Local<v8::String> name, const v8::PropertyCa
llbackInfo<v8::Value>& info) |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5611 fromInternalPointer(object)->deref(); | 5611 fromInternalPointer(object)->deref(); |
| 5612 } | 5612 } |
| 5613 | 5613 |
| 5614 template<> | 5614 template<> |
| 5615 v8::Handle<v8::Value> toV8NoInline(TestObject* impl, v8::Handle<v8::Object> crea
tionContext, v8::Isolate* isolate) | 5615 v8::Handle<v8::Value> toV8NoInline(TestObject* impl, v8::Handle<v8::Object> crea
tionContext, v8::Isolate* isolate) |
| 5616 { | 5616 { |
| 5617 return toV8(impl, creationContext, isolate); | 5617 return toV8(impl, creationContext, isolate); |
| 5618 } | 5618 } |
| 5619 | 5619 |
| 5620 } // namespace WebCore | 5620 } // namespace WebCore |
| OLD | NEW |