Chromium Code Reviews| Index: Source/bindings/v8/V8Binding.h |
| diff --git a/Source/bindings/v8/V8Binding.h b/Source/bindings/v8/V8Binding.h |
| index 5ab2b16ecb0b2951993d0dd58b7c17ae8c18c839..5b8ed969ed94708114c40b9d545d2e91a61299e9 100644 |
| --- a/Source/bindings/v8/V8Binding.h |
| +++ b/Source/bindings/v8/V8Binding.h |
| @@ -394,6 +394,16 @@ namespace WebCore { |
| return result; |
| } |
| + template <class T> |
| + Vector<T> toVectorOfArguments(const v8::Arguments& args) |
|
haraken
2013/04/11 00:59:16
This doesn't need to be a template, since a type o
ulfar
2013/04/11 03:25:15
Inlining this might lead to some code size increas
|
| + { |
| + Vector<T> result; |
| + int length = args.Length(); |
|
haraken
2013/04/11 00:59:16
Nit: int => size_t
ulfar
2013/04/11 03:25:15
Done.
|
| + for (int i = 0; i < length; ++i) |
|
haraken
2013/04/11 00:59:16
Nit: int => size_t
ulfar
2013/04/11 03:25:15
Done.
|
| + result.append(args[i]); |
| + return result; |
| + } |
| + |
| // Validates that the passed object is a sequence type per WebIDL spec |
| // http://www.w3.org/TR/2012/WD-WebIDL-20120207/#es-sequence |
| inline v8::Handle<v8::Value> toV8Sequence(v8::Handle<v8::Value> value, uint32_t& length, v8::Isolate* isolate) |