| Index: Source/bindings/v8/V8Binding.h
|
| diff --git a/Source/bindings/v8/V8Binding.h b/Source/bindings/v8/V8Binding.h
|
| index 4dca5e155fbb412e65ba75ba82ec330cc75b6460..dd64ab197c1d23b66517bae581a86ed33dbadbde 100644
|
| --- a/Source/bindings/v8/V8Binding.h
|
| +++ b/Source/bindings/v8/V8Binding.h
|
| @@ -546,6 +546,20 @@ namespace WebCore {
|
| return DOMWrapperWorld::isolatedWorld(context);
|
| }
|
|
|
| + // FIXME: This will be soon embedded in the generated code.
|
| + template<class Collection> static void indexedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& info)
|
| + {
|
| + Collection* collection = reinterpret_cast<Collection*>(info.Holder()->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex));
|
| + int length = collection->length();
|
| + v8::Handle<v8::Array> properties = v8::Array::New(length);
|
| + for (int i = 0; i < length; ++i) {
|
| + // FIXME: Do we need to check that the item function returns a non-null value for this index?
|
| + v8::Handle<v8::Integer> integer = v8::Integer::New(i, info.GetIsolate());
|
| + properties->Set(integer, integer);
|
| + }
|
| + v8SetReturnValue(info, properties);
|
| + }
|
| +
|
| // If the current context causes out of memory, JavaScript setting
|
| // is disabled and it returns true.
|
| bool handleOutOfMemory();
|
|
|