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

Unified Diff: sql/connection.h

Issue 1004593005: base::RefCounted now DCHECKs when referenced from multiple threads. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix lots of tests using UnsafeRefCounted. Created 5 years, 9 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: sql/connection.h
diff --git a/sql/connection.h b/sql/connection.h
index 5bbdb972d63ffcc6a0d3e74615b4e2d6b6474761..b8b1196332a2f6292bdceb7c32cf81e14bb90494 100644
--- a/sql/connection.h
+++ b/sql/connection.h
@@ -459,7 +459,8 @@ class SQL_EXPORT Connection {
//
// The Connection may revoke a StatementRef in some error cases, so callers
// should always check validity before using.
- class SQL_EXPORT StatementRef : public base::RefCounted<StatementRef> {
+ // TODO(mgiuca): Avoid using UnsafeRefCounted. http://crbug.com/469952.
+ class SQL_EXPORT StatementRef : public base::UnsafeRefCounted<StatementRef> {
public:
// |connection| is the sql::Connection instance associated with
// the statement, and is used for tracking outstanding statements
@@ -498,7 +499,7 @@ class SQL_EXPORT Connection {
void AssertIOAllowed() { if (connection_) connection_->AssertIOAllowed(); }
private:
- friend class base::RefCounted<StatementRef>;
+ friend class base::UnsafeRefCounted<StatementRef>;
~StatementRef();

Powered by Google App Engine
This is Rietveld 408576698