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

Unified Diff: Source/wtf/WeakPtr.h

Issue 876623002: Adds a CancellableTaskFactory and exposes postLoadingTasks to Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 11 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/platform/scheduler/Scheduler.cpp ('k') | public/platform/WebScheduler.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 900e14cc0c43f8d6a3e7907879916b520c426c6b..608e9532689321a63b7a5d75fd4f2e8b1d85fa6f 100644
--- a/Source/wtf/WeakPtr.h
+++ b/Source/wtf/WeakPtr.h
@@ -140,6 +140,11 @@ public:
m_ref = WeakReference<T>::create(ptr);
}
+ bool hasWeakPtrs() const
+ {
+ return m_ref->refCount() > 1;
+ }
+
private:
RefPtr<WeakReference<T>> m_ref;
};
« no previous file with comments | « Source/platform/scheduler/Scheduler.cpp ('k') | public/platform/WebScheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698