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

Unified Diff: content/browser/in_process_webkit/indexed_db_callbacks.h

Issue 8400061: IndexedDB: Recycle cursor objects when calling continue(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More style nits fixed Created 9 years, 1 month 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 | « no previous file | content/browser/in_process_webkit/indexed_db_callbacks.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/in_process_webkit/indexed_db_callbacks.h
diff --git a/content/browser/in_process_webkit/indexed_db_callbacks.h b/content/browser/in_process_webkit/indexed_db_callbacks.h
index a5ef7deff3f81cef83559065f8b75d310bfcea8f..085bfa4b202a2fc73c12e13a696f8338bde00cc2 100644
--- a/content/browser/in_process_webkit/indexed_db_callbacks.h
+++ b/content/browser/in_process_webkit/indexed_db_callbacks.h
@@ -76,7 +76,8 @@ class IndexedDBCallbacks : public IndexedDBCallbacksBase {
DISALLOW_IMPLICIT_CONSTRUCTORS(IndexedDBCallbacks);
};
-// WebIDBCursor uses onSuccess(WebIDBCursor*) to indicate it has data, and
+// WebIDBCursor uses onSuccess(WebIDBCursor*) when a cursor has been opened,
+// onSuccessWithContinuation() when a continue() call has succeeded, or
// onSuccess() without params to indicate it does not contain any data, i.e.,
// there is no key within the key range, or it has reached the end.
template <>
@@ -84,13 +85,20 @@ class IndexedDBCallbacks<WebKit::WebIDBCursor>
: public IndexedDBCallbacksBase {
public:
IndexedDBCallbacks(
- IndexedDBDispatcherHost* dispatcher_host, int32 response_id)
- : IndexedDBCallbacksBase(dispatcher_host, response_id) { }
+ IndexedDBDispatcherHost* dispatcher_host, int32 response_id,
+ int32 cursor_id)
+ : IndexedDBCallbacksBase(dispatcher_host, response_id),
+ cursor_id_(cursor_id) { }
virtual void onSuccess(WebKit::WebIDBCursor* idb_object);
virtual void onSuccess(const WebKit::WebSerializedScriptValue& value);
+ virtual void onSuccessWithContinuation();
private:
+ // The id of the cursor this callback concerns, or -1 if the cursor
+ // does not exist yet.
+ int32 cursor_id_;
+
DISALLOW_IMPLICIT_CONSTRUCTORS(IndexedDBCallbacks);
};
« no previous file with comments | « no previous file | content/browser/in_process_webkit/indexed_db_callbacks.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698