Chromium Code Reviews| Index: Source/bindings/v8/V8Binding.h |
| diff --git a/Source/bindings/v8/V8Binding.h b/Source/bindings/v8/V8Binding.h |
| index 1d2d7ce85842cbe5b2719d6233caa6243784e2a2..3e1e3d556611ab4c9011aa7580e1e0cce070f057 100644 |
| --- a/Source/bindings/v8/V8Binding.h |
| +++ b/Source/bindings/v8/V8Binding.h |
| @@ -292,6 +292,17 @@ v8::Handle<v8::Value> v8Array(const HeapVector<T, inlineCapacity>& iterator, v8: |
| return result; |
| } |
| +template<typename T, size_t inlineCapacity> |
| +v8::Handle<v8::Value> v8ArrayNoInline(const Vector<T, inlineCapacity>& iterator, v8::Isolate* isolate) |
|
haraken
2014/03/19 08:31:58
I don't fully understand why you call this v8Array
Kunihiko Sakamoto
2014/03/19 09:12:17
Because this uses toV8NoInline(T) instead of toV8(
|
| +{ |
| + v8::Local<v8::Array> result = v8::Array::New(isolate, iterator.size()); |
| + int index = 0; |
| + typename Vector<T, inlineCapacity>::const_iterator end = iterator.end(); |
| + for (typename Vector<T, inlineCapacity>::const_iterator iter = iterator.begin(); iter != end; ++iter) |
| + result->Set(v8::Integer::New(isolate, index++), toV8NoInline(WTF::getPtr(*iter), v8::Handle<v8::Object>(), isolate)); |
| + return result; |
| +} |
| + |
| // Conversion flags, used in toIntXX/toUIntXX. |
| enum IntegerConversionConfiguration { |
| NormalConversion, |