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

Unified Diff: webkit/glue/idb_bindings.cc

Issue 9212038: Distinguish null IDBKey (no value) and invalid IDBKey (value is not valid key) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Re-enable IndexedDBUILayoutTest.LayoutTests Created 8 years, 11 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 | « content/common/indexed_db/indexed_db_param_traits.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/idb_bindings.cc
diff --git a/webkit/glue/idb_bindings.cc b/webkit/glue/idb_bindings.cc
index ba9f592c61efddf4327d3dab336d6e72d3aa7307..13aa8e1ce932008894f5eebd1e182a6bb2c01140 100644
--- a/webkit/glue/idb_bindings.cc
+++ b/webkit/glue/idb_bindings.cc
@@ -25,13 +25,12 @@ bool IDBKeysFromValuesAndKeyPath(
std::vector<WebIDBKey>* values) {
WebIDBKeyPath web_idb_key_path = WebIDBKeyPath::create(idb_key_path);
bool error = web_idb_key_path.parseError() != 0;
- // TODO(bulach): what to do when we have a parse error? For now, setting
- // all values back as invalid and returning a boolean.
+ // When a parse error is encountered, no value is returned (null)
for (std::vector<WebSerializedScriptValue>::const_iterator i =
serialized_script_values.begin();
i != serialized_script_values.end(); ++i) {
if (error) {
- values->push_back(WebIDBKey::createInvalid());
+ values->push_back(WebIDBKey::createNull());
} else {
values->push_back(
WebIDBKey::createFromValueAndKeyPath(*i, web_idb_key_path));
« no previous file with comments | « content/common/indexed_db/indexed_db_param_traits.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698