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

Side by Side Diff: content/browser/indexed_db/indexed_db_dispatcher_host.cc

Issue 237143006: Make iterating over a corrupted IndexedDB fail. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h" 5 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/process/process.h" 10 #include "base/process/process.h"
(...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 int32 ipc_cursor_id, 865 int32 ipc_cursor_id,
866 int used_prefetches, 866 int used_prefetches,
867 int unused_prefetches) { 867 int unused_prefetches) {
868 DCHECK( 868 DCHECK(
869 parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread()); 869 parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread());
870 IndexedDBCursor* idb_cursor = 870 IndexedDBCursor* idb_cursor =
871 parent_->GetOrTerminateProcess(&map_, ipc_cursor_id); 871 parent_->GetOrTerminateProcess(&map_, ipc_cursor_id);
872 if (!idb_cursor) 872 if (!idb_cursor)
873 return; 873 return;
874 874
875 idb_cursor->PrefetchReset(used_prefetches, unused_prefetches); 875 leveldb::Status s =
876 idb_cursor->PrefetchReset(used_prefetches, unused_prefetches);
877 if (s.ok())
jsbell 2014/04/14 20:44:20 This test seems backwards?
cmumford 2014/04/14 23:39:23 You are correct - thx!
878 DLOG(ERROR) << "Unable to reset prefetch";
jsbell 2014/04/14 20:44:20 Should there be a TODO to do more here?
cmumford 2014/04/14 23:39:23 Done.
876 } 879 }
877 880
878 void IndexedDBDispatcherHost::CursorDispatcherHost::OnDestroyed( 881 void IndexedDBDispatcherHost::CursorDispatcherHost::OnDestroyed(
879 int32 ipc_object_id) { 882 int32 ipc_object_id) {
880 DCHECK( 883 DCHECK(
881 parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread()); 884 parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread());
882 parent_->DestroyObject(&map_, ipc_object_id); 885 parent_->DestroyObject(&map_, ipc_object_id);
883 } 886 }
884 887
885 } // namespace content 888 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698