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

Unified Diff: third_party/WebKit/Source/modules/indexeddb/IDBCursor.cpp

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 years, 6 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: third_party/WebKit/Source/modules/indexeddb/IDBCursor.cpp
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBCursor.cpp b/third_party/WebKit/Source/modules/indexeddb/IDBCursor.cpp
index f0a5cfab514d9205a21f8040de9f6bc10834cfa5..c168f0a2ff7fe983074cb31fdf4c940e3dbd2c44 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBCursor.cpp
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBCursor.cpp
@@ -42,18 +42,19 @@
#include "public/platform/modules/indexeddb/WebIDBDatabase.h"
#include "public/platform/modules/indexeddb/WebIDBKeyRange.h"
#include <limits>
+#include <memory>
using blink::WebIDBCursor;
using blink::WebIDBDatabase;
namespace blink {
-IDBCursor* IDBCursor::create(PassOwnPtr<WebIDBCursor> backend, WebIDBCursorDirection direction, IDBRequest* request, IDBAny* source, IDBTransaction* transaction)
+IDBCursor* IDBCursor::create(std::unique_ptr<WebIDBCursor> backend, WebIDBCursorDirection direction, IDBRequest* request, IDBAny* source, IDBTransaction* transaction)
{
return new IDBCursor(std::move(backend), direction, request, source, transaction);
}
-IDBCursor::IDBCursor(PassOwnPtr<WebIDBCursor> backend, WebIDBCursorDirection direction, IDBRequest* request, IDBAny* source, IDBTransaction* transaction)
+IDBCursor::IDBCursor(std::unique_ptr<WebIDBCursor> backend, WebIDBCursorDirection direction, IDBRequest* request, IDBAny* source, IDBTransaction* transaction)
: m_backend(std::move(backend))
, m_request(request)
, m_direction(direction)
@@ -148,7 +149,7 @@ void IDBCursor::advance(unsigned count, ExceptionState& exceptionState)
m_request->setPendingCursor(this);
m_gotValue = false;
- m_backend->advance(count, WebIDBCallbacksImpl::create(m_request).leakPtr());
+ m_backend->advance(count, WebIDBCallbacksImpl::create(m_request).release());
}
void IDBCursor::continueFunction(ScriptState* scriptState, const ScriptValue& keyValue, ExceptionState& exceptionState)
@@ -242,7 +243,7 @@ void IDBCursor::continueFunction(IDBKey* key, IDBKey* primaryKey, ExceptionState
// will be on the original context openCursor was called on. Is this right?
m_request->setPendingCursor(this);
m_gotValue = false;
- m_backend->continueFunction(key, primaryKey, WebIDBCallbacksImpl::create(m_request).leakPtr());
+ m_backend->continueFunction(key, primaryKey, WebIDBCallbacksImpl::create(m_request).release());
}
IDBRequest* IDBCursor::deleteFunction(ScriptState* scriptState, ExceptionState& exceptionState)
@@ -282,7 +283,7 @@ IDBRequest* IDBCursor::deleteFunction(ScriptState* scriptState, ExceptionState&
ASSERT(!exceptionState.hadException());
IDBRequest* request = IDBRequest::create(scriptState, IDBAny::create(this), m_transaction.get());
- m_transaction->backendDB()->deleteRange(m_transaction->id(), effectiveObjectStore()->id(), keyRange, WebIDBCallbacksImpl::create(request).leakPtr());
+ m_transaction->backendDB()->deleteRange(m_transaction->id(), effectiveObjectStore()->id(), keyRange, WebIDBCallbacksImpl::create(request).release());
return request;
}

Powered by Google App Engine
This is Rietveld 408576698