Index: third_party/WebKit/Source/web/WebGeolocationController.cpp |
diff --git a/third_party/WebKit/Source/web/WebGeolocationController.cpp b/third_party/WebKit/Source/web/WebGeolocationController.cpp |
index 2d2a966db0b99ac41a73bf31f4c728337ac9f715..c39a4d3d8646ddb0c31f35d7857ca24560f10a38 100644 |
--- a/third_party/WebKit/Source/web/WebGeolocationController.cpp |
+++ b/third_party/WebKit/Source/web/WebGeolocationController.cpp |
@@ -35,23 +35,13 @@ |
namespace blink { |
-#if ENABLE(OILPAN) |
// TODO(Oilpan): once GeolocationController is always on the heap, |
// shorten out this GeolocationControllerPrivate intermediary. |
-class GeolocationControllerPrivate : public GeolocationController { |
+class GeolocationControllerPrivate final : public RefCountedWillBeGarbageCollected<GeolocationControllerPrivate> { |
public: |
- static GeolocationController& controller(const WebPrivatePtr<GeolocationControllerPrivate>& controller) |
+ static PassRefPtrWillBeRawPtr<GeolocationControllerPrivate> create(GeolocationController* controller) |
{ |
- ASSERT(!controller.isNull()); |
- return *controller; |
- } |
-}; |
-#else |
-class GeolocationControllerPrivate final : public RefCounted<GeolocationControllerPrivate> { |
-public: |
- static PassRefPtr<GeolocationControllerPrivate> create(GeolocationController* controller) |
- { |
- return adoptRef(new GeolocationControllerPrivate(controller)); |
+ return adoptRefWillBeNoop(new GeolocationControllerPrivate(controller)); |
} |
static GeolocationController& controller(const WebPrivatePtr<GeolocationControllerPrivate>& controller) |
@@ -61,6 +51,11 @@ public: |
return *controller->m_controller; |
} |
+ DEFINE_INLINE_TRACE() |
+ { |
+ visitor->trace(m_controller); |
+ } |
+ |
private: |
explicit GeolocationControllerPrivate(GeolocationController* controller) |
: m_controller(controller) |
@@ -70,16 +65,11 @@ private: |
// Non-Oilpan, this bare pointer is owned as a supplement and kept alive |
// by the frame of the WebLocalFrame which creates the WebGeolocationController |
// object that wraps it all up. |
- GeolocationController* m_controller; |
+ RawPtrWillBeMember<GeolocationController> m_controller; |
}; |
-#endif |
WebGeolocationController::WebGeolocationController(GeolocationController* controller) |
-#if ENABLE(OILPAN) |
- : m_private(static_cast<GeolocationControllerPrivate*>(controller)) |
-#else |
: m_private(GeolocationControllerPrivate::create(controller)) |
-#endif |
{ |
} |