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 "V8TestInterfaceOwnPropertiesDerived.h" | 8 #include "V8TestInterfaceOwnPropertiesDerived.h" |
9 | 9 |
10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 #pragma clang diagnostic pop | 30 #pragma clang diagnostic pop |
31 #endif | 31 #endif |
32 | 32 |
33 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac
eOwnPropertiesDerived.h. | 33 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac
eOwnPropertiesDerived.h. |
34 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in | 34 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in |
35 // bindings/core/v8/ScriptWrappable.h. | 35 // bindings/core/v8/ScriptWrappable.h. |
36 const WrapperTypeInfo& TestInterfaceOwnPropertiesDerived::s_wrapperTypeInfo = V8
TestInterfaceOwnPropertiesDerived::wrapperTypeInfo; | 36 const WrapperTypeInfo& TestInterfaceOwnPropertiesDerived::s_wrapperTypeInfo = V8
TestInterfaceOwnPropertiesDerived::wrapperTypeInfo; |
37 | 37 |
38 namespace TestInterfaceOwnPropertiesDerivedV8Internal { | 38 namespace TestInterfaceOwnPropertiesDerivedV8Internal { |
39 | 39 |
40 static void noExposeJSAccessorAttributeAttributeGetter(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 40 static void noExposeJSAccessorAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) |
41 { | 41 { |
42 v8::Local<v8::Object> holder = info.Holder(); | 42 v8::Local<v8::Object> holder = info.Holder(); |
43 TestInterfaceOwnPropertiesDerived* impl = V8TestInterfaceOwnPropertiesDerive
d::toImpl(holder); | 43 TestInterfaceOwnPropertiesDerived* impl = V8TestInterfaceOwnPropertiesDerive
d::toImpl(holder); |
44 v8SetReturnValueInt(info, impl->noExposeJSAccessorAttribute()); | 44 v8SetReturnValueInt(info, impl->noExposeJSAccessorAttribute()); |
45 } | 45 } |
46 | 46 |
47 static void noExposeJSAccessorAttributeAttributeGetterCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) | 47 static void noExposeJSAccessorAttributeAttributeGetterCallback(v8::Local<v8::Nam
e>, const v8::PropertyCallbackInfo<v8::Value>& info) |
48 { | 48 { |
49 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 49 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
50 TestInterfaceOwnPropertiesDerivedV8Internal::noExposeJSAccessorAttributeAttr
ibuteGetter(info); | 50 TestInterfaceOwnPropertiesDerivedV8Internal::noExposeJSAccessorAttributeAttr
ibuteGetter(info); |
51 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 51 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
52 } | 52 } |
53 | 53 |
54 static void noExposeJSAccessorAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::FunctionCallbackInfo<v8::Value>& info) | 54 static void noExposeJSAccessorAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) |
55 { | 55 { |
56 v8::Local<v8::Object> holder = info.Holder(); | 56 v8::Local<v8::Object> holder = info.Holder(); |
57 ExceptionState exceptionState(ExceptionState::SetterContext, "noExposeJSAcce
ssorAttribute", "TestInterfaceOwnPropertiesDerived", holder, info.GetIsolate()); | 57 ExceptionState exceptionState(ExceptionState::SetterContext, "noExposeJSAcce
ssorAttribute", "TestInterfaceOwnPropertiesDerived", holder, info.GetIsolate()); |
58 TestInterfaceOwnPropertiesDerived* impl = V8TestInterfaceOwnPropertiesDerive
d::toImpl(holder); | 58 TestInterfaceOwnPropertiesDerived* impl = V8TestInterfaceOwnPropertiesDerive
d::toImpl(holder); |
59 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 59 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
60 if (exceptionState.throwIfNeeded()) | 60 if (exceptionState.throwIfNeeded()) |
61 return; | 61 return; |
62 impl->setNoExposeJSAccessorAttribute(cppValue); | 62 impl->setNoExposeJSAccessorAttribute(cppValue); |
63 } | 63 } |
64 | 64 |
65 static void noExposeJSAccessorAttributeAttributeSetterCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) | 65 static void noExposeJSAccessorAttributeAttributeSetterCallback(v8::Local<v8::Nam
e>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
66 { | 66 { |
67 v8::Local<v8::Value> v8Value = info[0]; | |
68 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 67 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
69 TestInterfaceOwnPropertiesDerivedV8Internal::noExposeJSAccessorAttributeAttr
ibuteSetter(v8Value, info); | 68 TestInterfaceOwnPropertiesDerivedV8Internal::noExposeJSAccessorAttributeAttr
ibuteSetter(v8Value, info); |
70 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 69 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
71 } | 70 } |
72 | 71 |
73 static void exposeJSAccessorAttributeAttributeGetter(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 72 static void exposeJSAccessorAttributeAttributeGetter(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
74 { | 73 { |
75 v8::Local<v8::Object> holder = info.Holder(); | 74 v8::Local<v8::Object> holder = info.Holder(); |
76 TestInterfaceOwnPropertiesDerived* impl = V8TestInterfaceOwnPropertiesDerive
d::toImpl(holder); | 75 TestInterfaceOwnPropertiesDerived* impl = V8TestInterfaceOwnPropertiesDerive
d::toImpl(holder); |
77 v8SetReturnValueInt(info, impl->exposeJSAccessorAttribute()); | 76 v8SetReturnValueInt(info, impl->exposeJSAccessorAttribute()); |
(...skipping 18 matching lines...) Expand all Loading... |
96 } | 95 } |
97 | 96 |
98 static void exposeJSAccessorAttributeAttributeSetterCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) | 97 static void exposeJSAccessorAttributeAttributeSetterCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) |
99 { | 98 { |
100 v8::Local<v8::Value> v8Value = info[0]; | 99 v8::Local<v8::Value> v8Value = info[0]; |
101 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 100 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
102 TestInterfaceOwnPropertiesDerivedV8Internal::exposeJSAccessorAttributeAttrib
uteSetter(v8Value, info); | 101 TestInterfaceOwnPropertiesDerivedV8Internal::exposeJSAccessorAttributeAttrib
uteSetter(v8Value, info); |
103 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 102 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
104 } | 103 } |
105 | 104 |
106 static void doNotExposeJSAccessorAttributeAttributeGetter(const v8::FunctionCall
backInfo<v8::Value>& info) | 105 static void doNotExposeJSAccessorAttributeAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) |
107 { | 106 { |
108 v8::Local<v8::Object> holder = info.Holder(); | 107 v8::Local<v8::Object> holder = info.Holder(); |
109 TestInterfaceOwnPropertiesDerived* impl = V8TestInterfaceOwnPropertiesDerive
d::toImpl(holder); | 108 TestInterfaceOwnPropertiesDerived* impl = V8TestInterfaceOwnPropertiesDerive
d::toImpl(holder); |
110 v8SetReturnValueInt(info, impl->doNotExposeJSAccessorAttribute()); | 109 v8SetReturnValueInt(info, impl->doNotExposeJSAccessorAttribute()); |
111 } | 110 } |
112 | 111 |
113 static void doNotExposeJSAccessorAttributeAttributeGetterCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) | 112 static void doNotExposeJSAccessorAttributeAttributeGetterCallback(v8::Local<v8::
Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
114 { | 113 { |
115 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 114 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
116 TestInterfaceOwnPropertiesDerivedV8Internal::doNotExposeJSAccessorAttributeA
ttributeGetter(info); | 115 TestInterfaceOwnPropertiesDerivedV8Internal::doNotExposeJSAccessorAttributeA
ttributeGetter(info); |
117 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 116 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
118 } | 117 } |
119 | 118 |
120 static void doNotExposeJSAccessorAttributeAttributeSetter(v8::Local<v8::Value> v
8Value, const v8::FunctionCallbackInfo<v8::Value>& info) | 119 static void doNotExposeJSAccessorAttributeAttributeSetter(v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<void>& info) |
121 { | 120 { |
122 v8::Local<v8::Object> holder = info.Holder(); | 121 v8::Local<v8::Object> holder = info.Holder(); |
123 ExceptionState exceptionState(ExceptionState::SetterContext, "doNotExposeJSA
ccessorAttribute", "TestInterfaceOwnPropertiesDerived", holder, info.GetIsolate(
)); | 122 ExceptionState exceptionState(ExceptionState::SetterContext, "doNotExposeJSA
ccessorAttribute", "TestInterfaceOwnPropertiesDerived", holder, info.GetIsolate(
)); |
124 TestInterfaceOwnPropertiesDerived* impl = V8TestInterfaceOwnPropertiesDerive
d::toImpl(holder); | 123 TestInterfaceOwnPropertiesDerived* impl = V8TestInterfaceOwnPropertiesDerive
d::toImpl(holder); |
125 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 124 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
126 if (exceptionState.throwIfNeeded()) | 125 if (exceptionState.throwIfNeeded()) |
127 return; | 126 return; |
128 impl->setDoNotExposeJSAccessorAttribute(cppValue); | 127 impl->setDoNotExposeJSAccessorAttribute(cppValue); |
129 } | 128 } |
130 | 129 |
131 static void doNotExposeJSAccessorAttributeAttributeSetterCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) | 130 static void doNotExposeJSAccessorAttributeAttributeSetterCallback(v8::Local<v8::
Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
132 { | 131 { |
133 v8::Local<v8::Value> v8Value = info[0]; | |
134 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 132 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
135 TestInterfaceOwnPropertiesDerivedV8Internal::doNotExposeJSAccessorAttributeA
ttributeSetter(v8Value, info); | 133 TestInterfaceOwnPropertiesDerivedV8Internal::doNotExposeJSAccessorAttributeA
ttributeSetter(v8Value, info); |
136 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 134 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
137 } | 135 } |
138 | 136 |
139 } // namespace TestInterfaceOwnPropertiesDerivedV8Internal | 137 } // namespace TestInterfaceOwnPropertiesDerivedV8Internal |
140 | 138 |
| 139 // Suppress warning: global constructors, because AttributeConfiguration is triv
ial |
| 140 // and does not depend on another global objects. |
| 141 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
| 142 #pragma clang diagnostic push |
| 143 #pragma clang diagnostic ignored "-Wglobal-constructors" |
| 144 #endif |
| 145 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceOwnProper
tiesDerivedAttributes[] = { |
| 146 {"noExposeJSAccessorAttribute", TestInterfaceOwnPropertiesDerivedV8Internal:
:noExposeJSAccessorAttributeAttributeGetterCallback, TestInterfaceOwnPropertiesD
erivedV8Internal::noExposeJSAccessorAttributeAttributeSetterCallback, 0, 0, 0, s
tatic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v
8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstanc
e, V8DOMConfiguration::CheckHolder}, |
| 147 {"doNotExposeJSAccessorAttribute", TestInterfaceOwnPropertiesDerivedV8Intern
al::doNotExposeJSAccessorAttributeAttributeGetterCallback, TestInterfaceOwnPrope
rtiesDerivedV8Internal::doNotExposeJSAccessorAttributeAttributeSetterCallback, 0
, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAtt
ribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::
OnInstance, V8DOMConfiguration::CheckHolder}, |
| 148 }; |
| 149 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
| 150 #pragma clang diagnostic pop |
| 151 #endif |
| 152 |
141 static const V8DOMConfiguration::AccessorConfiguration V8TestInterfaceOwnPropert
iesDerivedAccessors[] = { | 153 static const V8DOMConfiguration::AccessorConfiguration V8TestInterfaceOwnPropert
iesDerivedAccessors[] = { |
142 {"noExposeJSAccessorAttribute", TestInterfaceOwnPropertiesDerivedV8Internal:
:noExposeJSAccessorAttributeAttributeGetterCallback, TestInterfaceOwnPropertiesD
erivedV8Internal::noExposeJSAccessorAttributeAttributeSetterCallback, 0, 0, 0, v
8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::Ex
posedToAllScripts, V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHold
er}, | 154 {"exposeJSAccessorAttribute", TestInterfaceOwnPropertiesDerivedV8Internal::e
xposeJSAccessorAttributeAttributeGetterCallback, TestInterfaceOwnPropertiesDeriv
edV8Internal::exposeJSAccessorAttributeAttributeSetterCallback, 0, 0, 0, static_
cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::Non
e), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8
DOMConfiguration::CheckHolder}, |
143 {"exposeJSAccessorAttribute", TestInterfaceOwnPropertiesDerivedV8Internal::e
xposeJSAccessorAttributeAttributeGetterCallback, TestInterfaceOwnPropertiesDeriv
edV8Internal::exposeJSAccessorAttributeAttributeSetterCallback, 0, 0, 0, v8::DEF
AULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedT
oAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, | |
144 {"doNotExposeJSAccessorAttribute", TestInterfaceOwnPropertiesDerivedV8Intern
al::doNotExposeJSAccessorAttributeAttributeGetterCallback, TestInterfaceOwnPrope
rtiesDerivedV8Internal::doNotExposeJSAccessorAttributeAttributeSetterCallback, 0
, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigur
ation::ExposedToAllScripts, V8DOMConfiguration::OnInstance, V8DOMConfiguration::
CheckHolder}, | |
145 }; | 155 }; |
146 | 156 |
147 static void installV8TestInterfaceOwnPropertiesDerivedTemplate(v8::Local<v8::Fun
ctionTemplate> functionTemplate, v8::Isolate* isolate) | 157 static void installV8TestInterfaceOwnPropertiesDerivedTemplate(v8::Local<v8::Fun
ctionTemplate> functionTemplate, v8::Isolate* isolate) |
148 { | 158 { |
149 functionTemplate->ReadOnlyPrototype(); | 159 functionTemplate->ReadOnlyPrototype(); |
150 | 160 |
151 v8::Local<v8::Signature> defaultSignature; | 161 v8::Local<v8::Signature> defaultSignature; |
152 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func
tionTemplate, "TestInterfaceOwnPropertiesDerived", V8TestInterfaceOwnProperties:
:domTemplate(isolate), V8TestInterfaceOwnPropertiesDerived::internalFieldCount, | 162 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func
tionTemplate, "TestInterfaceOwnPropertiesDerived", V8TestInterfaceOwnProperties:
:domTemplate(isolate), V8TestInterfaceOwnPropertiesDerived::internalFieldCount, |
153 0, 0, | 163 V8TestInterfaceOwnPropertiesDerivedAttributes, WTF_ARRAY_LENGTH(V8TestIn
terfaceOwnPropertiesDerivedAttributes), |
154 V8TestInterfaceOwnPropertiesDerivedAccessors, WTF_ARRAY_LENGTH(V8TestInt
erfaceOwnPropertiesDerivedAccessors), | 164 V8TestInterfaceOwnPropertiesDerivedAccessors, WTF_ARRAY_LENGTH(V8TestInt
erfaceOwnPropertiesDerivedAccessors), |
155 0, 0); | 165 0, 0); |
156 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT
emplate(); | 166 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT
emplate(); |
157 ALLOW_UNUSED_LOCAL(instanceTemplate); | 167 ALLOW_UNUSED_LOCAL(instanceTemplate); |
158 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp
eTemplate(); | 168 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp
eTemplate(); |
159 ALLOW_UNUSED_LOCAL(prototypeTemplate); | 169 ALLOW_UNUSED_LOCAL(prototypeTemplate); |
160 | 170 |
161 // Custom toString template | 171 // Custom toString template |
162 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData:
:from(isolate)->toStringTemplate()); | 172 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData:
:from(isolate)->toStringTemplate()); |
163 } | 173 } |
(...skipping 22 matching lines...) Expand all Loading... |
186 { | 196 { |
187 scriptWrappable->toImpl<TestInterfaceOwnPropertiesDerived>()->ref(); | 197 scriptWrappable->toImpl<TestInterfaceOwnPropertiesDerived>()->ref(); |
188 } | 198 } |
189 | 199 |
190 void V8TestInterfaceOwnPropertiesDerived::derefObject(ScriptWrappable* scriptWra
ppable) | 200 void V8TestInterfaceOwnPropertiesDerived::derefObject(ScriptWrappable* scriptWra
ppable) |
191 { | 201 { |
192 scriptWrappable->toImpl<TestInterfaceOwnPropertiesDerived>()->deref(); | 202 scriptWrappable->toImpl<TestInterfaceOwnPropertiesDerived>()->deref(); |
193 } | 203 } |
194 | 204 |
195 } // namespace blink | 205 } // namespace blink |
OLD | NEW |