Chromium Code Reviews| Index: Source/bindings/core/v8/V8Binding.h |
| diff --git a/Source/bindings/core/v8/V8Binding.h b/Source/bindings/core/v8/V8Binding.h |
| index c106cb10058766f72ffce025bec427b936906da2..2efc03c88969925fde4d423424384bfe6f7de164 100644 |
| --- a/Source/bindings/core/v8/V8Binding.h |
| +++ b/Source/bindings/core/v8/V8Binding.h |
| @@ -730,6 +730,16 @@ Vector<T> toImplArray(v8::Handle<v8::Value> value, int argumentIndex, v8::Isolat |
| return result; |
| } |
| +template <typename T> |
| +Vector<T> toImplArray(const Vector<ScriptValue>& value, v8::Isolate* isolate, ExceptionState& exceptionState) |
| +{ |
| + Vector<T> result; |
| + result.reserveInitialCapacity(value.size()); |
| + for (unsigned i = 0; i < value.size(); ++i) |
| + result.uncheckedAppend(NativeValueTraits<T>::nativeValue(value[i].v8Value(), isolate, exceptionState)); |
|
bashi
2015/03/06 15:53:15
You need to check whether the exceptionState had a
|
| + return result; |
| +} |
| + |
| template <class T> |
| Vector<T> toImplArguments(const v8::FunctionCallbackInfo<v8::Value>& info, int startIndex, ExceptionState& exceptionState) |
| { |