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

Unified Diff: content/renderer/renderer_webidbcursor_impl.cc

Issue 8400061: IndexedDB: Recycle cursor objects when calling continue(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/renderer/renderer_webidbcursor_impl.cc
diff --git a/content/renderer/renderer_webidbcursor_impl.cc b/content/renderer/renderer_webidbcursor_impl.cc
index 82996f48cadacdbff0609c030749d67ba45e0195..470ac4ed4a33458e3eb3967e908986384ef1976e 100644
--- a/content/renderer/renderer_webidbcursor_impl.cc
+++ b/content/renderer/renderer_webidbcursor_impl.cc
@@ -29,6 +29,9 @@ RendererWebIDBCursorImpl::~RendererWebIDBCursorImpl() {
// any such pointers.
RenderThreadImpl::current()->Send(new IndexedDBHostMsg_CursorDestroyed(
idb_cursor_id_));
+ IndexedDBDispatcher* dispatcher =
+ RenderThreadImpl::current()->indexed_db_dispatcher();
+ dispatcher->CursorDestroyed(idb_cursor_id_);
}
unsigned short RendererWebIDBCursorImpl::direction() const {
@@ -39,15 +42,21 @@ unsigned short RendererWebIDBCursorImpl::direction() const {
}
WebIDBKey RendererWebIDBCursorImpl::key() const {
- return key_;
dgrogan 2011/10/29 00:54:28 I think you can delete these data members.
hans 2011/10/31 16:11:52 Letting them stay, and removing the maps in the di
+ IndexedDBDispatcher* dispatcher =
+ RenderThreadImpl::current()->indexed_db_dispatcher();
+ return dispatcher->getCursorKey(idb_cursor_id_);
}
WebIDBKey RendererWebIDBCursorImpl::primaryKey() const {
- return primary_key_;
+ IndexedDBDispatcher* dispatcher =
+ RenderThreadImpl::current()->indexed_db_dispatcher();
+ return dispatcher->getCursorPrimaryKey(idb_cursor_id_);
}
WebSerializedScriptValue RendererWebIDBCursorImpl::value() const {
- return value_;
+ IndexedDBDispatcher* dispatcher =
+ RenderThreadImpl::current()->indexed_db_dispatcher();
+ return dispatcher->getCursorValue(idb_cursor_id_);
}
void RendererWebIDBCursorImpl::update(const WebSerializedScriptValue& value,
« content/renderer/indexed_db_dispatcher.cc ('K') | « content/renderer/indexed_db_dispatcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698