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

Unified Diff: third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteStatement.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/webdatabase/sqlite/SQLiteStatement.cpp
diff --git a/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteStatement.cpp b/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteStatement.cpp
index 9b0db267c2efab9ac477fec6b6d44b9fae4e9d02..230486d957e745c6ef4ba33c168a857823a3eb41 100644
--- a/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteStatement.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteStatement.cpp
@@ -30,7 +30,9 @@
#include "platform/heap/SafePoint.h"
#include "third_party/sqlite/sqlite3.h"
#include "wtf/Assertions.h"
+#include "wtf/PtrUtil.h"
#include "wtf/text/CString.h"
+#include <memory>
// SQLite 3.6.16 makes sqlite3_prepare_v2 automatically retry preparing the statement
// once if the database scheme has changed. We rely on this behavior.
@@ -100,8 +102,8 @@ int SQLiteStatement::prepare()
// Need to pass non-stack |const char*| and |sqlite3_stmt*| to avoid race
// with Oilpan stack scanning.
- OwnPtr<const char*> tail = adoptPtr(new const char*);
- OwnPtr<sqlite3_stmt*> statement = adoptPtr(new sqlite3_stmt*);
+ std::unique_ptr<const char*> tail = wrapUnique(new const char*);
+ std::unique_ptr<sqlite3_stmt*> statement = wrapUnique(new sqlite3_stmt*);
*tail = nullptr;
*statement = nullptr;
int error;

Powered by Google App Engine
This is Rietveld 408576698