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

Unified Diff: base/memory/weak_ptr.h

Issue 16160015: Update base/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | « base/files/file_util_proxy.cc ('k') | base/memory/weak_ptr.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/weak_ptr.h
diff --git a/base/memory/weak_ptr.h b/base/memory/weak_ptr.h
index 8c2220fa501909043233e5cd8dc71e2977b8918b..9839db298c7af4c8baa565827f6b40d9920960b9 100644
--- a/base/memory/weak_ptr.h
+++ b/base/memory/weak_ptr.h
@@ -127,7 +127,8 @@ class BASE_EXPORT WeakReferenceOwner {
// Remove this when crbug.com/234964 is addressed.
void DetachFromThreadHack() {
- if (flag_) flag_->DetachFromThreadHack();
+ if (flag_.get())
+ flag_->DetachFromThreadHack();
}
private:
« no previous file with comments | « base/files/file_util_proxy.cc ('k') | base/memory/weak_ptr.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698