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 "V8TestInterface5.h" | 7 #include "V8TestInterface5.h" |
8 | 8 |
9 #include "bindings/core/v8/ExceptionState.h" | 9 #include "bindings/core/v8/ExceptionState.h" |
10 #include "bindings/core/v8/GeneratedCodeHelper.h" | 10 #include "bindings/core/v8/GeneratedCodeHelper.h" |
(...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
769 | 769 |
770 void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::Array>&
info) | 770 void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::Array>&
info) |
771 { | 771 { |
772 TestInterface5ImplementationV8Internal::namedPropertyEnumerator(info); | 772 TestInterface5ImplementationV8Internal::namedPropertyEnumerator(info); |
773 } | 773 } |
774 | 774 |
775 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo
<v8::Value>& info) | 775 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo
<v8::Value>& info) |
776 { | 776 { |
777 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 777 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
778 | 778 |
| 779 // We assume that all the implementations support length() method, although |
| 780 // the spec doesn't require that length() must exist. It's okay that |
| 781 // the interface does not have length attribute as long as the |
| 782 // implementation supports length() member function. |
| 783 if (index >= impl->length()) |
| 784 return; // Returns undefined due to out-of-range. |
| 785 |
779 String result = impl->anonymousIndexedGetter(index); | 786 String result = impl->anonymousIndexedGetter(index); |
780 if (result.isNull()) | |
781 return; | |
782 v8SetReturnValueString(info, result, info.GetIsolate()); | 787 v8SetReturnValueString(info, result, info.GetIsolate()); |
783 } | 788 } |
784 | 789 |
785 void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCallbackInf
o<v8::Value>& info) | 790 void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCallbackInf
o<v8::Value>& info) |
786 { | 791 { |
787 TestInterface5ImplementationV8Internal::indexedPropertyGetter(index, info); | 792 TestInterface5ImplementationV8Internal::indexedPropertyGetter(index, info); |
788 } | 793 } |
789 | 794 |
790 static void indexedPropertySetter(uint32_t index, v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<v8::Value>& info) | 795 static void indexedPropertySetter(uint32_t index, v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<v8::Value>& info) |
791 { | 796 { |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
958 const V8DOMConfiguration::MethodConfiguration windowExposedStaticMethodM
ethodConfiguration = {"windowExposedStaticMethod", TestInterface5ImplementationV
8Internal::windowExposedStaticMethodMethodCallback, 0, 0, v8::None, V8DOMConfigu
ration::ExposedToAllScripts, V8DOMConfiguration::OnInterface}; | 963 const V8DOMConfiguration::MethodConfiguration windowExposedStaticMethodM
ethodConfiguration = {"windowExposedStaticMethod", TestInterface5ImplementationV
8Internal::windowExposedStaticMethodMethodCallback, 0, 0, v8::None, V8DOMConfigu
ration::ExposedToAllScripts, V8DOMConfiguration::OnInterface}; |
959 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(
), prototypeObject, interfaceObject, signature, windowExposedStaticMethodMethodC
onfiguration); | 964 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(
), prototypeObject, interfaceObject, signature, windowExposedStaticMethodMethodC
onfiguration); |
960 } | 965 } |
961 if (executionContext && (executionContext->isDocument() || executionContext-
>isServiceWorkerGlobalScope())) { | 966 if (executionContext && (executionContext->isDocument() || executionContext-
>isServiceWorkerGlobalScope())) { |
962 const V8DOMConfiguration::MethodConfiguration windowAndServiceWorkerExpo
sedMethodMethodConfiguration = {"windowAndServiceWorkerExposedMethod", TestInter
face5ImplementationV8Internal::windowAndServiceWorkerExposedMethodMethodCallback
, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::O
nPrototype}; | 967 const V8DOMConfiguration::MethodConfiguration windowAndServiceWorkerExpo
sedMethodMethodConfiguration = {"windowAndServiceWorkerExposedMethod", TestInter
face5ImplementationV8Internal::windowAndServiceWorkerExposedMethodMethodCallback
, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::O
nPrototype}; |
963 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(
), prototypeObject, interfaceObject, signature, windowAndServiceWorkerExposedMet
hodMethodConfiguration); | 968 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(
), prototypeObject, interfaceObject, signature, windowAndServiceWorkerExposedMet
hodMethodConfiguration); |
964 } | 969 } |
965 } | 970 } |
966 | 971 |
967 } // namespace blink | 972 } // namespace blink |
OLD | NEW |