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

Unified Diff: content/browser/indexed_db/cursor_impl.cc

Issue 2727733004: [IndexedDB] Closing mojo connections when renderer quits (Closed)
Patch Set: Created 3 years, 10 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/indexed_db/cursor_impl.cc
diff --git a/content/browser/indexed_db/cursor_impl.cc b/content/browser/indexed_db/cursor_impl.cc
index 86d0e8f51b773a5a502cd6ef607ac41ecf18d66a..f8a04ce03f097963981675a7a2f616497dad5826 100644
--- a/content/browser/indexed_db/cursor_impl.cc
+++ b/content/browser/indexed_db/cursor_impl.cc
@@ -34,9 +34,9 @@ class CursorImpl::IDBThreadHelper {
CursorImpl::CursorImpl(std::unique_ptr<IndexedDBCursor> cursor,
const url::Origin& origin,
- scoped_refptr<IndexedDBDispatcherHost> dispatcher_host)
+ IndexedDBDispatcherHost* dispatcher_host)
: helper_(new IDBThreadHelper(std::move(cursor))),
- dispatcher_host_(std::move(dispatcher_host)),
+ dispatcher_host_(dispatcher_host),
origin_(origin),
idb_runner_(base::ThreadTaskRunnerHandle::Get()) {}
@@ -48,7 +48,7 @@ void CursorImpl::Advance(
uint32_t count,
::indexed_db::mojom::CallbacksAssociatedPtrInfo callbacks_info) {
scoped_refptr<IndexedDBCallbacks> callbacks(new IndexedDBCallbacks(
- dispatcher_host_.get(), origin_, std::move(callbacks_info)));
+ dispatcher_host_, origin_, std::move(callbacks_info)));
idb_runner_->PostTask(FROM_HERE, base::Bind(&IDBThreadHelper::Advance,
base::Unretained(helper_), count,
base::Passed(&callbacks)));
@@ -59,7 +59,7 @@ void CursorImpl::Continue(
const IndexedDBKey& primary_key,
::indexed_db::mojom::CallbacksAssociatedPtrInfo callbacks_info) {
scoped_refptr<IndexedDBCallbacks> callbacks(new IndexedDBCallbacks(
- dispatcher_host_.get(), origin_, std::move(callbacks_info)));
+ dispatcher_host_, origin_, std::move(callbacks_info)));
idb_runner_->PostTask(
FROM_HERE,
base::Bind(&IDBThreadHelper::Continue, base::Unretained(helper_), key,
@@ -70,7 +70,7 @@ void CursorImpl::Prefetch(
int32_t count,
::indexed_db::mojom::CallbacksAssociatedPtrInfo callbacks_info) {
scoped_refptr<IndexedDBCallbacks> callbacks(new IndexedDBCallbacks(
- dispatcher_host_.get(), origin_, std::move(callbacks_info)));
+ dispatcher_host_, origin_, std::move(callbacks_info)));
idb_runner_->PostTask(FROM_HERE, base::Bind(&IDBThreadHelper::Prefetch,
base::Unretained(helper_), count,
base::Passed(&callbacks)));

Powered by Google App Engine
This is Rietveld 408576698