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

Unified Diff: third_party/WebKit/Source/platform/scheduler/CancellableTaskFactory.h

Issue 2093603002: Wrap non-GCed raw pointer parameters of WTF::bind with WTF::unretained (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@unretained_wrapper
Patch Set: rebase Created 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/scheduler/CancellableTaskFactory.h
diff --git a/third_party/WebKit/Source/platform/scheduler/CancellableTaskFactory.h b/third_party/WebKit/Source/platform/scheduler/CancellableTaskFactory.h
index c6684da5ea27af4da590e0143ccf118530b9b2d8..747b7dd9a09d70f32480ac3a6cf47a9c5eb8a200 100644
--- a/third_party/WebKit/Source/platform/scheduler/CancellableTaskFactory.h
+++ b/third_party/WebKit/Source/platform/scheduler/CancellableTaskFactory.h
@@ -45,7 +45,7 @@ public:
template<typename T>
static std::unique_ptr<CancellableTaskFactory> create(T* thisObject, void (T::*method)(), typename std::enable_if<!IsGarbageCollectedType<T>::value>::type* = nullptr)
{
- return wrapUnique(new CancellableTaskFactory(WTF::bind(method, thisObject)));
+ return wrapUnique(new CancellableTaskFactory(WTF::bind(method, WTF::unretained(thisObject))));
}
bool isPending() const

Powered by Google App Engine
This is Rietveld 408576698