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

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: 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 | « content/renderer/renderer_webidbcursor_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..8060040a886cdad2a4ec85a515cc61b6d31b2e93 100644
--- a/content/renderer/renderer_webidbcursor_impl.cc
+++ b/content/renderer/renderer_webidbcursor_impl.cc
@@ -13,13 +13,8 @@ using WebKit::WebIDBCallbacks;
using WebKit::WebIDBKey;
using WebKit::WebSerializedScriptValue;
-RendererWebIDBCursorImpl::RendererWebIDBCursorImpl(int32 idb_cursor_id,
- const IndexedDBKey& key, const IndexedDBKey& primary_key,
- const content::SerializedScriptValue& value)
- : idb_cursor_id_(idb_cursor_id),
- key_(key),
- primary_key_(primary_key),
- value_(value) {
+RendererWebIDBCursorImpl::RendererWebIDBCursorImpl(int32 idb_cursor_id)
+ : idb_cursor_id_(idb_cursor_id) {
}
RendererWebIDBCursorImpl::~RendererWebIDBCursorImpl() {
@@ -29,6 +24,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 {
@@ -74,3 +72,12 @@ void RendererWebIDBCursorImpl::deleteFunction(WebIDBCallbacks* callbacks,
RenderThreadImpl::current()->indexed_db_dispatcher();
dispatcher->RequestIDBCursorDelete(callbacks, idb_cursor_id_, &ec);
}
+
+void RendererWebIDBCursorImpl::SetKeyAndValue(
+ const IndexedDBKey& key,
+ const IndexedDBKey& primary_key,
+ const content::SerializedScriptValue& value) {
+ key_ = key;
+ primary_key_ = primary_key;
+ value_ = value;
+}
« no previous file with comments | « content/renderer/renderer_webidbcursor_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698