OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This file has been auto-generated by code_generator_v8.py. | 5 // This file has been auto-generated by code_generator_v8.py. |
6 // DO NOT MODIFY! | 6 // DO NOT MODIFY! |
7 | 7 |
8 // This file has been generated from the Jinja2 template in | 8 // This file has been generated from the Jinja2 template in |
9 // third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl | 9 // third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl |
10 | 10 |
(...skipping 2531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2542 | 2542 |
2543 TestObject* impl = V8TestObject::toImpl(holder); | 2543 TestObject* impl = V8TestObject::toImpl(holder); |
2544 | 2544 |
2545 V8SetReturnValueFast(info, WTF::GetPtr(impl->location()), impl); | 2545 V8SetReturnValueFast(info, WTF::GetPtr(impl->location()), impl); |
2546 } | 2546 } |
2547 | 2547 |
2548 static void locationAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Func
tionCallbackInfo<v8::Value>& info) { | 2548 static void locationAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Func
tionCallbackInfo<v8::Value>& info) { |
2549 v8::Isolate* isolate = info.GetIsolate(); | 2549 v8::Isolate* isolate = info.GetIsolate(); |
2550 ALLOW_UNUSED_LOCAL(isolate); | 2550 ALLOW_UNUSED_LOCAL(isolate); |
2551 | 2551 |
2552 v8::Local<v8::Object> holder = info.Holder(); | 2552 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "location"); |
2553 TestObject* proxyImpl = V8TestObject::toImpl(holder); | 2553 v8::Local<v8::Value> target; |
2554 TestNode* impl = WTF::GetPtr(proxyImpl->location()); | 2554 if (!info.Holder()->Get(info.GetIsolate()->GetCurrentContext(), V8String(info.
GetIsolate(), "location")).ToLocal(&target)) |
2555 if (!impl) | |
2556 return; | 2555 return; |
2557 | 2556 if (!target->IsObject()) { |
2558 // Prepare the value to be set. | 2557 exceptionState.ThrowTypeError("The attribute value is not an object"); |
2559 V8StringResource<> cppValue = v8Value; | |
2560 if (!cppValue.Prepare()) | |
2561 return; | 2558 return; |
2562 | 2559 } |
2563 impl->setHref(cppValue); | 2560 target.As<v8::Object>()->Set(info.GetIsolate()->GetCurrentContext(), V8String(
info.GetIsolate(), "href"), v8Value).IsNothing(); |
2564 } | 2561 } |
2565 | 2562 |
2566 static void locationWithExceptionAttributeGetter(const v8::FunctionCallbackInfo<
v8::Value>& info) { | 2563 static void locationWithExceptionAttributeGetter(const v8::FunctionCallbackInfo<
v8::Value>& info) { |
2567 v8::Local<v8::Object> holder = info.Holder(); | 2564 v8::Local<v8::Object> holder = info.Holder(); |
2568 | 2565 |
2569 TestObject* impl = V8TestObject::toImpl(holder); | 2566 TestObject* impl = V8TestObject::toImpl(holder); |
2570 | 2567 |
2571 V8SetReturnValueFast(info, WTF::GetPtr(impl->locationWithException()), impl); | 2568 V8SetReturnValueFast(info, WTF::GetPtr(impl->locationWithException()), impl); |
2572 } | 2569 } |
2573 | 2570 |
2574 static void locationWithExceptionAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::FunctionCallbackInfo<v8::Value>& info) { | 2571 static void locationWithExceptionAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::FunctionCallbackInfo<v8::Value>& info) { |
2575 v8::Isolate* isolate = info.GetIsolate(); | 2572 v8::Isolate* isolate = info.GetIsolate(); |
2576 ALLOW_UNUSED_LOCAL(isolate); | 2573 ALLOW_UNUSED_LOCAL(isolate); |
2577 | 2574 |
2578 v8::Local<v8::Object> holder = info.Holder(); | 2575 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "locationWithException"); |
2579 TestObject* proxyImpl = V8TestObject::toImpl(holder); | 2576 v8::Local<v8::Value> target; |
2580 TestNode* impl = WTF::GetPtr(proxyImpl->locationWithException()); | 2577 if (!info.Holder()->Get(info.GetIsolate()->GetCurrentContext(), V8String(info.
GetIsolate(), "locationWithException")).ToLocal(&target)) |
2581 if (!impl) | |
2582 return; | 2578 return; |
2583 | 2579 if (!target->IsObject()) { |
2584 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "locationWithException"); | 2580 exceptionState.ThrowTypeError("The attribute value is not an object"); |
2585 | |
2586 // Prepare the value to be set. | |
2587 V8StringResource<> cppValue = v8Value; | |
2588 if (!cppValue.Prepare()) | |
2589 return; | 2581 return; |
2590 | 2582 } |
2591 impl->setHrefThrows(cppValue, exceptionState); | 2583 target.As<v8::Object>()->Set(info.GetIsolate()->GetCurrentContext(), V8String(
info.GetIsolate(), "hrefThrows"), v8Value).IsNothing(); |
2592 } | 2584 } |
2593 | 2585 |
2594 static void locationWithCallWithAttributeGetter(const v8::FunctionCallbackInfo<v
8::Value>& info) { | 2586 static void locationWithCallWithAttributeGetter(const v8::FunctionCallbackInfo<v
8::Value>& info) { |
2595 v8::Local<v8::Object> holder = info.Holder(); | 2587 v8::Local<v8::Object> holder = info.Holder(); |
2596 | 2588 |
2597 TestObject* impl = V8TestObject::toImpl(holder); | 2589 TestObject* impl = V8TestObject::toImpl(holder); |
2598 | 2590 |
2599 V8SetReturnValueFast(info, WTF::GetPtr(impl->locationWithCallWith()), impl); | 2591 V8SetReturnValueFast(info, WTF::GetPtr(impl->locationWithCallWith()), impl); |
2600 } | 2592 } |
2601 | 2593 |
2602 static void locationWithCallWithAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::FunctionCallbackInfo<v8::Value>& info) { | 2594 static void locationWithCallWithAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::FunctionCallbackInfo<v8::Value>& info) { |
2603 v8::Isolate* isolate = info.GetIsolate(); | 2595 v8::Isolate* isolate = info.GetIsolate(); |
2604 ALLOW_UNUSED_LOCAL(isolate); | 2596 ALLOW_UNUSED_LOCAL(isolate); |
2605 | 2597 |
2606 v8::Local<v8::Object> holder = info.Holder(); | 2598 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "locationWithCallWith"); |
2607 TestObject* proxyImpl = V8TestObject::toImpl(holder); | 2599 v8::Local<v8::Value> target; |
2608 TestNode* impl = WTF::GetPtr(proxyImpl->locationWithCallWith()); | 2600 if (!info.Holder()->Get(info.GetIsolate()->GetCurrentContext(), V8String(info.
GetIsolate(), "locationWithCallWith")).ToLocal(&target)) |
2609 if (!impl) | |
2610 return; | 2601 return; |
2611 | 2602 if (!target->IsObject()) { |
2612 // Prepare the value to be set. | 2603 exceptionState.ThrowTypeError("The attribute value is not an object"); |
2613 V8StringResource<> cppValue = v8Value; | |
2614 if (!cppValue.Prepare()) | |
2615 return; | 2604 return; |
2616 | 2605 } |
2617 ExecutionContext* executionContext = CurrentExecutionContext(isolate); | 2606 target.As<v8::Object>()->Set(info.GetIsolate()->GetCurrentContext(), V8String(
info.GetIsolate(), "hrefCallWith"), v8Value).IsNothing(); |
2618 | |
2619 impl->setHrefCallWith(executionContext, CurrentDOMWindow(info.GetIsolate()), E
nteredDOMWindow(info.GetIsolate()), cppValue); | |
2620 } | 2607 } |
2621 | 2608 |
2622 static void locationByteStringAttributeGetter(const v8::FunctionCallbackInfo<v8:
:Value>& info) { | 2609 static void locationByteStringAttributeGetter(const v8::FunctionCallbackInfo<v8:
:Value>& info) { |
2623 v8::Local<v8::Object> holder = info.Holder(); | 2610 v8::Local<v8::Object> holder = info.Holder(); |
2624 | 2611 |
2625 TestObject* impl = V8TestObject::toImpl(holder); | 2612 TestObject* impl = V8TestObject::toImpl(holder); |
2626 | 2613 |
2627 V8SetReturnValueFast(info, WTF::GetPtr(impl->locationByteString()), impl); | 2614 V8SetReturnValueFast(info, WTF::GetPtr(impl->locationByteString()), impl); |
2628 } | 2615 } |
2629 | 2616 |
2630 static void locationByteStringAttributeSetter(v8::Local<v8::Value> v8Value, cons
t v8::FunctionCallbackInfo<v8::Value>& info) { | 2617 static void locationByteStringAttributeSetter(v8::Local<v8::Value> v8Value, cons
t v8::FunctionCallbackInfo<v8::Value>& info) { |
2631 v8::Isolate* isolate = info.GetIsolate(); | 2618 v8::Isolate* isolate = info.GetIsolate(); |
2632 ALLOW_UNUSED_LOCAL(isolate); | 2619 ALLOW_UNUSED_LOCAL(isolate); |
2633 | 2620 |
2634 v8::Local<v8::Object> holder = info.Holder(); | 2621 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "locationByteString"); |
2635 TestObject* proxyImpl = V8TestObject::toImpl(holder); | 2622 v8::Local<v8::Value> target; |
2636 TestNode* impl = WTF::GetPtr(proxyImpl->locationByteString()); | 2623 if (!info.Holder()->Get(info.GetIsolate()->GetCurrentContext(), V8String(info.
GetIsolate(), "locationByteString")).ToLocal(&target)) |
2637 if (!impl) | |
2638 return; | 2624 return; |
2639 | 2625 if (!target->IsObject()) { |
2640 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "locationByteString"); | 2626 exceptionState.ThrowTypeError("The attribute value is not an object"); |
2641 | |
2642 // Prepare the value to be set. | |
2643 V8StringResource<> cppValue = NativeValueTraits<IDLByteString>::NativeValue(in
fo.GetIsolate(), v8Value, exceptionState); | |
2644 if (exceptionState.HadException()) | |
2645 return; | 2627 return; |
2646 | 2628 } |
2647 impl->setHrefByteString(cppValue); | 2629 target.As<v8::Object>()->Set(info.GetIsolate()->GetCurrentContext(), V8String(
info.GetIsolate(), "hrefByteString"), v8Value).IsNothing(); |
2648 } | 2630 } |
2649 | 2631 |
2650 static void locationWithPerWorldBindingsAttributeGetter(const v8::FunctionCallba
ckInfo<v8::Value>& info) { | 2632 static void locationWithPerWorldBindingsAttributeGetter(const v8::FunctionCallba
ckInfo<v8::Value>& info) { |
2651 v8::Local<v8::Object> holder = info.Holder(); | 2633 v8::Local<v8::Object> holder = info.Holder(); |
2652 | 2634 |
2653 TestObject* impl = V8TestObject::toImpl(holder); | 2635 TestObject* impl = V8TestObject::toImpl(holder); |
2654 | 2636 |
2655 V8SetReturnValueFast(info, WTF::GetPtr(impl->locationWithPerWorldBindings()),
impl); | 2637 V8SetReturnValueFast(info, WTF::GetPtr(impl->locationWithPerWorldBindings()),
impl); |
2656 } | 2638 } |
2657 | 2639 |
2658 static void locationWithPerWorldBindingsAttributeSetter(v8::Local<v8::Value> v8V
alue, const v8::FunctionCallbackInfo<v8::Value>& info) { | 2640 static void locationWithPerWorldBindingsAttributeSetter(v8::Local<v8::Value> v8V
alue, const v8::FunctionCallbackInfo<v8::Value>& info) { |
2659 v8::Isolate* isolate = info.GetIsolate(); | 2641 v8::Isolate* isolate = info.GetIsolate(); |
2660 ALLOW_UNUSED_LOCAL(isolate); | 2642 ALLOW_UNUSED_LOCAL(isolate); |
2661 | 2643 |
2662 v8::Local<v8::Object> holder = info.Holder(); | 2644 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "locationWithPerWorldBindings"); |
2663 TestObject* proxyImpl = V8TestObject::toImpl(holder); | 2645 v8::Local<v8::Value> target; |
2664 TestNode* impl = WTF::GetPtr(proxyImpl->locationWithPerWorldBindings()); | 2646 if (!info.Holder()->Get(info.GetIsolate()->GetCurrentContext(), V8String(info.
GetIsolate(), "locationWithPerWorldBindings")).ToLocal(&target)) |
2665 if (!impl) | |
2666 return; | 2647 return; |
2667 | 2648 if (!target->IsObject()) { |
2668 // Prepare the value to be set. | 2649 exceptionState.ThrowTypeError("The attribute value is not an object"); |
2669 V8StringResource<> cppValue = v8Value; | |
2670 if (!cppValue.Prepare()) | |
2671 return; | 2650 return; |
2672 | 2651 } |
2673 impl->setHref(cppValue); | 2652 target.As<v8::Object>()->Set(info.GetIsolate()->GetCurrentContext(), V8String(
info.GetIsolate(), "href"), v8Value).IsNothing(); |
2674 } | 2653 } |
2675 | 2654 |
2676 static void locationWithPerWorldBindingsAttributeGetterForMainWorld(const v8::Fu
nctionCallbackInfo<v8::Value>& info) { | 2655 static void locationWithPerWorldBindingsAttributeGetterForMainWorld(const v8::Fu
nctionCallbackInfo<v8::Value>& info) { |
2677 v8::Local<v8::Object> holder = info.Holder(); | 2656 v8::Local<v8::Object> holder = info.Holder(); |
2678 | 2657 |
2679 TestObject* impl = V8TestObject::toImpl(holder); | 2658 TestObject* impl = V8TestObject::toImpl(holder); |
2680 | 2659 |
2681 V8SetReturnValueForMainWorld(info, WTF::GetPtr(impl->locationWithPerWorldBindi
ngs())); | 2660 V8SetReturnValueForMainWorld(info, WTF::GetPtr(impl->locationWithPerWorldBindi
ngs())); |
2682 } | 2661 } |
2683 | 2662 |
2684 static void locationWithPerWorldBindingsAttributeSetterForMainWorld(v8::Local<v8
::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { | 2663 static void locationWithPerWorldBindingsAttributeSetterForMainWorld(v8::Local<v8
::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { |
2685 v8::Isolate* isolate = info.GetIsolate(); | 2664 v8::Isolate* isolate = info.GetIsolate(); |
2686 ALLOW_UNUSED_LOCAL(isolate); | 2665 ALLOW_UNUSED_LOCAL(isolate); |
2687 | 2666 |
2688 v8::Local<v8::Object> holder = info.Holder(); | 2667 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "locationWithPerWorldBindings"); |
2689 TestObject* proxyImpl = V8TestObject::toImpl(holder); | 2668 v8::Local<v8::Value> target; |
2690 TestNode* impl = WTF::GetPtr(proxyImpl->locationWithPerWorldBindings()); | 2669 if (!info.Holder()->Get(info.GetIsolate()->GetCurrentContext(), V8String(info.
GetIsolate(), "locationWithPerWorldBindings")).ToLocal(&target)) |
2691 if (!impl) | |
2692 return; | 2670 return; |
2693 | 2671 if (!target->IsObject()) { |
2694 // Prepare the value to be set. | 2672 exceptionState.ThrowTypeError("The attribute value is not an object"); |
2695 V8StringResource<> cppValue = v8Value; | |
2696 if (!cppValue.Prepare()) | |
2697 return; | 2673 return; |
2698 | 2674 } |
2699 impl->setHref(cppValue); | 2675 target.As<v8::Object>()->Set(info.GetIsolate()->GetCurrentContext(), V8String(
info.GetIsolate(), "href"), v8Value).IsNothing(); |
2700 } | 2676 } |
2701 | 2677 |
2702 static void locationLegacyInterfaceTypeCheckingAttributeGetter(const v8::Functio
nCallbackInfo<v8::Value>& info) { | 2678 static void locationLegacyInterfaceTypeCheckingAttributeGetter(const v8::Functio
nCallbackInfo<v8::Value>& info) { |
2703 v8::Local<v8::Object> holder = info.Holder(); | 2679 v8::Local<v8::Object> holder = info.Holder(); |
2704 | 2680 |
2705 TestObject* impl = V8TestObject::toImpl(holder); | 2681 TestObject* impl = V8TestObject::toImpl(holder); |
2706 | 2682 |
2707 V8SetReturnValueFast(info, WTF::GetPtr(impl->locationLegacyInterfaceTypeChecki
ng()), impl); | 2683 V8SetReturnValueFast(info, WTF::GetPtr(impl->locationLegacyInterfaceTypeChecki
ng()), impl); |
2708 } | 2684 } |
2709 | 2685 |
2710 static void locationLegacyInterfaceTypeCheckingAttributeSetter(v8::Local<v8::Val
ue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { | 2686 static void locationLegacyInterfaceTypeCheckingAttributeSetter(v8::Local<v8::Val
ue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { |
2711 v8::Isolate* isolate = info.GetIsolate(); | 2687 v8::Isolate* isolate = info.GetIsolate(); |
2712 ALLOW_UNUSED_LOCAL(isolate); | 2688 ALLOW_UNUSED_LOCAL(isolate); |
2713 | 2689 |
2714 v8::Local<v8::Object> holder = info.Holder(); | 2690 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "locationLegacyInterfaceTypeChecking"); |
2715 TestObject* proxyImpl = V8TestObject::toImpl(holder); | 2691 v8::Local<v8::Value> target; |
2716 TestNode* impl = WTF::GetPtr(proxyImpl->locationLegacyInterfaceTypeChecking())
; | 2692 if (!info.Holder()->Get(info.GetIsolate()->GetCurrentContext(), V8String(info.
GetIsolate(), "locationLegacyInterfaceTypeChecking")).ToLocal(&target)) |
2717 if (!impl) | |
2718 return; | 2693 return; |
2719 | 2694 if (!target->IsObject()) { |
2720 // Prepare the value to be set. | 2695 exceptionState.ThrowTypeError("The attribute value is not an object"); |
2721 V8StringResource<> cppValue = v8Value; | |
2722 if (!cppValue.Prepare()) | |
2723 return; | 2696 return; |
2724 | 2697 } |
2725 impl->setHref(cppValue); | 2698 target.As<v8::Object>()->Set(info.GetIsolate()->GetCurrentContext(), V8String(
info.GetIsolate(), "href"), v8Value).IsNothing(); |
2726 } | 2699 } |
2727 | 2700 |
2728 static void locationGarbageCollectedAttributeGetter(const v8::FunctionCallbackIn
fo<v8::Value>& info) { | 2701 static void locationGarbageCollectedAttributeGetter(const v8::FunctionCallbackIn
fo<v8::Value>& info) { |
2729 v8::Local<v8::Object> holder = info.Holder(); | 2702 v8::Local<v8::Object> holder = info.Holder(); |
2730 | 2703 |
2731 TestObject* impl = V8TestObject::toImpl(holder); | 2704 TestObject* impl = V8TestObject::toImpl(holder); |
2732 | 2705 |
2733 TestInterfaceGarbageCollected* cppValue(WTF::GetPtr(impl->locationGarbageColle
cted())); | 2706 TestInterfaceGarbageCollected* cppValue(WTF::GetPtr(impl->locationGarbageColle
cted())); |
2734 | 2707 |
2735 // Keep the wrapper object for the return value alive as long as |this| | 2708 // Keep the wrapper object for the return value alive as long as |this| |
2736 // object is alive in order to save creation time of the wrapper object. | 2709 // object is alive in order to save creation time of the wrapper object. |
2737 if (cppValue && DOMDataStore::SetReturnValue(info.GetReturnValue(), cppValue)) | 2710 if (cppValue && DOMDataStore::SetReturnValue(info.GetReturnValue(), cppValue)) |
2738 return; | 2711 return; |
2739 v8::Local<v8::Value> v8Value(ToV8(cppValue, holder, info.GetIsolate())); | 2712 v8::Local<v8::Value> v8Value(ToV8(cppValue, holder, info.GetIsolate())); |
2740 V8PrivateProperty::GetSymbol( | 2713 V8PrivateProperty::GetSymbol( |
2741 info.GetIsolate(), "KeepAlive#TestObject#locationGarbageCollected") | 2714 info.GetIsolate(), "KeepAlive#TestObject#locationGarbageCollected") |
2742 .Set(holder, v8Value); | 2715 .Set(holder, v8Value); |
2743 | 2716 |
2744 V8SetReturnValue(info, v8Value); | 2717 V8SetReturnValue(info, v8Value); |
2745 } | 2718 } |
2746 | 2719 |
2747 static void locationGarbageCollectedAttributeSetter(v8::Local<v8::Value> v8Value
, const v8::FunctionCallbackInfo<v8::Value>& info) { | 2720 static void locationGarbageCollectedAttributeSetter(v8::Local<v8::Value> v8Value
, const v8::FunctionCallbackInfo<v8::Value>& info) { |
2748 v8::Isolate* isolate = info.GetIsolate(); | 2721 v8::Isolate* isolate = info.GetIsolate(); |
2749 ALLOW_UNUSED_LOCAL(isolate); | 2722 ALLOW_UNUSED_LOCAL(isolate); |
2750 | 2723 |
2751 v8::Local<v8::Object> holder = info.Holder(); | 2724 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "locationGarbageCollected"); |
2752 TestObject* proxyImpl = V8TestObject::toImpl(holder); | 2725 v8::Local<v8::Value> target; |
2753 TestInterfaceGarbageCollected* impl = WTF::GetPtr(proxyImpl->locationGarbageCo
llected()); | 2726 if (!info.Holder()->Get(info.GetIsolate()->GetCurrentContext(), V8String(info.
GetIsolate(), "locationGarbageCollected")).ToLocal(&target)) |
2754 if (!impl) | |
2755 return; | 2727 return; |
2756 | 2728 if (!target->IsObject()) { |
2757 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "locationGarbageCollected"); | 2729 exceptionState.ThrowTypeError("The attribute value is not an object"); |
2758 | |
2759 // Prepare the value to be set. | |
2760 TestInterfaceGarbageCollected* cppValue = V8TestInterfaceGarbageCollected::toI
mplWithTypeCheck(info.GetIsolate(), v8Value); | |
2761 | |
2762 // Type check per: http://heycam.github.io/webidl/#es-interface | |
2763 if (!cppValue) { | |
2764 exceptionState.ThrowTypeError("The provided value is not of type 'TestInterf
aceGarbageCollected'."); | |
2765 return; | 2730 return; |
2766 } | 2731 } |
2767 | 2732 target.As<v8::Object>()->Set(info.GetIsolate()->GetCurrentContext(), V8String(
info.GetIsolate(), "attr1"), v8Value).IsNothing(); |
2768 impl->setAttr1(cppValue); | |
2769 } | 2733 } |
2770 | 2734 |
2771 static void raisesExceptionLongAttributeAttributeGetter(const v8::FunctionCallba
ckInfo<v8::Value>& info) { | 2735 static void raisesExceptionLongAttributeAttributeGetter(const v8::FunctionCallba
ckInfo<v8::Value>& info) { |
2772 v8::Local<v8::Object> holder = info.Holder(); | 2736 v8::Local<v8::Object> holder = info.Holder(); |
2773 | 2737 |
2774 TestObject* impl = V8TestObject::toImpl(holder); | 2738 TestObject* impl = V8TestObject::toImpl(holder); |
2775 | 2739 |
2776 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::kGetterContex
t, "TestObject", "raisesExceptionLongAttribute"); | 2740 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::kGetterContex
t, "TestObject", "raisesExceptionLongAttribute"); |
2777 | 2741 |
2778 int32_t cppValue(impl->raisesExceptionLongAttribute(exceptionState)); | 2742 int32_t cppValue(impl->raisesExceptionLongAttribute(exceptionState)); |
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3540 | 3504 |
3541 TestObject* impl = V8TestObject::toImpl(holder); | 3505 TestObject* impl = V8TestObject::toImpl(holder); |
3542 | 3506 |
3543 V8SetReturnValueFast(info, WTF::GetPtr(impl->locationPutForwards()), impl); | 3507 V8SetReturnValueFast(info, WTF::GetPtr(impl->locationPutForwards()), impl); |
3544 } | 3508 } |
3545 | 3509 |
3546 static void locationPutForwardsAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::FunctionCallbackInfo<v8::Value>& info) { | 3510 static void locationPutForwardsAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::FunctionCallbackInfo<v8::Value>& info) { |
3547 v8::Isolate* isolate = info.GetIsolate(); | 3511 v8::Isolate* isolate = info.GetIsolate(); |
3548 ALLOW_UNUSED_LOCAL(isolate); | 3512 ALLOW_UNUSED_LOCAL(isolate); |
3549 | 3513 |
3550 v8::Local<v8::Object> holder = info.Holder(); | 3514 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestOb
ject", "locationPutForwards"); |
3551 TestObject* proxyImpl = V8TestObject::toImpl(holder); | 3515 v8::Local<v8::Value> target; |
3552 TestNode* impl = WTF::GetPtr(proxyImpl->locationPutForwards()); | 3516 if (!info.Holder()->Get(info.GetIsolate()->GetCurrentContext(), V8String(info.
GetIsolate(), "locationPutForwards")).ToLocal(&target)) |
3553 if (!impl) | |
3554 return; | 3517 return; |
3555 | 3518 if (!target->IsObject()) { |
3556 // Prepare the value to be set. | 3519 exceptionState.ThrowTypeError("The attribute value is not an object"); |
3557 V8StringResource<> cppValue = v8Value; | |
3558 if (!cppValue.Prepare()) | |
3559 return; | 3520 return; |
3560 | 3521 } |
3561 impl->setHref(cppValue); | 3522 target.As<v8::Object>()->Set(info.GetIsolate()->GetCurrentContext(), V8String(
info.GetIsolate(), "href"), v8Value).IsNothing(); |
3562 } | 3523 } |
3563 | 3524 |
3564 static void runtimeEnabledLongAttributeAttributeGetter(const v8::FunctionCallbac
kInfo<v8::Value>& info) { | 3525 static void runtimeEnabledLongAttributeAttributeGetter(const v8::FunctionCallbac
kInfo<v8::Value>& info) { |
3565 v8::Local<v8::Object> holder = info.Holder(); | 3526 v8::Local<v8::Object> holder = info.Holder(); |
3566 | 3527 |
3567 TestObject* impl = V8TestObject::toImpl(holder); | 3528 TestObject* impl = V8TestObject::toImpl(holder); |
3568 | 3529 |
3569 V8SetReturnValueInt(info, impl->runtimeEnabledLongAttribute()); | 3530 V8SetReturnValueInt(info, impl->runtimeEnabledLongAttribute()); |
3570 } | 3531 } |
3571 | 3532 |
(...skipping 8903 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12475 unscopables->CreateDataProperty(context, V8AtomicString(isolate, "unscopable
RuntimeEnabledLongAttribute"), v8::True(isolate)).FromJust(); | 12436 unscopables->CreateDataProperty(context, V8AtomicString(isolate, "unscopable
RuntimeEnabledLongAttribute"), v8::True(isolate)).FromJust(); |
12476 } | 12437 } |
12477 if (RuntimeEnabledFeatures::featureNameEnabled()) { | 12438 if (RuntimeEnabledFeatures::featureNameEnabled()) { |
12478 unscopables->CreateDataProperty(context, V8AtomicString(isolate, "unscopable
RuntimeEnabledVoidMethod"), v8::True(isolate)).FromJust(); | 12439 unscopables->CreateDataProperty(context, V8AtomicString(isolate, "unscopable
RuntimeEnabledVoidMethod"), v8::True(isolate)).FromJust(); |
12479 } | 12440 } |
12480 unscopables->CreateDataProperty(context, V8AtomicString(isolate, "unscopableVo
idMethod"), v8::True(isolate)).FromJust(); | 12441 unscopables->CreateDataProperty(context, V8AtomicString(isolate, "unscopableVo
idMethod"), v8::True(isolate)).FromJust(); |
12481 prototypeObject->CreateDataProperty(context, unscopablesSymbol, unscopables).F
romJust(); | 12442 prototypeObject->CreateDataProperty(context, unscopablesSymbol, unscopables).F
romJust(); |
12482 } | 12443 } |
12483 | 12444 |
12484 } // namespace blink | 12445 } // namespace blink |
OLD | NEW |