| 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 6e4d2198180248a3431960ce935652a6cb1d79a1..e711d8dd76724422d9afe18bd2a45ac2215dc15d 100644
|
| --- a/content/browser/indexed_db/cursor_impl.cc
|
| +++ b/content/browser/indexed_db/cursor_impl.cc
|
| @@ -12,7 +12,7 @@ namespace content {
|
|
|
| class CursorImpl::IDBThreadHelper {
|
| public:
|
| - explicit IDBThreadHelper(scoped_refptr<IndexedDBCursor> cursor);
|
| + explicit IDBThreadHelper(std::unique_ptr<IndexedDBCursor> cursor);
|
| ~IDBThreadHelper();
|
|
|
| void Advance(uint32_t count, scoped_refptr<IndexedDBCallbacks> callbacks);
|
| @@ -24,13 +24,13 @@ class CursorImpl::IDBThreadHelper {
|
|
|
| private:
|
| scoped_refptr<IndexedDBDispatcherHost> dispatcher_host_;
|
| - scoped_refptr<IndexedDBCursor> cursor_;
|
| + std::unique_ptr<IndexedDBCursor> cursor_;
|
| const url::Origin origin_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(IDBThreadHelper);
|
| };
|
|
|
| -CursorImpl::CursorImpl(scoped_refptr<IndexedDBCursor> cursor,
|
| +CursorImpl::CursorImpl(std::unique_ptr<IndexedDBCursor> cursor,
|
| const url::Origin& origin,
|
| scoped_refptr<IndexedDBDispatcherHost> dispatcher_host)
|
| : helper_(new IDBThreadHelper(std::move(cursor))),
|
| @@ -88,10 +88,12 @@ void CursorImpl::PrefetchReset(
|
| }
|
|
|
| CursorImpl::IDBThreadHelper::IDBThreadHelper(
|
| - scoped_refptr<IndexedDBCursor> cursor)
|
| + std::unique_ptr<IndexedDBCursor> cursor)
|
| : cursor_(std::move(cursor)) {}
|
|
|
| -CursorImpl::IDBThreadHelper::~IDBThreadHelper() {}
|
| +CursorImpl::IDBThreadHelper::~IDBThreadHelper() {
|
| + cursor_->RemoveCursorFromTransaction();
|
| +}
|
|
|
| void CursorImpl::IDBThreadHelper::Advance(
|
| uint32_t count,
|
|
|