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

Unified Diff: third_party/WebKit/Source/wtf/OwnPtr.h

Issue 2004383002: OwnPtr: Add reset() as an alias of clear(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/OwnPtr.h
diff --git a/third_party/WebKit/Source/wtf/OwnPtr.h b/third_party/WebKit/Source/wtf/OwnPtr.h
index f8c05b619dfce591d4cfea69dd2e6fe5e9836786..a5b81b22b98f7cf3599e319ce734b9f185bca2d9 100644
--- a/third_party/WebKit/Source/wtf/OwnPtr.h
+++ b/third_party/WebKit/Source/wtf/OwnPtr.h
@@ -59,7 +59,11 @@ public:
PtrType get() const { return m_ptr; }
+ // Note: clear() will soon get renamed to reset() as a part of OwnPtr -> std::unique_ptr transition.
+ // For now, both are allowed to facilitate the rename process. See also: http://crbug.com/611661
void clear();
+ void reset() { clear(); }
+
PtrType leakPtr() WARN_UNUSED_RETURN;
ValueType& operator*() const { ASSERT(m_ptr); return *m_ptr; }
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698