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

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

Issue 2696703008: Adds RefPtr::leakRef method to allow raw pointers that prevent destruct. (Closed)
Patch Set: Added deref in RefPtrTest.LeakRef to avoid memory leak. Created 3 years, 10 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/wtf/PassRefPtr.h
diff --git a/third_party/WebKit/Source/wtf/PassRefPtr.h b/third_party/WebKit/Source/wtf/PassRefPtr.h
index 94a0faa065baffa92dd26a992485b4aca75cc345..a65d7444071f35454f91d3d35965935a69918071 100644
--- a/third_party/WebKit/Source/wtf/PassRefPtr.h
+++ b/third_party/WebKit/Source/wtf/PassRefPtr.h
@@ -126,7 +126,7 @@ template <typename T>
template <typename U>
inline PassRefPtr<T>::PassRefPtr(RefPtr<U>&& o,
EnsurePtrConvertibleArgDefn(U, T))
- : m_ptr(o.release().leakRef()) {}
+ : m_ptr(o.leakRef()) {}
template <typename T>
inline T* PassRefPtr<T>::leakRef() const {

Powered by Google App Engine
This is Rietveld 408576698