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

Unified Diff: content/child/indexed_db/webidbcursor_impl.cc

Issue 124323002: IndexedDB: Fix cursor prefetching edge cases (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix test-only leak found by valgrind Created 6 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
Index: content/child/indexed_db/webidbcursor_impl.cc
diff --git a/content/child/indexed_db/webidbcursor_impl.cc b/content/child/indexed_db/webidbcursor_impl.cc
index 36426352a0705396bb6068fd83b1a8fd9a1a7298..50f7ebf0409b640cb0732d79064fefc5dfb09063 100644
--- a/content/child/indexed_db/webidbcursor_impl.cc
+++ b/content/child/indexed_db/webidbcursor_impl.cc
@@ -161,6 +161,14 @@ void WebIDBCursorImpl::CachedContinue(WebIDBCallbacks* callbacks) {
++pending_onsuccess_callbacks_;
+ if (!continue_count_) {
+ // The cache was invalidated by a call to ResetPrefetchCache()
+ // after the RequestIDBCursorPrefetch() was made. Now that the
+ // initiating continue() call has been satisfied, discard
+ // the rest of the cache.
+ ResetPrefetchCache();
+ }
+
callbacks->onSuccess(WebIDBKeyBuilder::Build(key),
WebIDBKeyBuilder::Build(primary_key),
value);
« no previous file with comments | « content/child/indexed_db/webidbcursor_impl.h ('k') | content/child/indexed_db/webidbcursor_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698