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

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

Issue 2882943002: Removed mutable from PassRefPtr's raw pointer member. (Closed)
Patch Set: Created 3 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/platform/wtf/PassRefPtr.h
diff --git a/third_party/WebKit/Source/platform/wtf/PassRefPtr.h b/third_party/WebKit/Source/platform/wtf/PassRefPtr.h
index f36ee84df5d6d6b403810bc10ef24dffe745f744..cde758fcf71b1225005feabe32df76938afb3d41 100644
--- a/third_party/WebKit/Source/platform/wtf/PassRefPtr.h
+++ b/third_party/WebKit/Source/platform/wtf/PassRefPtr.h
@@ -86,7 +86,7 @@ class PassRefPtr {
T* Get() const { return ptr_; }
- WARN_UNUSED_RESULT T* LeakRef() const;
+ WARN_UNUSED_RESULT T* LeakRef();
T& operator*() const { return *ptr_; }
T* operator->() const { return ptr_; }
@@ -105,7 +105,7 @@ class PassRefPtr {
return *this;
}
- mutable T* ptr_;
+ T* ptr_;
};
template <typename T>
@@ -129,7 +129,7 @@ inline PassRefPtr<T>::PassRefPtr(RefPtr<U>&& o,
: ptr_(o.LeakRef()) {}
template <typename T>
-inline T* PassRefPtr<T>::LeakRef() const {
+inline T* PassRefPtr<T>::LeakRef() {
T* ptr = ptr_;
ptr_ = nullptr;
return 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