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

Unified Diff: Source/wtf/WeakPtr.h

Issue 18371008: Add a WebDocument::watchCssSelectors(selectors) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@pinned
Patch Set: Initial Created 7 years, 5 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 | « Source/core/rendering/style/StyleRareNonInheritedData.cpp ('k') | public/platform/WebCString.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/WeakPtr.h
diff --git a/Source/wtf/WeakPtr.h b/Source/wtf/WeakPtr.h
index 4b67271bf8f650811770aa3f0a13307f9319f7ef..02ab185ca42c118ecc12f9c3afffa8f571d47daa 100644
--- a/Source/wtf/WeakPtr.h
+++ b/Source/wtf/WeakPtr.h
@@ -87,7 +87,7 @@ public:
WeakPtr() { }
WeakPtr(PassRefPtr<WeakReference<T> > ref) : m_ref(ref) { }
- T* get() const { return m_ref->get(); }
+ T* get() const { return m_ref ? m_ref->get() : 0; }
private:
RefPtr<WeakReference<T> > m_ref;
« no previous file with comments | « Source/core/rendering/style/StyleRareNonInheritedData.cpp ('k') | public/platform/WebCString.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698