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::PropertyCallbac
kInfo<v8::Value>& info) | 40 static void noExposeJSAccessorAttributeAttributeGetter(const v8::FunctionCallbac
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(v8::Local<v8::Nam
e>, const v8::PropertyCallbackInfo<v8::Value>& info) | 47 static void noExposeJSAccessorAttributeAttributeGetterCallback(const v8::Functio
nCallbackInfo<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::PropertyCallbackInfo<void>& info) | 54 static void noExposeJSAccessorAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::FunctionCallbackInfo<v8::Value>& 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(v8::Local<v8::Nam
e>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 65 static void noExposeJSAccessorAttributeAttributeSetterCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) |
66 { | 66 { |
| 67 v8::Local<v8::Value> v8Value = info[0]; |
67 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 68 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
68 TestInterfaceOwnPropertiesDerivedV8Internal::noExposeJSAccessorAttributeAttr
ibuteSetter(v8Value, info); | 69 TestInterfaceOwnPropertiesDerivedV8Internal::noExposeJSAccessorAttributeAttr
ibuteSetter(v8Value, info); |
69 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 70 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
70 } | 71 } |
71 | 72 |
72 static void exposeJSAccessorAttributeAttributeGetter(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 73 static void exposeJSAccessorAttributeAttributeGetter(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
73 { | 74 { |
74 v8::Local<v8::Object> holder = info.Holder(); | 75 v8::Local<v8::Object> holder = info.Holder(); |
75 TestInterfaceOwnPropertiesDerived* impl = V8TestInterfaceOwnPropertiesDerive
d::toImpl(holder); | 76 TestInterfaceOwnPropertiesDerived* impl = V8TestInterfaceOwnPropertiesDerive
d::toImpl(holder); |
76 v8SetReturnValueInt(info, impl->exposeJSAccessorAttribute()); | 77 v8SetReturnValueInt(info, impl->exposeJSAccessorAttribute()); |
(...skipping 18 matching lines...) Expand all Loading... |
95 } | 96 } |
96 | 97 |
97 static void exposeJSAccessorAttributeAttributeSetterCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) | 98 static void exposeJSAccessorAttributeAttributeSetterCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) |
98 { | 99 { |
99 v8::Local<v8::Value> v8Value = info[0]; | 100 v8::Local<v8::Value> v8Value = info[0]; |
100 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 101 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
101 TestInterfaceOwnPropertiesDerivedV8Internal::exposeJSAccessorAttributeAttrib
uteSetter(v8Value, info); | 102 TestInterfaceOwnPropertiesDerivedV8Internal::exposeJSAccessorAttributeAttrib
uteSetter(v8Value, info); |
102 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 103 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
103 } | 104 } |
104 | 105 |
105 static void doNotExposeJSAccessorAttributeAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) | 106 static void doNotExposeJSAccessorAttributeAttributeGetter(const v8::FunctionCall
backInfo<v8::Value>& info) |
106 { | 107 { |
107 v8::Local<v8::Object> holder = info.Holder(); | 108 v8::Local<v8::Object> holder = info.Holder(); |
108 TestInterfaceOwnPropertiesDerived* impl = V8TestInterfaceOwnPropertiesDerive
d::toImpl(holder); | 109 TestInterfaceOwnPropertiesDerived* impl = V8TestInterfaceOwnPropertiesDerive
d::toImpl(holder); |
109 v8SetReturnValueInt(info, impl->doNotExposeJSAccessorAttribute()); | 110 v8SetReturnValueInt(info, impl->doNotExposeJSAccessorAttribute()); |
110 } | 111 } |
111 | 112 |
112 static void doNotExposeJSAccessorAttributeAttributeGetterCallback(v8::Local<v8::
Name>, const v8::PropertyCallbackInfo<v8::Value>& info) | 113 static void doNotExposeJSAccessorAttributeAttributeGetterCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) |
113 { | 114 { |
114 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 115 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
115 TestInterfaceOwnPropertiesDerivedV8Internal::doNotExposeJSAccessorAttributeA
ttributeGetter(info); | 116 TestInterfaceOwnPropertiesDerivedV8Internal::doNotExposeJSAccessorAttributeA
ttributeGetter(info); |
116 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 117 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
117 } | 118 } |
118 | 119 |
119 static void doNotExposeJSAccessorAttributeAttributeSetter(v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<void>& info) | 120 static void doNotExposeJSAccessorAttributeAttributeSetter(v8::Local<v8::Value> v
8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
120 { | 121 { |
121 v8::Local<v8::Object> holder = info.Holder(); | 122 v8::Local<v8::Object> holder = info.Holder(); |
122 ExceptionState exceptionState(ExceptionState::SetterContext, "doNotExposeJSA
ccessorAttribute", "TestInterfaceOwnPropertiesDerived", holder, info.GetIsolate(
)); | 123 ExceptionState exceptionState(ExceptionState::SetterContext, "doNotExposeJSA
ccessorAttribute", "TestInterfaceOwnPropertiesDerived", holder, info.GetIsolate(
)); |
123 TestInterfaceOwnPropertiesDerived* impl = V8TestInterfaceOwnPropertiesDerive
d::toImpl(holder); | 124 TestInterfaceOwnPropertiesDerived* impl = V8TestInterfaceOwnPropertiesDerive
d::toImpl(holder); |
124 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 125 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
125 if (exceptionState.throwIfNeeded()) | 126 if (exceptionState.throwIfNeeded()) |
126 return; | 127 return; |
127 impl->setDoNotExposeJSAccessorAttribute(cppValue); | 128 impl->setDoNotExposeJSAccessorAttribute(cppValue); |
128 } | 129 } |
129 | 130 |
130 static void doNotExposeJSAccessorAttributeAttributeSetterCallback(v8::Local<v8::
Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 131 static void doNotExposeJSAccessorAttributeAttributeSetterCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) |
131 { | 132 { |
| 133 v8::Local<v8::Value> v8Value = info[0]; |
132 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 134 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
133 TestInterfaceOwnPropertiesDerivedV8Internal::doNotExposeJSAccessorAttributeA
ttributeSetter(v8Value, info); | 135 TestInterfaceOwnPropertiesDerivedV8Internal::doNotExposeJSAccessorAttributeA
ttributeSetter(v8Value, info); |
134 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 136 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
135 } | 137 } |
136 | 138 |
137 } // namespace TestInterfaceOwnPropertiesDerivedV8Internal | 139 } // namespace TestInterfaceOwnPropertiesDerivedV8Internal |
138 | 140 |
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 | |
153 static const V8DOMConfiguration::AccessorConfiguration V8TestInterfaceOwnPropert
iesDerivedAccessors[] = { | 141 static const V8DOMConfiguration::AccessorConfiguration V8TestInterfaceOwnPropert
iesDerivedAccessors[] = { |
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}, | 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}, |
| 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}, |
155 }; | 145 }; |
156 | 146 |
157 static void installV8TestInterfaceOwnPropertiesDerivedTemplate(v8::Local<v8::Fun
ctionTemplate> functionTemplate, v8::Isolate* isolate) | 147 static void installV8TestInterfaceOwnPropertiesDerivedTemplate(v8::Local<v8::Fun
ctionTemplate> functionTemplate, v8::Isolate* isolate) |
158 { | 148 { |
159 functionTemplate->ReadOnlyPrototype(); | 149 functionTemplate->ReadOnlyPrototype(); |
160 | 150 |
161 v8::Local<v8::Signature> defaultSignature; | 151 v8::Local<v8::Signature> defaultSignature; |
162 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func
tionTemplate, "TestInterfaceOwnPropertiesDerived", V8TestInterfaceOwnProperties:
:domTemplate(isolate), V8TestInterfaceOwnPropertiesDerived::internalFieldCount, | 152 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func
tionTemplate, "TestInterfaceOwnPropertiesDerived", V8TestInterfaceOwnProperties:
:domTemplate(isolate), V8TestInterfaceOwnPropertiesDerived::internalFieldCount, |
163 V8TestInterfaceOwnPropertiesDerivedAttributes, WTF_ARRAY_LENGTH(V8TestIn
terfaceOwnPropertiesDerivedAttributes), | 153 0, 0, |
164 V8TestInterfaceOwnPropertiesDerivedAccessors, WTF_ARRAY_LENGTH(V8TestInt
erfaceOwnPropertiesDerivedAccessors), | 154 V8TestInterfaceOwnPropertiesDerivedAccessors, WTF_ARRAY_LENGTH(V8TestInt
erfaceOwnPropertiesDerivedAccessors), |
165 0, 0); | 155 0, 0); |
166 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT
emplate(); | 156 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT
emplate(); |
167 ALLOW_UNUSED_LOCAL(instanceTemplate); | 157 ALLOW_UNUSED_LOCAL(instanceTemplate); |
168 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp
eTemplate(); | 158 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp
eTemplate(); |
169 ALLOW_UNUSED_LOCAL(prototypeTemplate); | 159 ALLOW_UNUSED_LOCAL(prototypeTemplate); |
170 | 160 |
171 // Custom toString template | 161 // Custom toString template |
172 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData:
:from(isolate)->toStringTemplate()); | 162 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData:
:from(isolate)->toStringTemplate()); |
173 } | 163 } |
(...skipping 22 matching lines...) Expand all Loading... |
196 { | 186 { |
197 scriptWrappable->toImpl<TestInterfaceOwnPropertiesDerived>()->ref(); | 187 scriptWrappable->toImpl<TestInterfaceOwnPropertiesDerived>()->ref(); |
198 } | 188 } |
199 | 189 |
200 void V8TestInterfaceOwnPropertiesDerived::derefObject(ScriptWrappable* scriptWra
ppable) | 190 void V8TestInterfaceOwnPropertiesDerived::derefObject(ScriptWrappable* scriptWra
ppable) |
201 { | 191 { |
202 scriptWrappable->toImpl<TestInterfaceOwnPropertiesDerived>()->deref(); | 192 scriptWrappable->toImpl<TestInterfaceOwnPropertiesDerived>()->deref(); |
203 } | 193 } |
204 | 194 |
205 } // namespace blink | 195 } // namespace blink |
OLD | NEW |