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

Side by Side Diff: third_party/WebKit/Source/platform/wtf/RefPtr.h

Issue 2907543002: Removed use of RefPtr::Release where result is not used. (Closed)
Patch Set: fixed typo Created 3 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/WorkerOrWorkletScriptController.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. 2 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc.
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 RefPtr(HashTableDeletedValueType) : ptr_(HashTableDeletedValue()) {} 63 RefPtr(HashTableDeletedValueType) : ptr_(HashTableDeletedValue()) {}
64 bool IsHashTableDeletedValue() const { 64 bool IsHashTableDeletedValue() const {
65 return ptr_ == HashTableDeletedValue(); 65 return ptr_ == HashTableDeletedValue();
66 } 66 }
67 67
68 ALWAYS_INLINE ~RefPtr() { DerefIfNotNull(ptr_); } 68 ALWAYS_INLINE ~RefPtr() { DerefIfNotNull(ptr_); }
69 69
70 ALWAYS_INLINE T* Get() const { return ptr_; } 70 ALWAYS_INLINE T* Get() const { return ptr_; }
71 T* LeakRef() WARN_UNUSED_RESULT; 71 T* LeakRef() WARN_UNUSED_RESULT;
72 void Clear(); 72 void Clear();
73 PassRefPtr<T> Release() { 73 PassRefPtr<T> Release() WARN_UNUSED_RESULT {
74 PassRefPtr<T> tmp = AdoptRef(ptr_); 74 PassRefPtr<T> tmp = AdoptRef(ptr_);
75 ptr_ = nullptr; 75 ptr_ = nullptr;
76 return tmp; 76 return tmp;
77 } 77 }
78 78
79 T& operator*() const { return *ptr_; } 79 T& operator*() const { return *ptr_; }
80 ALWAYS_INLINE T* operator->() const { return ptr_; } 80 ALWAYS_INLINE T* operator->() const { return ptr_; }
81 81
82 bool operator!() const { return !ptr_; } 82 bool operator!() const { return !ptr_; }
83 explicit operator bool() const { return ptr_ != nullptr; } 83 explicit operator bool() const { return ptr_ != nullptr; }
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 210
211 private: 211 private:
212 T* ptr_; 212 T* ptr_;
213 }; 213 };
214 214
215 } // namespace WTF 215 } // namespace WTF
216 216
217 using WTF::RefPtr; 217 using WTF::RefPtr;
218 218
219 #endif // WTF_RefPtr_h 219 #endif // WTF_RefPtr_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/WorkerOrWorkletScriptController.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698