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

Unified Diff: third_party/WebKit/Source/core/page/NetworkStateNotifierTest.cpp

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/core/page/NetworkStateNotifierTest.cpp
diff --git a/third_party/WebKit/Source/core/page/NetworkStateNotifierTest.cpp b/third_party/WebKit/Source/core/page/NetworkStateNotifierTest.cpp
index e4c5bdc82e8161e028c755ef796b3b2cb2e32b7f..5d189315bfa22feffefca09df1fa178b13c64388 100644
--- a/third_party/WebKit/Source/core/page/NetworkStateNotifierTest.cpp
+++ b/third_party/WebKit/Source/core/page/NetworkStateNotifierTest.cpp
@@ -119,12 +119,12 @@ protected:
void addObserverOnNotification(StateObserver* observer, StateObserver* observerToAdd)
{
- observer->setNotificationCallback(bind(&NetworkStateNotifier::addObserver, &m_notifier, observerToAdd, wrapPersistent(getExecutionContext())));
+ observer->setNotificationCallback(bind(&NetworkStateNotifier::addObserver, WTF::unretained(&m_notifier), WTF::unretained(observerToAdd), wrapPersistent(getExecutionContext())));
}
void removeObserverOnNotification(StateObserver* observer, StateObserver* observerToRemove)
{
- observer->setNotificationCallback(bind(&NetworkStateNotifier::removeObserver, &m_notifier, observerToRemove, wrapPersistent(getExecutionContext())));
+ observer->setNotificationCallback(bind(&NetworkStateNotifier::removeObserver, WTF::unretained(&m_notifier), WTF::unretained(observerToRemove), wrapPersistent(getExecutionContext())));
}
bool verifyObservations(const StateObserver& observer, WebConnectionType type, double maxBandwidthMbps)

Powered by Google App Engine
This is Rietveld 408576698