Lines Matching refs:ptr_
174 constexpr scoped_refptr(T* p) : ptr_(p) { in scoped_refptr()
175 if (ptr_) in scoped_refptr()
176 AddRef(ptr_); in scoped_refptr()
181 scoped_refptr(const scoped_refptr& r) : scoped_refptr(r.ptr_) {} in scoped_refptr()
187 scoped_refptr(const scoped_refptr<U>& r) : scoped_refptr(r.ptr_) {} in scoped_refptr()
191 scoped_refptr(scoped_refptr&& r) noexcept : ptr_(r.ptr_) { r.ptr_ = nullptr; } in scoped_refptr()
197 scoped_refptr(scoped_refptr<U>&& r) noexcept : ptr_(r.ptr_) { in scoped_refptr()
198 r.ptr_ = nullptr; in scoped_refptr()
207 if (ptr_) in ~scoped_refptr()
208 Release(ptr_); in ~scoped_refptr()
211 T* get() const { return ptr_; } in get()
214 DCHECK(ptr_);
215 return *ptr_;
219 DCHECK(ptr_);
220 return ptr_;
235 void swap(scoped_refptr& r) noexcept { std::swap(ptr_, r.ptr_); } in swap()
237 explicit operator bool() const { return ptr_ != nullptr; }
241 return ptr_ == rhs.get();
251 return ptr_ < rhs.get();
255 T* ptr_ = nullptr;
261 scoped_refptr(T* p, base::subtle::AdoptRefTag) : ptr_(p) {} in scoped_refptr()