summaryrefslogtreecommitdiffstats
path: root/content/common
diff options
context:
space:
mode:
authorhans@chromium.org <hans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-05 12:36:35 +0000
committerhans@chromium.org <hans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-05 12:36:35 +0000
commitd7b435d52e9bc68fc956c261164908b6d0282df4 (patch)
tree91948e2a29bbbcc09101fd5df1b5a584f2b488ec /content/common
parent4b0e343daec06152c02c6b8c59b01f9e887fe97f (diff)
downloadchromium_src-d7b435d52e9bc68fc956c261164908b6d0282df4.zip
chromium_src-d7b435d52e9bc68fc956c261164908b6d0282df4.tar.gz
chromium_src-d7b435d52e9bc68fc956c261164908b6d0282df4.tar.bz2
IndexedDB: Recycle curosr objects when calling continue().
This is the Chromium side of https://bugs.webkit.org/show_bug.cgi?id=71115 Instead of creating a new IDBCursor wrapper each time continue() is called, we should instead send back a new onSuccessCursorContinue() callback, and the IDBRequest will know which cursor to return. This patch implements the new callback. For performance, we piggy-pick the cursor's current key, primary key and value with the callback. To be able to do this, the IndexedDBDispatcherHost must keep track of which cursor corresponds to which pending callback. The IndexedDBDispatcher keeps the key, primary key and value cached for each cursor. BUG=98685 TEST=all current tests pass Review URL: http://codereview.chromium.org/8400061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108788 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common')
-rw-r--r--content/common/indexed_db_messages.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/content/common/indexed_db_messages.h b/content/common/indexed_db_messages.h
index 03bb03a..4830f0e 100644
--- a/content/common/indexed_db_messages.h
+++ b/content/common/indexed_db_messages.h
@@ -147,6 +147,12 @@ IPC_MESSAGE_CONTROL5(IndexedDBMsg_CallbacksSuccessIDBCursor,
IndexedDBKey /* key */,
IndexedDBKey /* primary key */,
content::SerializedScriptValue /* script_value */)
+IPC_MESSAGE_CONTROL5(IndexedDBMsg_CallbacksSuccessCursorContinue,
+ int32 /* response_id */,
+ int32 /* cursor_id */,
+ IndexedDBKey /* key */,
+ IndexedDBKey /* primary key */,
+ content::SerializedScriptValue /* script_value */)
IPC_MESSAGE_CONTROL2(IndexedDBMsg_CallbacksSuccessIDBDatabase,
int32 /* response_id */,
int32 /* idb_database_id */)