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

Unified Diff: Source/modules/geolocation/GeolocationController.cpp

Issue 490143002: Move GeolocationClient to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Provide default empty impl of WebGeolocationClient::geolocationDestroyed() virtual Created 6 years, 4 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: Source/modules/geolocation/GeolocationController.cpp
diff --git a/Source/modules/geolocation/GeolocationController.cpp b/Source/modules/geolocation/GeolocationController.cpp
index 96b83e1c9d365b009a1788ae9035538694814516..6b88e83292b0a9aeec1ba8a59ba0a5f901366ebf 100644
--- a/Source/modules/geolocation/GeolocationController.cpp
+++ b/Source/modules/geolocation/GeolocationController.cpp
@@ -86,33 +86,17 @@ void GeolocationController::stopUpdatingIfNeeded()
GeolocationController::~GeolocationController()
{
ASSERT(m_observers.isEmpty());
- detach();
-}
-
-void GeolocationController::detach()
-{
#if !ENABLE(OILPAN)
if (page() && m_inspectorAgent) {
m_inspectorAgent->removeController(this);
m_inspectorAgent = nullptr;
}
-#endif
if (m_hasClientForTest) {
m_client->controllerForTestRemoved(this);
m_hasClientForTest = false;
}
-}
-
-// FIXME: Oilpan: Once GeolocationClient is on-heap m_client should be a strong
-// pointer and |willBeDestroyed| can potentially be removed from Supplement.
-void GeolocationController::willBeDestroyed()
-{
- detach();
- if (m_client) {
- m_client->geolocationDestroyed();
- m_client = 0;
- }
+#endif
}
void GeolocationController::persistentHostHasBeenDestroyed()
@@ -231,6 +215,7 @@ const char* GeolocationController::supplementName()
void GeolocationController::trace(Visitor* visitor)
{
+ visitor->trace(m_client);
visitor->trace(m_lastPosition);
visitor->trace(m_observers);
visitor->trace(m_highAccuracyObservers);

Powered by Google App Engine
This is Rietveld 408576698