Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(342)

Unified Diff: third_party/WebKit/Source/modules/webdatabase/SQLTransaction.cpp

Issue 2810843002: bindings: Make the sequence conversion code more complaint with WebIDL. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 f66610950a23990e7c04975f5f5dd0e2707781d9..0f62f0ddf7fc20d067d050e073e93a7ae7a3860e 100644
--- a/third_party/WebKit/Source/modules/webdatabase/SQLTransaction.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/SQLTransaction.cpp
@@ -317,11 +317,11 @@ 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);
- ExecuteSQL(sql_statement, sql_values, callback, callback_error,
jsbell 2017/04/10 21:09:24 What happened to this ExecuteSQL() call?
- exception_state);
+ 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));
+ }
}
bool SQLTransaction::ComputeNextStateAndCleanupIfNeeded() {

Powered by Google App Engine
This is Rietveld 408576698