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. DO NOT MODIFY! | 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! |
6 | 6 |
7 #include "config.h" | 7 #include "config.h" |
8 #include "V8TestObject.h" | 8 #include "V8TestObject.h" |
9 | 9 |
10 #include "bindings/core/v8/BindingSecurity.h" | 10 #include "bindings/core/v8/BindingSecurity.h" |
(...skipping 2859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2870 impl->setNotEnumerableLongAttribute(cppValue); | 2870 impl->setNotEnumerableLongAttribute(cppValue); |
2871 } | 2871 } |
2872 | 2872 |
2873 static void notEnumerableLongAttributeAttributeSetterCallback(v8::Local<v8::Name
>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 2873 static void notEnumerableLongAttributeAttributeSetterCallback(v8::Local<v8::Name
>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
2874 { | 2874 { |
2875 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2875 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
2876 TestObjectV8Internal::notEnumerableLongAttributeAttributeSetter(v8Value, inf
o); | 2876 TestObjectV8Internal::notEnumerableLongAttributeAttributeSetter(v8Value, inf
o); |
2877 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2877 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
2878 } | 2878 } |
2879 | 2879 |
2880 static void perContextEnabledLongAttributeAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) | |
2881 { | |
2882 v8::Local<v8::Object> holder = info.Holder(); | |
2883 TestObject* impl = V8TestObject::toImpl(holder); | |
2884 v8SetReturnValueInt(info, impl->perContextEnabledLongAttribute()); | |
2885 } | |
2886 | |
2887 static void perContextEnabledLongAttributeAttributeGetterCallback(v8::Local<v8::
Name>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
2888 { | |
2889 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
2890 TestObjectV8Internal::perContextEnabledLongAttributeAttributeGetter(info); | |
2891 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
2892 } | |
2893 | |
2894 static void perContextEnabledLongAttributeAttributeSetter(v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<void>& info) | |
2895 { | |
2896 v8::Local<v8::Object> holder = info.Holder(); | |
2897 ExceptionState exceptionState(ExceptionState::SetterContext, "perContextEnab
ledLongAttribute", "TestObject", holder, info.GetIsolate()); | |
2898 TestObject* impl = V8TestObject::toImpl(holder); | |
2899 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | |
2900 if (exceptionState.throwIfNeeded()) | |
2901 return; | |
2902 impl->setPerContextEnabledLongAttribute(cppValue); | |
2903 } | |
2904 | |
2905 static void perContextEnabledLongAttributeAttributeSetterCallback(v8::Local<v8::
Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
2906 { | |
2907 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
2908 TestObjectV8Internal::perContextEnabledLongAttributeAttributeSetter(v8Value,
info); | |
2909 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
2910 } | |
2911 | |
2912 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetter(c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 2880 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetter(c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
2913 { | 2881 { |
2914 v8::Local<v8::Object> holder = info.Holder(); | 2882 v8::Local<v8::Object> holder = info.Holder(); |
2915 TestObject* impl = V8TestObject::toImpl(holder); | 2883 TestObject* impl = V8TestObject::toImpl(holder); |
2916 RefPtr<TestInterfaceEmpty> cppValue(impl->perWorldBindingsReadonlyTestInterf
aceEmptyAttribute()); | 2884 RefPtr<TestInterfaceEmpty> cppValue(impl->perWorldBindingsReadonlyTestInterf
aceEmptyAttribute()); |
2917 if (cppValue && DOMDataStore::setReturnValue(info.GetReturnValue(), cppValue
.get())) | 2885 if (cppValue && DOMDataStore::setReturnValue(info.GetReturnValue(), cppValue
.get())) |
2918 return; | 2886 return; |
2919 v8::Local<v8::Value> v8Value(toV8(cppValue.get(), holder, info.GetIsolate())
); | 2887 v8::Local<v8::Value> v8Value(toV8(cppValue.get(), holder, info.GetIsolate())
); |
2920 if (!v8Value.IsEmpty()) { | 2888 if (!v8Value.IsEmpty()) { |
2921 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(
info.GetIsolate(), "perWorldBindingsReadonlyTestInterfaceEmptyAttribute"), v8Val
ue); | 2889 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(
info.GetIsolate(), "perWorldBindingsReadonlyTestInterfaceEmptyAttribute"), v8Val
ue); |
(...skipping 1614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4536 impl->setRuntimeEnabledLongAttribute(cppValue); | 4504 impl->setRuntimeEnabledLongAttribute(cppValue); |
4537 } | 4505 } |
4538 | 4506 |
4539 static void runtimeEnabledLongAttributeAttributeSetterCallback(v8::Local<v8::Nam
e>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4507 static void runtimeEnabledLongAttributeAttributeSetterCallback(v8::Local<v8::Nam
e>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
4540 { | 4508 { |
4541 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4509 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
4542 TestObjectV8Internal::runtimeEnabledLongAttributeAttributeSetter(v8Value, in
fo); | 4510 TestObjectV8Internal::runtimeEnabledLongAttributeAttributeSetter(v8Value, in
fo); |
4543 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4511 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
4544 } | 4512 } |
4545 | 4513 |
4546 static void perContextEnabledRuntimeEnabledLongAttributeAttributeGetter(const v8
::PropertyCallbackInfo<v8::Value>& info) | |
4547 { | |
4548 v8::Local<v8::Object> holder = info.Holder(); | |
4549 TestObject* impl = V8TestObject::toImpl(holder); | |
4550 v8SetReturnValueInt(info, impl->perContextEnabledRuntimeEnabledLongAttribute
()); | |
4551 } | |
4552 | |
4553 static void perContextEnabledRuntimeEnabledLongAttributeAttributeGetterCallback(
v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
4554 { | |
4555 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
4556 TestObjectV8Internal::perContextEnabledRuntimeEnabledLongAttributeAttributeG
etter(info); | |
4557 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
4558 } | |
4559 | |
4560 static void perContextEnabledRuntimeEnabledLongAttributeAttributeSetter(v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
4561 { | |
4562 v8::Local<v8::Object> holder = info.Holder(); | |
4563 ExceptionState exceptionState(ExceptionState::SetterContext, "perContextEnab
ledRuntimeEnabledLongAttribute", "TestObject", holder, info.GetIsolate()); | |
4564 TestObject* impl = V8TestObject::toImpl(holder); | |
4565 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | |
4566 if (exceptionState.throwIfNeeded()) | |
4567 return; | |
4568 impl->setPerContextEnabledRuntimeEnabledLongAttribute(cppValue); | |
4569 } | |
4570 | |
4571 static void perContextEnabledRuntimeEnabledLongAttributeAttributeSetterCallback(
v8::Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInf
o<void>& info) | |
4572 { | |
4573 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
4574 TestObjectV8Internal::perContextEnabledRuntimeEnabledLongAttributeAttributeS
etter(v8Value, info); | |
4575 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
4576 } | |
4577 | |
4578 #if ENABLE(CONDITION) | 4514 #if ENABLE(CONDITION) |
4579 static void conditionalRuntimeEnabledLongAttributeAttributeGetter(const v8::Prop
ertyCallbackInfo<v8::Value>& info) | 4515 static void conditionalRuntimeEnabledLongAttributeAttributeGetter(const v8::Prop
ertyCallbackInfo<v8::Value>& info) |
4580 { | 4516 { |
4581 v8::Local<v8::Object> holder = info.Holder(); | 4517 v8::Local<v8::Object> holder = info.Holder(); |
4582 TestObject* impl = V8TestObject::toImpl(holder); | 4518 TestObject* impl = V8TestObject::toImpl(holder); |
4583 v8SetReturnValueInt(info, impl->conditionalRuntimeEnabledLongAttribute()); | 4519 v8SetReturnValueInt(info, impl->conditionalRuntimeEnabledLongAttribute()); |
4584 } | 4520 } |
4585 #endif // ENABLE(CONDITION) | 4521 #endif // ENABLE(CONDITION) |
4586 | 4522 |
4587 #if ENABLE(CONDITION) | 4523 #if ENABLE(CONDITION) |
(...skipping 6027 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10615 impl->notEnumerableVoidMethod(); | 10551 impl->notEnumerableVoidMethod(); |
10616 } | 10552 } |
10617 | 10553 |
10618 static void notEnumerableVoidMethodMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | 10554 static void notEnumerableVoidMethodMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) |
10619 { | 10555 { |
10620 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 10556 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
10621 TestObjectV8Internal::notEnumerableVoidMethodMethod(info); | 10557 TestObjectV8Internal::notEnumerableVoidMethodMethod(info); |
10622 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 10558 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
10623 } | 10559 } |
10624 | 10560 |
10625 static void perContextEnabledVoidMethodMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | |
10626 { | |
10627 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
10628 impl->perContextEnabledVoidMethod(); | |
10629 } | |
10630 | |
10631 static void perContextEnabledVoidMethodMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | |
10632 { | |
10633 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
10634 TestObjectV8Internal::perContextEnabledVoidMethodMethod(info); | |
10635 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
10636 } | |
10637 | |
10638 static void perWorldBindingsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::
Value>& info) | 10561 static void perWorldBindingsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::
Value>& info) |
10639 { | 10562 { |
10640 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 10563 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
10641 impl->perWorldBindingsVoidMethod(); | 10564 impl->perWorldBindingsVoidMethod(); |
10642 } | 10565 } |
10643 | 10566 |
10644 static void perWorldBindingsVoidMethodMethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 10567 static void perWorldBindingsVoidMethodMethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
10645 { | 10568 { |
10646 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 10569 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
10647 TestObjectV8Internal::perWorldBindingsVoidMethodMethod(info); | 10570 TestObjectV8Internal::perWorldBindingsVoidMethodMethod(info); |
(...skipping 2098 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12746 v8::Local<v8::Object> V8TestObject::findInstanceInPrototypeChain(v8::Local<v8::V
alue> v8Value, v8::Isolate* isolate) | 12669 v8::Local<v8::Object> V8TestObject::findInstanceInPrototypeChain(v8::Local<v8::V
alue> v8Value, v8::Isolate* isolate) |
12747 { | 12670 { |
12748 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); | 12671 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); |
12749 } | 12672 } |
12750 | 12673 |
12751 TestObject* V8TestObject::toImplWithTypeCheck(v8::Isolate* isolate, v8::Local<v8
::Value> value) | 12674 TestObject* V8TestObject::toImplWithTypeCheck(v8::Isolate* isolate, v8::Local<v8
::Value> value) |
12752 { | 12675 { |
12753 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu
e)) : 0; | 12676 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu
e)) : 0; |
12754 } | 12677 } |
12755 | 12678 |
12756 void V8TestObject::installConditionallyEnabledProperties(v8::Local<v8::Object> i
nstanceObject, v8::Isolate* isolate) | |
12757 { | |
12758 v8::Local<v8::Object> prototypeObject = v8::Local<v8::Object>::Cast(instance
Object->GetPrototype()); | |
12759 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont
ext()); | |
12760 | |
12761 if (context && context->isDocument() && ContextFeatures::featureNameEnabled(
toDocument(context))) { | |
12762 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration = {"perContextEnabledLongAttribute", TestObjectV8Internal::perContextEnab
ledLongAttributeAttributeGetterCallback, TestObjectV8Internal::perContextEnabled
LongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8
::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::Ex
posedToAllScripts, V8DOMConfiguration::OnInstance}; | |
12763 V8DOMConfiguration::installAttribute(isolate, instanceObject, prototypeO
bject, attributeConfiguration); | |
12764 } | |
12765 if (context && context->isDocument() && ContextFeatures::featureNameEnabled(
toDocument(context))) { | |
12766 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration = {"perContextEnabledRuntimeEnabledLongAttribute", TestObjectV8Internal::
perContextEnabledRuntimeEnabledLongAttributeAttributeGetterCallback, TestObjectV
8Internal::perContextEnabledRuntimeEnabledLongAttributeAttributeSetterCallback,
0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAt
tribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration:
:OnInstance}; | |
12767 V8DOMConfiguration::installAttribute(isolate, instanceObject, prototypeO
bject, attributeConfiguration); | |
12768 } | |
12769 } | |
12770 | |
12771 void V8TestObject::installConditionallyEnabledMethods(v8::Local<v8::Object> prot
otypeObject, v8::Isolate* isolate) | |
12772 { | |
12773 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT
emplate(isolate)); | |
12774 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont
ext()); | |
12775 ASSERT(context); | |
12776 | |
12777 if (context && context->isDocument() && ContextFeatures::featureNameEnabled(
toDocument(context))) { | |
12778 prototypeObject->Set(v8AtomicString(isolate, "perContextEnabledVoidMetho
d"), v8::FunctionTemplate::New(isolate, TestObjectV8Internal::perContextEnabledV
oidMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction(isolat
e->GetCurrentContext()).ToLocalChecked()); | |
12779 } | |
12780 } | |
12781 | |
12782 void V8TestObject::refObject(ScriptWrappable* scriptWrappable) | 12679 void V8TestObject::refObject(ScriptWrappable* scriptWrappable) |
12783 { | 12680 { |
12784 scriptWrappable->toImpl<TestObject>()->ref(); | 12681 scriptWrappable->toImpl<TestObject>()->ref(); |
12785 } | 12682 } |
12786 | 12683 |
12787 void V8TestObject::derefObject(ScriptWrappable* scriptWrappable) | 12684 void V8TestObject::derefObject(ScriptWrappable* scriptWrappable) |
12788 { | 12685 { |
12789 scriptWrappable->toImpl<TestObject>()->deref(); | 12686 scriptWrappable->toImpl<TestObject>()->deref(); |
12790 } | 12687 } |
12791 | 12688 |
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13272 return false; | 13169 return false; |
13273 | 13170 |
13274 ScriptState::Scope scope(scriptState); | 13171 ScriptState::Scope scope(scriptState); |
13275 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa
l(), scriptState->isolate()); | 13172 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa
l(), scriptState->isolate()); |
13276 | 13173 |
13277 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate
Script", "TestObject", scriptState->context()->Global(), scriptState->isolate())
; | 13174 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate
Script", "TestObject", scriptState->context()->Global(), scriptState->isolate())
; |
13278 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn
UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState->
isolate(), cppValue)); | 13175 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn
UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState->
isolate(), cppValue)); |
13279 } | 13176 } |
13280 | 13177 |
13281 } // namespace blink | 13178 } // namespace blink |
OLD | NEW |