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

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: New version Created 9 years, 2 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/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..0007f6db3658014b039719cb982667e98a9e6e9a 100644
--- a/content/browser/in_process_webkit/indexed_db_callbacks.h
+++ b/content/browser/in_process_webkit/indexed_db_callbacks.h
@@ -76,21 +76,29 @@ class IndexedDBCallbacks : public IndexedDBCallbacksBase {
DISALLOW_IMPLICIT_CONSTRUCTORS(IndexedDBCallbacks);
};
-// WebIDBCursor uses onSuccess(WebIDBCursor*) to indicate it has data, and
-// onSuccess() without params to indicate it does not contain any data, i.e.,
+// WebIDBCursor uses onSuccess(WebIDBCursor*) when a cursor hsa been opened,
+// onSuccessCUrsorContinue() when a continue() call has succeeded, or
michaeln 2011/10/31 18:58:25 onSuccessCUrsorContinue typo
hans 2011/11/01 14:57:45 Done.
+// onSuccess() without params to indicate it does nto contain any data, i.e.,
// there is no key within the key range, or it has reached the end.
template <>
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 onSuccessCursorContinue();
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);
};

Powered by Google App Engine
This is Rietveld 408576698