Index: Source/modules/geolocation/NavigatorGeolocation.cpp |
diff --git a/Source/modules/geolocation/NavigatorGeolocation.cpp b/Source/modules/geolocation/NavigatorGeolocation.cpp |
index 72429741aa9aa2e3a94e1fd45fb6b6a5bda0a225..cdb90599ab3fce6433f3419d31b2a9eafb24d635 100644 |
--- a/Source/modules/geolocation/NavigatorGeolocation.cpp |
+++ b/Source/modules/geolocation/NavigatorGeolocation.cpp |
@@ -44,19 +44,19 @@ const char* NavigatorGeolocation::supplementName() |
return "NavigatorGeolocation"; |
} |
-NavigatorGeolocation* NavigatorGeolocation::from(Navigator* navigator) |
+NavigatorGeolocation& NavigatorGeolocation::from(Navigator& navigator) |
{ |
NavigatorGeolocation* supplement = static_cast<NavigatorGeolocation*>(Supplement<Navigator>::from(navigator, supplementName())); |
if (!supplement) { |
- supplement = new NavigatorGeolocation(navigator->frame()); |
+ supplement = new NavigatorGeolocation(navigator.frame()); |
provideTo(navigator, supplementName(), adoptPtr(supplement)); |
} |
- return supplement; |
+ return *supplement; |
} |
-Geolocation* NavigatorGeolocation::geolocation(Navigator* navigator) |
+Geolocation* NavigatorGeolocation::geolocation(Navigator& navigator) |
{ |
- return NavigatorGeolocation::from(navigator)->geolocation(); |
+ return NavigatorGeolocation::from(navigator).geolocation(); |
} |
Geolocation* NavigatorGeolocation::geolocation() const |