Index: third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp |
diff --git a/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp b/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp |
index 46a74fc735e064abbe17b478bb66fab3dbb1956b..c69ba0f8846427fb45eb5d908379f2dded21b276 100644 |
--- a/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp |
+++ b/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp |
@@ -776,9 +776,14 @@ static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo |
{ |
TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()); |
+ // We assume that all the implementations support length() method, although |
+ // the spec doesn't require that length() must exist. It's okay that |
+ // the interface does not have length attribute as long as the |
+ // implementation supports length() member function. |
+ if (index >= impl->length()) |
+ return; // Returns undefined due to out-of-range. |
+ |
String result = impl->anonymousIndexedGetter(index); |
- if (result.isNull()) |
- return; |
v8SetReturnValueString(info, result, info.GetIsolate()); |
} |