Chromium Code Reviews| Index: third_party/WebKit/Source/modules/webdatabase/SQLTransaction.cpp |
| diff --git a/third_party/WebKit/Source/modules/webdatabase/SQLTransaction.cpp b/third_party/WebKit/Source/modules/webdatabase/SQLTransaction.cpp |
| index e6b191253398acee44c1510f23cde51032a7e611..6e0ff779accd06fb73c6c2266d18e41454a8dcd7 100644 |
| --- a/third_party/WebKit/Source/modules/webdatabase/SQLTransaction.cpp |
| +++ b/third_party/WebKit/Source/modules/webdatabase/SQLTransaction.cpp |
| @@ -317,9 +317,13 @@ void SQLTransaction::executeSql(ScriptState* script_state, |
| SQLStatementErrorCallback* callback_error, |
| ExceptionState& exception_state) { |
| Vector<SQLValue> sql_values; |
| - if (!arguments.IsNull()) |
| - sql_values = ToImplArray<Vector<SQLValue>>( |
| - arguments.Get(), script_state->GetIsolate(), exception_state); |
| + if (!arguments.IsNull()) { |
| + sql_values.ReserveInitialCapacity(arguments.Get().size()); |
| + for (const auto& script_value : arguments.Get()) { |
| + sql_values.emplace_back(ScriptValue::To<SQLValue>( |
| + script_state->GetIsolate(), script_value, exception_state)); |
|
haraken
2017/04/18 10:48:32
I'm fine with this but is there any way to use Nat
Yuki
2017/04/18 11:02:23
The problem is that toNativeValue is designed to c
Yuki
2017/04/18 13:57:24
We need to handle a possible exception here.
The
|
| + } |
| + } |
| ExecuteSQL(sql_statement, sql_values, callback, callback_error, |
| exception_state); |
| } |