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 // clang-format off | 8 // clang-format off |
9 #include "V8TestIntegerIndexedGlobal.h" | 9 #include "V8TestIntegerIndexedGlobal.h" |
10 | 10 |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 | 166 |
167 static void installV8TestIntegerIndexedGlobalTemplate(v8::Isolate* isolate, cons
t DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) { | 167 static void installV8TestIntegerIndexedGlobalTemplate(v8::Isolate* isolate, cons
t DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) { |
168 // Initialize the interface object's template. | 168 // Initialize the interface object's template. |
169 V8DOMConfiguration::initializeDOMInterfaceTemplate(isolate, interfaceTemplate,
V8TestIntegerIndexedGlobal::wrapperTypeInfo.interfaceName, V8TestIntegerIndexed
Global::domTemplateForNamedPropertiesObject(isolate, world), V8TestIntegerIndexe
dGlobal::internalFieldCount); | 169 V8DOMConfiguration::initializeDOMInterfaceTemplate(isolate, interfaceTemplate,
V8TestIntegerIndexedGlobal::wrapperTypeInfo.interfaceName, V8TestIntegerIndexed
Global::domTemplateForNamedPropertiesObject(isolate, world), V8TestIntegerIndexe
dGlobal::internalFieldCount); |
170 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp
late); | 170 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp
late); |
171 ALLOW_UNUSED_LOCAL(signature); | 171 ALLOW_UNUSED_LOCAL(signature); |
172 v8::Local<v8::ObjectTemplate> instanceTemplate = interfaceTemplate->InstanceTe
mplate(); | 172 v8::Local<v8::ObjectTemplate> instanceTemplate = interfaceTemplate->InstanceTe
mplate(); |
173 ALLOW_UNUSED_LOCAL(instanceTemplate); | 173 ALLOW_UNUSED_LOCAL(instanceTemplate); |
174 v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->Prototype
Template(); | 174 v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->Prototype
Template(); |
175 ALLOW_UNUSED_LOCAL(prototypeTemplate); | 175 ALLOW_UNUSED_LOCAL(prototypeTemplate); |
| 176 // Global object prototype chain consists of Immutable Prototype Exotic Object
s |
| 177 prototypeTemplate->SetImmutableProto(); |
| 178 |
| 179 // Global objects are Immutable Prototype Exotic Objects |
| 180 instanceTemplate->SetImmutableProto(); |
| 181 |
176 // Register DOM constants, attributes and operations. | 182 // Register DOM constants, attributes and operations. |
177 V8DOMConfiguration::installAccessors(isolate, world, instanceTemplate, prototy
peTemplate, interfaceTemplate, signature, V8TestIntegerIndexedGlobalAccessors, W
TF_ARRAY_LENGTH(V8TestIntegerIndexedGlobalAccessors)); | 183 V8DOMConfiguration::installAccessors(isolate, world, instanceTemplate, prototy
peTemplate, interfaceTemplate, signature, V8TestIntegerIndexedGlobalAccessors, W
TF_ARRAY_LENGTH(V8TestIntegerIndexedGlobalAccessors)); |
178 V8DOMConfiguration::installMethods(isolate, world, instanceTemplate, prototype
Template, interfaceTemplate, signature, V8TestIntegerIndexedGlobalMethods, WTF_A
RRAY_LENGTH(V8TestIntegerIndexedGlobalMethods)); | 184 V8DOMConfiguration::installMethods(isolate, world, instanceTemplate, prototype
Template, interfaceTemplate, signature, V8TestIntegerIndexedGlobalMethods, WTF_A
RRAY_LENGTH(V8TestIntegerIndexedGlobalMethods)); |
179 | 185 |
180 // Indexed properties | 186 // Indexed properties |
181 v8::IndexedPropertyHandlerConfiguration indexedPropertyHandlerConfig(TestInteg
erIndexedGlobalV8Internal::indexedPropertyGetterCallback, TestIntegerIndexedGlob
alV8Internal::indexedPropertySetterCallback, 0, TestIntegerIndexedGlobalV8Intern
al::indexedPropertyDeleterCallback, indexedPropertyEnumerator<TestIntegerIndexed
Global>, v8::Local<v8::Value>(), v8::PropertyHandlerFlags::kNone); | 187 v8::IndexedPropertyHandlerConfiguration indexedPropertyHandlerConfig(TestInteg
erIndexedGlobalV8Internal::indexedPropertyGetterCallback, TestIntegerIndexedGlob
alV8Internal::indexedPropertySetterCallback, 0, TestIntegerIndexedGlobalV8Intern
al::indexedPropertyDeleterCallback, indexedPropertyEnumerator<TestIntegerIndexed
Global>, v8::Local<v8::Value>(), v8::PropertyHandlerFlags::kNone); |
182 instanceTemplate->SetHandler(indexedPropertyHandlerConfig); | 188 instanceTemplate->SetHandler(indexedPropertyHandlerConfig); |
183 | 189 |
184 // Array iterator (@@iterator) | 190 // Array iterator (@@iterator) |
185 instanceTemplate->SetIntrinsicDataProperty(v8::Symbol::GetIterator(isolate), v
8::kArrayProto_values, v8::DontEnum); | 191 instanceTemplate->SetIntrinsicDataProperty(v8::Symbol::GetIterator(isolate), v
8::kArrayProto_values, v8::DontEnum); |
186 } | 192 } |
187 | 193 |
188 v8::Local<v8::FunctionTemplate> V8TestIntegerIndexedGlobal::domTemplate(v8::Isol
ate* isolate, const DOMWrapperWorld& world) { | 194 v8::Local<v8::FunctionTemplate> V8TestIntegerIndexedGlobal::domTemplate(v8::Isol
ate* isolate, const DOMWrapperWorld& world) { |
189 return V8DOMConfiguration::domClassTemplate(isolate, world, const_cast<Wrapper
TypeInfo*>(&wrapperTypeInfo), installV8TestIntegerIndexedGlobalTemplate); | 195 return V8DOMConfiguration::domClassTemplate(isolate, world, const_cast<Wrapper
TypeInfo*>(&wrapperTypeInfo), installV8TestIntegerIndexedGlobalTemplate); |
190 } | 196 } |
191 | 197 |
192 v8::Local<v8::FunctionTemplate> V8TestIntegerIndexedGlobal::domTemplateForNamedP
ropertiesObject(v8::Isolate* isolate, const DOMWrapperWorld& world) { | 198 v8::Local<v8::FunctionTemplate> V8TestIntegerIndexedGlobal::domTemplateForNamedP
ropertiesObject(v8::Isolate* isolate, const DOMWrapperWorld& world) { |
193 v8::Local<v8::FunctionTemplate> parentTemplate = V8None::domTemplate(isolate,
world); | 199 v8::Local<v8::FunctionTemplate> parentTemplate = V8None::domTemplate(isolate,
world); |
194 | 200 |
195 v8::Local<v8::FunctionTemplate> namedPropertiesObjectFunctionTemplate = v8::Fu
nctionTemplate::New(isolate, V8ObjectConstructor::isValidConstructorMode); | 201 v8::Local<v8::FunctionTemplate> namedPropertiesObjectFunctionTemplate = v8::Fu
nctionTemplate::New(isolate, V8ObjectConstructor::isValidConstructorMode); |
196 namedPropertiesObjectFunctionTemplate->SetClassName(v8AtomicString(isolate, "T
estIntegerIndexedGlobalProperties")); | 202 namedPropertiesObjectFunctionTemplate->SetClassName(v8AtomicString(isolate, "T
estIntegerIndexedGlobalProperties")); |
197 namedPropertiesObjectFunctionTemplate->Inherit(parentTemplate); | 203 namedPropertiesObjectFunctionTemplate->Inherit(parentTemplate); |
198 | 204 |
199 v8::Local<v8::ObjectTemplate> namedPropertiesObjectTemplate = namedPropertiesO
bjectFunctionTemplate->PrototypeTemplate(); | 205 v8::Local<v8::ObjectTemplate> namedPropertiesObjectTemplate = namedPropertiesO
bjectFunctionTemplate->PrototypeTemplate(); |
200 namedPropertiesObjectTemplate->SetInternalFieldCount(V8TestIntegerIndexedGloba
l::internalFieldCount); | 206 namedPropertiesObjectTemplate->SetInternalFieldCount(V8TestIntegerIndexedGloba
l::internalFieldCount); |
| 207 // Named Properties object has SetPrototype method of Immutable Prototype Exot
ic Objects |
| 208 namedPropertiesObjectTemplate->SetImmutableProto(); |
201 V8DOMConfiguration::setClassString(isolate, namedPropertiesObjectTemplate, "Te
stIntegerIndexedGlobalProperties"); | 209 V8DOMConfiguration::setClassString(isolate, namedPropertiesObjectTemplate, "Te
stIntegerIndexedGlobalProperties"); |
202 v8::NamedPropertyHandlerConfiguration namedPropertyHandlerConfig(TestIntegerIn
dexedGlobalV8Internal::namedPropertyGetterCallback, TestIntegerIndexedGlobalV8In
ternal::namedPropertySetterCallback, TestIntegerIndexedGlobalV8Internal::namedPr
opertyQueryCallback, TestIntegerIndexedGlobalV8Internal::namedPropertyDeleterCal
lback, TestIntegerIndexedGlobalV8Internal::namedPropertyEnumeratorCallback, v8::
Local<v8::Value>(), static_cast<v8::PropertyHandlerFlags>(int(v8::PropertyHandle
rFlags::kOnlyInterceptStrings) | int(v8::PropertyHandlerFlags::kNonMasking))); | 210 v8::NamedPropertyHandlerConfiguration namedPropertyHandlerConfig(TestIntegerIn
dexedGlobalV8Internal::namedPropertyGetterCallback, TestIntegerIndexedGlobalV8In
ternal::namedPropertySetterCallback, TestIntegerIndexedGlobalV8Internal::namedPr
opertyQueryCallback, TestIntegerIndexedGlobalV8Internal::namedPropertyDeleterCal
lback, TestIntegerIndexedGlobalV8Internal::namedPropertyEnumeratorCallback, v8::
Local<v8::Value>(), static_cast<v8::PropertyHandlerFlags>(int(v8::PropertyHandle
rFlags::kOnlyInterceptStrings) | int(v8::PropertyHandlerFlags::kNonMasking))); |
203 namedPropertiesObjectTemplate->SetHandler(namedPropertyHandlerConfig); | 211 namedPropertiesObjectTemplate->SetHandler(namedPropertyHandlerConfig); |
204 | 212 |
205 return namedPropertiesObjectFunctionTemplate; | 213 return namedPropertiesObjectFunctionTemplate; |
206 } | 214 } |
207 | 215 |
208 bool V8TestIntegerIndexedGlobal::hasInstance(v8::Local<v8::Value> v8Value, v8::I
solate* isolate) { | 216 bool V8TestIntegerIndexedGlobal::hasInstance(v8::Local<v8::Value> v8Value, v8::I
solate* isolate) { |
209 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Value)
; | 217 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Value)
; |
210 } | 218 } |
211 | 219 |
212 v8::Local<v8::Object> V8TestIntegerIndexedGlobal::findInstanceInPrototypeChain(v
8::Local<v8::Value> v8Value, v8::Isolate* isolate) { | 220 v8::Local<v8::Object> V8TestIntegerIndexedGlobal::findInstanceInPrototypeChain(v
8::Local<v8::Value> v8Value, v8::Isolate* isolate) { |
213 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrapperT
ypeInfo, v8Value); | 221 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrapperT
ypeInfo, v8Value); |
214 } | 222 } |
215 | 223 |
216 TestIntegerIndexedGlobal* V8TestIntegerIndexedGlobal::toImplWithTypeCheck(v8::Is
olate* isolate, v8::Local<v8::Value> value) { | 224 TestIntegerIndexedGlobal* V8TestIntegerIndexedGlobal::toImplWithTypeCheck(v8::Is
olate* isolate, v8::Local<v8::Value> value) { |
217 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(value)
) : nullptr; | 225 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(value)
) : nullptr; |
218 } | 226 } |
219 | 227 |
220 } // namespace blink | 228 } // namespace blink |
OLD | NEW |