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 2507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2518 static void locationAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro
pertyCallbackInfo<v8::Value>& info) | 2518 static void locationAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro
pertyCallbackInfo<v8::Value>& info) |
2519 { | 2519 { |
2520 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2520 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2521 TestObjectPythonV8Internal::locationAttributeGetter(info); | 2521 TestObjectPythonV8Internal::locationAttributeGetter(info); |
2522 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2522 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2523 } | 2523 } |
2524 | 2524 |
2525 static void locationAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Prop
ertyCallbackInfo<void>& info) | 2525 static void locationAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Prop
ertyCallbackInfo<void>& info) |
2526 { | 2526 { |
2527 TestObjectPython* proxyImp = V8TestObjectPython::toNative(info.Holder()); | 2527 TestObjectPython* proxyImp = V8TestObjectPython::toNative(info.Holder()); |
2528 TestNode* imp = WTF::getPtr(proxyImp->location()); | 2528 RefPtr<TestNode> imp = WTF::getPtr(proxyImp->location()); |
2529 if (!imp) | 2529 if (!imp) |
2530 return; | 2530 return; |
2531 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 2531 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
2532 imp->setHref(cppValue); | 2532 imp->setHref(cppValue); |
2533 } | 2533 } |
2534 | 2534 |
2535 static void locationAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8:
:Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2535 static void locationAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8:
:Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2536 { | 2536 { |
2537 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2537 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2538 TestObjectPythonV8Internal::locationAttributeSetter(jsValue, info); | 2538 TestObjectPythonV8Internal::locationAttributeSetter(jsValue, info); |
2539 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2539 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2540 } | 2540 } |
2541 | 2541 |
2542 static void locationWithExceptionAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 2542 static void locationWithExceptionAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
2543 { | 2543 { |
2544 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); | 2544 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
2545 v8SetReturnValueFast(info, WTF::getPtr(imp->locationWithException()), imp); | 2545 v8SetReturnValueFast(info, WTF::getPtr(imp->locationWithException()), imp); |
2546 } | 2546 } |
2547 | 2547 |
2548 static void locationWithExceptionAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 2548 static void locationWithExceptionAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
2549 { | 2549 { |
2550 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2550 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2551 TestObjectPythonV8Internal::locationWithExceptionAttributeGetter(info); | 2551 TestObjectPythonV8Internal::locationWithExceptionAttributeGetter(info); |
2552 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2552 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2553 } | 2553 } |
2554 | 2554 |
2555 static void locationWithExceptionAttributeSetter(v8::Local<v8::Value> jsValue, c
onst v8::PropertyCallbackInfo<void>& info) | 2555 static void locationWithExceptionAttributeSetter(v8::Local<v8::Value> jsValue, c
onst v8::PropertyCallbackInfo<void>& info) |
2556 { | 2556 { |
2557 TestObjectPython* proxyImp = V8TestObjectPython::toNative(info.Holder()); | 2557 TestObjectPython* proxyImp = V8TestObjectPython::toNative(info.Holder()); |
2558 TestNode* imp = WTF::getPtr(proxyImp->locationWithException()); | 2558 RefPtr<TestNode> imp = WTF::getPtr(proxyImp->locationWithException()); |
2559 if (!imp) | 2559 if (!imp) |
2560 return; | 2560 return; |
2561 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 2561 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
2562 imp->setHrefThrows(cppValue); | 2562 imp->setHrefThrows(cppValue); |
2563 } | 2563 } |
2564 | 2564 |
2565 static void locationWithExceptionAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2565 static void locationWithExceptionAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2566 { | 2566 { |
2567 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2567 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2568 TestObjectPythonV8Internal::locationWithExceptionAttributeSetter(jsValue, in
fo); | 2568 TestObjectPythonV8Internal::locationWithExceptionAttributeSetter(jsValue, in
fo); |
2569 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2569 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2570 } | 2570 } |
2571 | 2571 |
2572 static void locationWithCallWithAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | 2572 static void locationWithCallWithAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) |
2573 { | 2573 { |
2574 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); | 2574 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
2575 v8SetReturnValueFast(info, WTF::getPtr(imp->locationWithCallWith()), imp); | 2575 v8SetReturnValueFast(info, WTF::getPtr(imp->locationWithCallWith()), imp); |
2576 } | 2576 } |
2577 | 2577 |
2578 static void locationWithCallWithAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 2578 static void locationWithCallWithAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
2579 { | 2579 { |
2580 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2580 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2581 TestObjectPythonV8Internal::locationWithCallWithAttributeGetter(info); | 2581 TestObjectPythonV8Internal::locationWithCallWithAttributeGetter(info); |
2582 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2582 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2583 } | 2583 } |
2584 | 2584 |
2585 static void locationWithCallWithAttributeSetter(v8::Local<v8::Value> jsValue, co
nst v8::PropertyCallbackInfo<void>& info) | 2585 static void locationWithCallWithAttributeSetter(v8::Local<v8::Value> jsValue, co
nst v8::PropertyCallbackInfo<void>& info) |
2586 { | 2586 { |
2587 TestObjectPython* proxyImp = V8TestObjectPython::toNative(info.Holder()); | 2587 TestObjectPython* proxyImp = V8TestObjectPython::toNative(info.Holder()); |
2588 TestNode* imp = WTF::getPtr(proxyImp->locationWithCallWith()); | 2588 RefPtr<TestNode> imp = WTF::getPtr(proxyImp->locationWithCallWith()); |
2589 if (!imp) | 2589 if (!imp) |
2590 return; | 2590 return; |
2591 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 2591 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
2592 imp->setHrefCallWith(callingDOMWindow(info.GetIsolate()), enteredDOMWindow(i
nfo.GetIsolate()), cppValue); | 2592 imp->setHrefCallWith(callingDOMWindow(info.GetIsolate()), enteredDOMWindow(i
nfo.GetIsolate()), cppValue); |
2593 } | 2593 } |
2594 | 2594 |
2595 static void locationWithCallWithAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2595 static void locationWithCallWithAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2596 { | 2596 { |
2597 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2597 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2598 TestObjectPythonV8Internal::locationWithCallWithAttributeSetter(jsValue, inf
o); | 2598 TestObjectPythonV8Internal::locationWithCallWithAttributeSetter(jsValue, inf
o); |
2599 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2599 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2600 } | 2600 } |
2601 | 2601 |
2602 static void locationWithPerWorldBindingsAttributeGetter(const v8::PropertyCallba
ckInfo<v8::Value>& info) | 2602 static void locationWithPerWorldBindingsAttributeGetter(const v8::PropertyCallba
ckInfo<v8::Value>& info) |
2603 { | 2603 { |
2604 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); | 2604 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
2605 v8SetReturnValueFast(info, WTF::getPtr(imp->locationWithPerWorldBindings()),
imp); | 2605 v8SetReturnValueFast(info, WTF::getPtr(imp->locationWithPerWorldBindings()),
imp); |
2606 } | 2606 } |
2607 | 2607 |
2608 static void locationWithPerWorldBindingsAttributeGetterCallback(v8::Local<v8::St
ring>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2608 static void locationWithPerWorldBindingsAttributeGetterCallback(v8::Local<v8::St
ring>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2609 { | 2609 { |
2610 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2610 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2611 TestObjectPythonV8Internal::locationWithPerWorldBindingsAttributeGetter(info
); | 2611 TestObjectPythonV8Internal::locationWithPerWorldBindingsAttributeGetter(info
); |
2612 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2612 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2613 } | 2613 } |
2614 | 2614 |
2615 static void locationWithPerWorldBindingsAttributeSetter(v8::Local<v8::Value> jsV
alue, const v8::PropertyCallbackInfo<void>& info) | 2615 static void locationWithPerWorldBindingsAttributeSetter(v8::Local<v8::Value> jsV
alue, const v8::PropertyCallbackInfo<void>& info) |
2616 { | 2616 { |
2617 TestObjectPython* proxyImp = V8TestObjectPython::toNative(info.Holder()); | 2617 TestObjectPython* proxyImp = V8TestObjectPython::toNative(info.Holder()); |
2618 TestNode* imp = WTF::getPtr(proxyImp->locationWithPerWorldBindings()); | 2618 RefPtr<TestNode> imp = WTF::getPtr(proxyImp->locationWithPerWorldBindings())
; |
2619 if (!imp) | 2619 if (!imp) |
2620 return; | 2620 return; |
2621 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 2621 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
2622 imp->setHref(cppValue); | 2622 imp->setHref(cppValue); |
2623 } | 2623 } |
2624 | 2624 |
2625 static void locationWithPerWorldBindingsAttributeSetterCallback(v8::Local<v8::St
ring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2625 static void locationWithPerWorldBindingsAttributeSetterCallback(v8::Local<v8::St
ring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2626 { | 2626 { |
2627 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2627 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2628 TestObjectPythonV8Internal::locationWithPerWorldBindingsAttributeSetter(jsVa
lue, info); | 2628 TestObjectPythonV8Internal::locationWithPerWorldBindingsAttributeSetter(jsVa
lue, info); |
2629 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2629 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2630 } | 2630 } |
2631 | 2631 |
2632 static void locationWithPerWorldBindingsAttributeGetterForMainWorld(const v8::Pr
opertyCallbackInfo<v8::Value>& info) | 2632 static void locationWithPerWorldBindingsAttributeGetterForMainWorld(const v8::Pr
opertyCallbackInfo<v8::Value>& info) |
2633 { | 2633 { |
2634 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); | 2634 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
2635 v8SetReturnValueForMainWorld(info, WTF::getPtr(imp->locationWithPerWorldBind
ings())); | 2635 v8SetReturnValueForMainWorld(info, WTF::getPtr(imp->locationWithPerWorldBind
ings())); |
2636 } | 2636 } |
2637 | 2637 |
2638 static void locationWithPerWorldBindingsAttributeGetterCallbackForMainWorld(v8::
Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2638 static void locationWithPerWorldBindingsAttributeGetterCallbackForMainWorld(v8::
Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2639 { | 2639 { |
2640 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2640 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2641 TestObjectPythonV8Internal::locationWithPerWorldBindingsAttributeGetterForMa
inWorld(info); | 2641 TestObjectPythonV8Internal::locationWithPerWorldBindingsAttributeGetterForMa
inWorld(info); |
2642 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2642 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2643 } | 2643 } |
2644 | 2644 |
2645 static void locationWithPerWorldBindingsAttributeSetterForMainWorld(v8::Local<v8
::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2645 static void locationWithPerWorldBindingsAttributeSetterForMainWorld(v8::Local<v8
::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2646 { | 2646 { |
2647 TestObjectPython* proxyImp = V8TestObjectPython::toNative(info.Holder()); | 2647 TestObjectPython* proxyImp = V8TestObjectPython::toNative(info.Holder()); |
2648 TestNode* imp = WTF::getPtr(proxyImp->locationWithPerWorldBindings()); | 2648 RefPtr<TestNode> imp = WTF::getPtr(proxyImp->locationWithPerWorldBindings())
; |
2649 if (!imp) | 2649 if (!imp) |
2650 return; | 2650 return; |
2651 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 2651 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
2652 imp->setHref(cppValue); | 2652 imp->setHref(cppValue); |
2653 } | 2653 } |
2654 | 2654 |
2655 static void locationWithPerWorldBindingsAttributeSetterCallbackForMainWorld(v8::
Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<
void>& info) | 2655 static void locationWithPerWorldBindingsAttributeSetterCallbackForMainWorld(v8::
Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<
void>& info) |
2656 { | 2656 { |
2657 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2657 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2658 TestObjectPythonV8Internal::locationWithPerWorldBindingsAttributeSetterForMa
inWorld(jsValue, info); | 2658 TestObjectPythonV8Internal::locationWithPerWorldBindingsAttributeSetterForMa
inWorld(jsValue, info); |
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3453 static void locationReplaceableAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 3453 static void locationReplaceableAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
3454 { | 3454 { |
3455 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 3455 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
3456 TestObjectPythonV8Internal::locationReplaceableAttributeGetter(info); | 3456 TestObjectPythonV8Internal::locationReplaceableAttributeGetter(info); |
3457 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3457 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3458 } | 3458 } |
3459 | 3459 |
3460 static void locationReplaceableAttributeSetter(v8::Local<v8::Value> jsValue, con
st v8::PropertyCallbackInfo<void>& info) | 3460 static void locationReplaceableAttributeSetter(v8::Local<v8::Value> jsValue, con
st v8::PropertyCallbackInfo<void>& info) |
3461 { | 3461 { |
3462 TestObjectPython* proxyImp = V8TestObjectPython::toNative(info.Holder()); | 3462 TestObjectPython* proxyImp = V8TestObjectPython::toNative(info.Holder()); |
3463 TestNode* imp = WTF::getPtr(proxyImp->locationReplaceable()); | 3463 RefPtr<TestNode> imp = WTF::getPtr(proxyImp->locationReplaceable()); |
3464 if (!imp) | 3464 if (!imp) |
3465 return; | 3465 return; |
3466 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 3466 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
3467 imp->setHref(cppValue); | 3467 imp->setHref(cppValue); |
3468 } | 3468 } |
3469 | 3469 |
3470 static void locationReplaceableAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 3470 static void locationReplaceableAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
3471 { | 3471 { |
3472 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 3472 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
3473 TestObjectPythonV8Internal::locationReplaceableAttributeSetter(jsValue, info
); | 3473 TestObjectPythonV8Internal::locationReplaceableAttributeSetter(jsValue, info
); |
(...skipping 4309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7783 fromInternalPointer(object)->deref(); | 7783 fromInternalPointer(object)->deref(); |
7784 } | 7784 } |
7785 | 7785 |
7786 template<> | 7786 template<> |
7787 v8::Handle<v8::Value> toV8NoInline(TestObjectPython* impl, v8::Handle<v8::Object
> creationContext, v8::Isolate* isolate) | 7787 v8::Handle<v8::Value> toV8NoInline(TestObjectPython* impl, v8::Handle<v8::Object
> creationContext, v8::Isolate* isolate) |
7788 { | 7788 { |
7789 return toV8(impl, creationContext, isolate); | 7789 return toV8(impl, creationContext, isolate); |
7790 } | 7790 } |
7791 | 7791 |
7792 } // namespace WebCore | 7792 } // namespace WebCore |
OLD | NEW |