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

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: Adjust even more tests 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
« no previous file with comments | « third_party/WebKit/Source/modules/csspaint/PaintWorkletGlobalScope.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
+ }
+ }
ExecuteSQL(sql_statement, sql_values, callback, callback_error,
exception_state);
}
« no previous file with comments | « third_party/WebKit/Source/modules/csspaint/PaintWorkletGlobalScope.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698