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
3 // found in the LICENSE file.
4
5 // This file has been auto-generated from the Jinja2 template
6 // third_party/blink/renderer/bindings/templates/interface.cc.tmpl
7 // by the script code_generator_v8.py.
8 // DO NOT MODIFY!
9
10 // clang-format off
11 #include "third_party/blink/renderer/bindings/tests/results/core/v8_test_integer_indexed_global.h"
12
13 #include <algorithm>
14
15 #include "base/memory/scoped_refptr.h"
16 #include "third_party/blink/renderer/bindings/core/v8/idl_types.h"
17 #include "third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h"
18 #include "third_party/blink/renderer/bindings/core/v8/v8_document.h"
19 #include "third_party/blink/renderer/bindings/core/v8/v8_dom_configuration.h"
20 #include "third_party/blink/renderer/bindings/core/v8/v8_node.h"
21 #include "third_party/blink/renderer/core/execution_context/execution_context.h"
22 #include "third_party/blink/renderer/platform/bindings/exception_messages.h"
23 #include "third_party/blink/renderer/platform/bindings/exception_state.h"
24 #include "third_party/blink/renderer/platform/bindings/runtime_call_stats.h"
25 #include "third_party/blink/renderer/platform/bindings/v8_object_constructor.h"
26 #include "third_party/blink/renderer/platform/scheduler/public/cooperative_scheduling_manager.h"
27 #include "third_party/blink/renderer/platform/wtf/get_ptr.h"
28
29 namespace blink {
30
31 // Suppress warning: global constructors, because struct WrapperTypeInfo is trivial
32 // and does not depend on another global objects.
33 #if defined(COMPONENT_BUILD) && defined(WIN32) && defined(__clang__)
34 #pragma clang diagnostic push
35 #pragma clang diagnostic ignored "-Wglobal-constructors"
36 #endif
37 const WrapperTypeInfo v8_test_integer_indexed_global_wrapper_type_info = {
38 gin::kEmbedderBlink,
39 V8TestIntegerIndexedGlobal::DomTemplate,
40 nullptr,
41 "TestIntegerIndexedGlobal",
42 nullptr,
43 WrapperTypeInfo::kWrapperTypeObjectPrototype,
44 WrapperTypeInfo::kObjectClassId,
45 WrapperTypeInfo::kNotInheritFromActiveScriptWrappable,
46 };
47 #if defined(COMPONENT_BUILD) && defined(WIN32) && defined(__clang__)
48 #pragma clang diagnostic pop
49 #endif
50
51 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestIntegerIndexedGlobal.h.
52 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in
53 // platform/bindings/ScriptWrappable.h.
54 const WrapperTypeInfo& TestIntegerIndexedGlobal::wrapper_type_info_ = v8_test_integer_indexed_global_wrapper_type_info;
55
56 // not [ActiveScriptWrappable]
57 static_assert(
58 !std::is_base_of<ActiveScriptWrappableBase, TestIntegerIndexedGlobal>::value,
59 "TestIntegerIndexedGlobal inherits from ActiveScriptWrappable<>, but is not specifying "
60 "[ActiveScriptWrappable] extended attribute in the IDL file. "
61 "Be consistent.");
62 static_assert(
63 std::is_same<decltype(&TestIntegerIndexedGlobal::HasPendingActivity),
64 decltype(&ScriptWrappable::HasPendingActivity)>::value,
65 "TestIntegerIndexedGlobal is overriding hasPendingActivity(), but is not specifying "
66 "[ActiveScriptWrappable] extended attribute in the IDL file. "
67 "Be consistent.");
68
69 namespace test_integer_indexed_global_v8_internal {
70
LengthAttributeGetter(const v8::FunctionCallbackInfo<v8::Value> & info)71 static void LengthAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
72 v8::Local<v8::Object> holder = info.Holder();
73
74 TestIntegerIndexedGlobal* impl = V8TestIntegerIndexedGlobal::ToImpl(holder);
75
76 V8SetReturnValue(info, static_cast<double>(impl->length()));
77 }
78
LengthAttributeSetter(v8::Local<v8::Value> v8_value,const v8::FunctionCallbackInfo<v8::Value> & info)79 static void LengthAttributeSetter(
80 v8::Local<v8::Value> v8_value, const v8::FunctionCallbackInfo<v8::Value>& info) {
81 v8::Isolate* isolate = info.GetIsolate();
82 ALLOW_UNUSED_LOCAL(isolate);
83
84 v8::Local<v8::Object> holder = info.Holder();
85 ALLOW_UNUSED_LOCAL(holder);
86
87 TestIntegerIndexedGlobal* impl = V8TestIntegerIndexedGlobal::ToImpl(holder);
88
89 ExceptionState exception_state(isolate, ExceptionState::kSetterContext, "TestIntegerIndexedGlobal", "length");
90
91 // Prepare the value to be set.
92 uint64_t cpp_value{ NativeValueTraits<IDLUnsignedLongLong>::NativeValue(info.GetIsolate(), v8_value, exception_state) };
93 if (exception_state.HadException())
94 return;
95
96 impl->setLength(cpp_value);
97 }
98
VoidMethodDocumentMethod(const v8::FunctionCallbackInfo<v8::Value> & info)99 static void VoidMethodDocumentMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
100 TestIntegerIndexedGlobal* impl = V8TestIntegerIndexedGlobal::ToImpl(info.Holder());
101
102 if (UNLIKELY(info.Length() < 1)) {
103 V8ThrowException::ThrowTypeError(info.GetIsolate(), ExceptionMessages::FailedToExecute("voidMethodDocument", "TestIntegerIndexedGlobal", ExceptionMessages::NotEnoughArguments(1, info.Length())));
104 return;
105 }
106
107 Document* document;
108 document = V8Document::ToImplWithTypeCheck(info.GetIsolate(), info[0]);
109 if (!document) {
110 V8ThrowException::ThrowTypeError(info.GetIsolate(), ExceptionMessages::FailedToExecute("voidMethodDocument", "TestIntegerIndexedGlobal", ExceptionMessages::ArgumentNotOfType(0, "Document")));
111 return;
112 }
113
114 impl->voidMethodDocument(document);
115 }
116
IndexedPropertyDescriptor(uint32_t index,const v8::PropertyCallbackInfo<v8::Value> & info)117 static void IndexedPropertyDescriptor(
118 uint32_t index, const v8::PropertyCallbackInfo<v8::Value>& info) {
119 // https://heycam.github.io/webidl/#LegacyPlatformObjectGetOwnProperty
120 // Steps 1.1 to 1.2.4 are covered here: we rely on indexedPropertyGetter() to
121 // call the getter function and check that |index| is a valid property index,
122 // in which case it will have set info.GetReturnValue() to something other
123 // than undefined.
124 V8TestIntegerIndexedGlobal::IndexedPropertyGetterCallback(index, info);
125 v8::Local<v8::Value> getter_value = info.GetReturnValue().Get();
126 if (!getter_value->IsUndefined()) {
127 // 1.2.5. Let |desc| be a newly created Property Descriptor with no fields.
128 // 1.2.6. Set desc.[[Value]] to the result of converting value to an
129 // ECMAScript value.
130 // 1.2.7. If O implements an interface with an indexed property setter,
131 // then set desc.[[Writable]] to true, otherwise set it to false.
132 v8::PropertyDescriptor desc(getter_value, true);
133 // 1.2.8. Set desc.[[Enumerable]] and desc.[[Configurable]] to true.
134 desc.set_enumerable(true);
135 desc.set_configurable(true);
136 // 1.2.9. Return |desc|.
137 V8SetReturnValue(info, desc);
138 }
139 }
140
141 } // namespace test_integer_indexed_global_v8_internal
142
LengthAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value> & info)143 void V8TestIntegerIndexedGlobal::LengthAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
144 RUNTIME_CALL_TIMER_SCOPE_DISABLED_BY_DEFAULT(info.GetIsolate(), "Blink_TestIntegerIndexedGlobal_length_Getter");
145
146 test_integer_indexed_global_v8_internal::LengthAttributeGetter(info);
147 }
148
LengthAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value> & info)149 void V8TestIntegerIndexedGlobal::LengthAttributeSetterCallback(
150 const v8::FunctionCallbackInfo<v8::Value>& info) {
151 RUNTIME_CALL_TIMER_SCOPE_DISABLED_BY_DEFAULT(info.GetIsolate(), "Blink_TestIntegerIndexedGlobal_length_Setter");
152
153 v8::Local<v8::Value> v8_value = info[0];
154
155 test_integer_indexed_global_v8_internal::LengthAttributeSetter(v8_value, info);
156 }
157
VoidMethodDocumentMethodCallback(const v8::FunctionCallbackInfo<v8::Value> & info)158 void V8TestIntegerIndexedGlobal::VoidMethodDocumentMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
159 BLINK_BINDINGS_TRACE_EVENT("TestIntegerIndexedGlobal.voidMethodDocument");
160 RUNTIME_CALL_TIMER_SCOPE_DISABLED_BY_DEFAULT(info.GetIsolate(), "Blink_TestIntegerIndexedGlobal_voidMethodDocument");
161
162 test_integer_indexed_global_v8_internal::VoidMethodDocumentMethod(info);
163 }
164
NamedPropertyGetterCallback(v8::Local<v8::Name> name,const v8::PropertyCallbackInfo<v8::Value> & info)165 void V8TestIntegerIndexedGlobal::NamedPropertyGetterCallback(
166 v8::Local<v8::Name> name, const v8::PropertyCallbackInfo<v8::Value>& info) {
167 RUNTIME_CALL_TIMER_SCOPE_DISABLED_BY_DEFAULT(info.GetIsolate(), "Blink_TestIntegerIndexedGlobal_NamedPropertyGetter");
168
169 if (!name->IsString())
170 return;
171 const AtomicString& property_name = ToCoreAtomicString(name.As<v8::String>());
172
173 V8TestIntegerIndexedGlobal::NamedPropertyGetterCustom(property_name, info);
174 }
175
NamedPropertySetterCallback(v8::Local<v8::Name> name,v8::Local<v8::Value> v8_value,const v8::PropertyCallbackInfo<v8::Value> & info)176 void V8TestIntegerIndexedGlobal::NamedPropertySetterCallback(
177 v8::Local<v8::Name> name,
178 v8::Local<v8::Value> v8_value,
179 const v8::PropertyCallbackInfo<v8::Value>& info) {
180 RUNTIME_CALL_TIMER_SCOPE_DISABLED_BY_DEFAULT(info.GetIsolate(), "Blink_TestIntegerIndexedGlobal_NamedPropertySetter");
181
182 if (!name->IsString())
183 return;
184 const AtomicString& property_name = ToCoreAtomicString(name.As<v8::String>());
185
186 V8TestIntegerIndexedGlobal::NamedPropertySetterCustom(property_name, v8_value, info);
187 }
188
NamedPropertyDeleterCallback(v8::Local<v8::Name> name,const v8::PropertyCallbackInfo<v8::Boolean> & info)189 void V8TestIntegerIndexedGlobal::NamedPropertyDeleterCallback(
190 v8::Local<v8::Name> name, const v8::PropertyCallbackInfo<v8::Boolean>& info) {
191 if (!name->IsString())
192 return;
193 const AtomicString& property_name = ToCoreAtomicString(name.As<v8::String>());
194
195 V8TestIntegerIndexedGlobal::NamedPropertyDeleterCustom(property_name, info);
196 }
197
NamedPropertyQueryCallback(v8::Local<v8::Name> name,const v8::PropertyCallbackInfo<v8::Integer> & info)198 void V8TestIntegerIndexedGlobal::NamedPropertyQueryCallback(
199 v8::Local<v8::Name> name, const v8::PropertyCallbackInfo<v8::Integer>& info) {
200 RUNTIME_CALL_TIMER_SCOPE_DISABLED_BY_DEFAULT(info.GetIsolate(), "Blink_TestIntegerIndexedGlobal_NamedPropertyQuery");
201
202 if (!name->IsString())
203 return;
204 const AtomicString& property_name = ToCoreAtomicString(name.As<v8::String>());
205
206 V8TestIntegerIndexedGlobal::NamedPropertyQueryCustom(property_name, info);
207 }
208
NamedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::Array> & info)209 void V8TestIntegerIndexedGlobal::NamedPropertyEnumeratorCallback(
210 const v8::PropertyCallbackInfo<v8::Array>& info) {
211 V8TestIntegerIndexedGlobal::NamedPropertyEnumeratorCustom(info);
212 }
213
IndexedPropertyGetterCallback(uint32_t index,const v8::PropertyCallbackInfo<v8::Value> & info)214 void V8TestIntegerIndexedGlobal::IndexedPropertyGetterCallback(
215 uint32_t index, const v8::PropertyCallbackInfo<v8::Value>& info) {
216 RUNTIME_CALL_TIMER_SCOPE_DISABLED_BY_DEFAULT(info.GetIsolate(), "Blink_TestIntegerIndexedGlobal_IndexedPropertyGetter");
217
218 V8TestIntegerIndexedGlobal::IndexedPropertyGetterCustom(index, info);
219 }
220
IndexedPropertyDescriptorCallback(uint32_t index,const v8::PropertyCallbackInfo<v8::Value> & info)221 void V8TestIntegerIndexedGlobal::IndexedPropertyDescriptorCallback(
222 uint32_t index, const v8::PropertyCallbackInfo<v8::Value>& info) {
223 test_integer_indexed_global_v8_internal::IndexedPropertyDescriptor(index, info);
224 }
225
IndexedPropertySetterCallback(uint32_t index,v8::Local<v8::Value> v8_value,const v8::PropertyCallbackInfo<v8::Value> & info)226 void V8TestIntegerIndexedGlobal::IndexedPropertySetterCallback(
227 uint32_t index,
228 v8::Local<v8::Value> v8_value,
229 const v8::PropertyCallbackInfo<v8::Value>& info) {
230 V8TestIntegerIndexedGlobal::IndexedPropertySetterCustom(index, v8_value, info);
231 }
232
IndexedPropertyDeleterCallback(uint32_t index,const v8::PropertyCallbackInfo<v8::Boolean> & info)233 void V8TestIntegerIndexedGlobal::IndexedPropertyDeleterCallback(
234 uint32_t index, const v8::PropertyCallbackInfo<v8::Boolean>& info) {
235 V8TestIntegerIndexedGlobal::IndexedPropertyDeleterCustom(index, info);
236 }
237
IndexedPropertyDefinerCallback(uint32_t index,const v8::PropertyDescriptor & desc,const v8::PropertyCallbackInfo<v8::Value> & info)238 void V8TestIntegerIndexedGlobal::IndexedPropertyDefinerCallback(
239 uint32_t index,
240 const v8::PropertyDescriptor& desc,
241 const v8::PropertyCallbackInfo<v8::Value>& info) {
242 // https://heycam.github.io/webidl/#legacy-platform-object-defineownproperty
243 // 3.9.3. [[DefineOwnProperty]]
244 // step 1.1. If the result of calling IsDataDescriptor(Desc) is false, then
245 // return false.
246 if (desc.has_get() || desc.has_set()) {
247 V8SetReturnValue(info, v8::Null(info.GetIsolate()));
248 if (info.ShouldThrowOnError()) {
249 ExceptionState exception_state(info.GetIsolate(),
250 ExceptionState::kIndexedSetterContext,
251 "TestIntegerIndexedGlobal");
252 exception_state.ThrowTypeError("Accessor properties are not allowed.");
253 }
254 return;
255 }
256
257 // Return nothing and fall back to indexedPropertySetterCallback.
258 }
259
260 static constexpr V8DOMConfiguration::MethodConfiguration kV8TestIntegerIndexedGlobalMethods[] = {
261 {"voidMethodDocument", V8TestIntegerIndexedGlobal::VoidMethodDocumentMethodCallback, 1, v8::None, V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kHasSideEffect, V8DOMConfiguration::kAllWorlds},
262 };
263
InstallV8TestIntegerIndexedGlobalTemplate(v8::Isolate * isolate,const DOMWrapperWorld & world,v8::Local<v8::FunctionTemplate> interface_template)264 static void InstallV8TestIntegerIndexedGlobalTemplate(
265 v8::Isolate* isolate,
266 const DOMWrapperWorld& world,
267 v8::Local<v8::FunctionTemplate> interface_template) {
268 // Initialize the interface object's template.
269 V8DOMConfiguration::InitializeDOMInterfaceTemplate(isolate, interface_template, V8TestIntegerIndexedGlobal::GetWrapperTypeInfo()->interface_name, V8TestIntegerIndexedGlobal::DomTemplateForNamedPropertiesObject(isolate, world), V8TestIntegerIndexedGlobal::kInternalFieldCount);
270
271 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interface_template);
272 ALLOW_UNUSED_LOCAL(signature);
273 v8::Local<v8::ObjectTemplate> instance_template = interface_template->InstanceTemplate();
274 ALLOW_UNUSED_LOCAL(instance_template);
275 v8::Local<v8::ObjectTemplate> prototype_template = interface_template->PrototypeTemplate();
276 ALLOW_UNUSED_LOCAL(prototype_template);
277
278 // Global object prototype chain consists of Immutable Prototype Exotic Objects
279 prototype_template->SetImmutableProto();
280
281 // Global objects are Immutable Prototype Exotic Objects
282 instance_template->SetImmutableProto();
283
284 // Register IDL constants, attributes and operations.
285 static constexpr V8DOMConfiguration::AccessorConfiguration
286 kAccessorConfigurations[] = {
287 { "length", V8TestIntegerIndexedGlobal::LengthAttributeGetterCallback, V8TestIntegerIndexedGlobal::LengthAttributeSetterCallback, static_cast<unsigned>(V8PrivateProperty::CachedAccessor::kNone), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kCheckAccess, V8DOMConfiguration::kCheckAccess, V8DOMConfiguration::kHasSideEffect, V8DOMConfiguration::kAllWorlds },
288 };
289 V8DOMConfiguration::InstallAccessors(
290 isolate, world, instance_template, prototype_template, interface_template,
291 signature, kAccessorConfigurations,
292 base::size(kAccessorConfigurations));
293 V8DOMConfiguration::InstallMethods(
294 isolate, world, instance_template, prototype_template, interface_template,
295 signature, kV8TestIntegerIndexedGlobalMethods, base::size(kV8TestIntegerIndexedGlobalMethods));
296
297 // Indexed properties
298 v8::IndexedPropertyHandlerConfiguration indexedPropertyHandlerConfig(
299 V8TestIntegerIndexedGlobal::IndexedPropertyGetterCallback,
300 V8TestIntegerIndexedGlobal::IndexedPropertySetterCallback,
301 V8TestIntegerIndexedGlobal::IndexedPropertyDescriptorCallback,
302 V8TestIntegerIndexedGlobal::IndexedPropertyDeleterCallback,
303 IndexedPropertyEnumerator<TestIntegerIndexedGlobal>,
304 V8TestIntegerIndexedGlobal::IndexedPropertyDefinerCallback,
305 v8::Local<v8::Value>(),
306 v8::PropertyHandlerFlags::kNone);
307 instance_template->SetHandler(indexedPropertyHandlerConfig);
308
309 // Array iterator (@@iterator)
310 instance_template->SetIntrinsicDataProperty(v8::Symbol::GetIterator(isolate), v8::kArrayProto_values, v8::DontEnum);
311
312 // Custom signature
313
314 V8TestIntegerIndexedGlobal::InstallRuntimeEnabledFeaturesOnTemplate(
315 isolate, world, interface_template);
316 }
317
InstallRuntimeEnabledFeaturesOnTemplate(v8::Isolate * isolate,const DOMWrapperWorld & world,v8::Local<v8::FunctionTemplate> interface_template)318 void V8TestIntegerIndexedGlobal::InstallRuntimeEnabledFeaturesOnTemplate(
319 v8::Isolate* isolate,
320 const DOMWrapperWorld& world,
321 v8::Local<v8::FunctionTemplate> interface_template) {
322 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interface_template);
323 ALLOW_UNUSED_LOCAL(signature);
324 v8::Local<v8::ObjectTemplate> instance_template = interface_template->InstanceTemplate();
325 ALLOW_UNUSED_LOCAL(instance_template);
326 v8::Local<v8::ObjectTemplate> prototype_template = interface_template->PrototypeTemplate();
327 ALLOW_UNUSED_LOCAL(prototype_template);
328
329 // Register IDL constants, attributes and operations.
330
331 // Custom signature
332 }
333
DomTemplate(v8::Isolate * isolate,const DOMWrapperWorld & world)334 v8::Local<v8::FunctionTemplate> V8TestIntegerIndexedGlobal::DomTemplate(
335 v8::Isolate* isolate, const DOMWrapperWorld& world) {
336 return V8DOMConfiguration::DomClassTemplate(
337 isolate, world, const_cast<WrapperTypeInfo*>(V8TestIntegerIndexedGlobal::GetWrapperTypeInfo()),
338 InstallV8TestIntegerIndexedGlobalTemplate);
339 }
340
341 v8::Local<v8::FunctionTemplate>
DomTemplateForNamedPropertiesObject(v8::Isolate * isolate,const DOMWrapperWorld & world)342 V8TestIntegerIndexedGlobal::DomTemplateForNamedPropertiesObject(
343 v8::Isolate* isolate, const DOMWrapperWorld& world) {
344 v8::Local<v8::FunctionTemplate> parentTemplate =
345 V8None::DomTemplate(isolate, world);
346
347 v8::Local<v8::FunctionTemplate> named_properties_function_template =
348 v8::FunctionTemplate::New(isolate,
349 V8ObjectConstructor::IsValidConstructorMode);
350 named_properties_function_template->SetClassName(
351 V8AtomicString(isolate, "TestIntegerIndexedGlobalProperties"));
352 named_properties_function_template->Inherit(parentTemplate);
353
354 v8::Local<v8::ObjectTemplate> named_properties_object_template =
355 named_properties_function_template->PrototypeTemplate();
356 named_properties_object_template->SetInternalFieldCount(
357 V8TestIntegerIndexedGlobal::kInternalFieldCount);
358 // Named Properties object has SetPrototype method of Immutable Prototype Exotic Objects
359 named_properties_object_template->SetImmutableProto();
360 V8DOMConfiguration::SetClassString(
361 isolate, named_properties_object_template, "TestIntegerIndexedGlobalProperties");
362 v8::NamedPropertyHandlerConfiguration namedPropertyHandlerConfig(V8TestIntegerIndexedGlobal::NamedPropertyGetterCallback, V8TestIntegerIndexedGlobal::NamedPropertySetterCallback, V8TestIntegerIndexedGlobal::NamedPropertyQueryCallback, V8TestIntegerIndexedGlobal::NamedPropertyDeleterCallback, V8TestIntegerIndexedGlobal::NamedPropertyEnumeratorCallback, v8::Local<v8::Value>(), static_cast<v8::PropertyHandlerFlags>(int(v8::PropertyHandlerFlags::kOnlyInterceptStrings) | int(v8::PropertyHandlerFlags::kNonMasking)));
363 named_properties_object_template->SetHandler(namedPropertyHandlerConfig);
364
365 return named_properties_function_template;
366 }
367
HasInstance(v8::Local<v8::Value> v8_value,v8::Isolate * isolate)368 bool V8TestIntegerIndexedGlobal::HasInstance(v8::Local<v8::Value> v8_value, v8::Isolate* isolate) {
369 return V8PerIsolateData::From(isolate)->HasInstance(V8TestIntegerIndexedGlobal::GetWrapperTypeInfo(), v8_value);
370 }
371
FindInstanceInPrototypeChain(v8::Local<v8::Value> v8_value,v8::Isolate * isolate)372 v8::Local<v8::Object> V8TestIntegerIndexedGlobal::FindInstanceInPrototypeChain(
373 v8::Local<v8::Value> v8_value, v8::Isolate* isolate) {
374 return V8PerIsolateData::From(isolate)->FindInstanceInPrototypeChain(
375 V8TestIntegerIndexedGlobal::GetWrapperTypeInfo(), v8_value);
376 }
377
ToImplWithTypeCheck(v8::Isolate * isolate,v8::Local<v8::Value> value)378 TestIntegerIndexedGlobal* V8TestIntegerIndexedGlobal::ToImplWithTypeCheck(
379 v8::Isolate* isolate, v8::Local<v8::Value> value) {
380 return HasInstance(value, isolate) ? ToImpl(v8::Local<v8::Object>::Cast(value)) : nullptr;
381 }
382
383 } // namespace blink
384