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

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

Issue 314873002: Oilpan: Move GeolocationController back to off-heap (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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 3a599227efb35c7f56f2c2384f285cf02a36b75a..2c6a11068c05420ae83491a42bcd006242b75714 100644
--- a/Source/modules/geolocation/GeolocationController.cpp
+++ b/Source/modules/geolocation/GeolocationController.cpp
@@ -96,9 +96,9 @@ void GeolocationController::willBeDestroyed()
m_client->geolocationDestroyed();
}
-PassOwnPtrWillBeRawPtr<GeolocationController> GeolocationController::create(LocalFrame& frame, GeolocationClient* client)
+PassOwnPtr<GeolocationController> GeolocationController::create(LocalFrame& frame, GeolocationClient* client)
{
- return adoptPtrWillBeNoop(new GeolocationController(frame, client));
+ return adoptPtr(new GeolocationController(frame, client));
}
void GeolocationController::addObserver(Geolocation* observer, bool enableHighAccuracy)
@@ -154,7 +154,7 @@ void GeolocationController::positionChanged(GeolocationPosition* position)
return;
}
m_lastPosition = position;
- WillBeHeapVector<RefPtrWillBeMember<Geolocation> > observersVector;
+ WillBePersistentHeapVector<RefPtrWillBeMember<Geolocation> > observersVector;
Mads Ager (chromium) 2014/06/04 06:20:15 This is on the stack, so we should be able to stil
copyToVector(m_observers, observersVector);
for (size_t i = 0; i < observersVector.size(); ++i)
observersVector[i]->positionChanged();
@@ -162,7 +162,7 @@ void GeolocationController::positionChanged(GeolocationPosition* position)
void GeolocationController::errorOccurred(GeolocationError* error)
{
- WillBeHeapVector<RefPtrWillBeMember<Geolocation> > observersVector;
+ WillBePersistentHeapVector<RefPtrWillBeMember<Geolocation> > observersVector;
Mads Ager (chromium) 2014/06/04 06:20:15 Ditto.
copyToVector(m_observers, observersVector);
for (size_t i = 0; i < observersVector.size(); ++i)
observersVector[i]->setError(error);
@@ -203,17 +203,9 @@ const char* GeolocationController::supplementName()
return "GeolocationController";
}
-void GeolocationController::trace(Visitor* visitor)
-{
- visitor->trace(m_lastPosition);
- visitor->trace(m_observers);
- visitor->trace(m_highAccuracyObservers);
- WillBeHeapSupplement<LocalFrame>::trace(visitor);
-}
-
void provideGeolocationTo(LocalFrame& frame, GeolocationClient* client)
{
- WillBeHeapSupplement<LocalFrame>::provideTo(frame, GeolocationController::supplementName(), GeolocationController::create(frame, client));
+ Supplement<LocalFrame>::provideTo(frame, GeolocationController::supplementName(), GeolocationController::create(frame, client));
}
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698