summaryrefslogtreecommitdiff
path: root/Source/WebCore/Modules/geolocation/NavigatorGeolocation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/Modules/geolocation/NavigatorGeolocation.cpp')
-rw-r--r--Source/WebCore/Modules/geolocation/NavigatorGeolocation.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/Source/WebCore/Modules/geolocation/NavigatorGeolocation.cpp b/Source/WebCore/Modules/geolocation/NavigatorGeolocation.cpp
index cb9e97a28..ad56fcacf 100644
--- a/Source/WebCore/Modules/geolocation/NavigatorGeolocation.cpp
+++ b/Source/WebCore/Modules/geolocation/NavigatorGeolocation.cpp
@@ -2,7 +2,7 @@
* Copyright (C) 2000 Harri Porten (porten@kde.org)
* Copyright (c) 2000 Daniel Molkentin (molkentin@kde.org)
* Copyright (c) 2000 Stefan Schimanski (schimmi@kde.org)
- * Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc.
+ * Copyright (C) 2003, 2004, 2005, 2006 Apple Inc.
* Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
*
* This library is free software; you can redistribute it and/or
@@ -51,8 +51,9 @@ NavigatorGeolocation* NavigatorGeolocation::from(Navigator* navigator)
{
NavigatorGeolocation* supplement = static_cast<NavigatorGeolocation*>(Supplement<Navigator>::from(navigator, supplementName()));
if (!supplement) {
- supplement = new NavigatorGeolocation(navigator->frame());
- provideTo(navigator, supplementName(), adoptPtr(supplement));
+ auto newSupplement = std::make_unique<NavigatorGeolocation>(navigator->frame());
+ supplement = newSupplement.get();
+ provideTo(navigator, supplementName(), WTFMove(newSupplement));
}
return supplement;
}
@@ -65,9 +66,9 @@ void NavigatorGeolocation::resetAllGeolocationPermission()
}
#endif // PLATFORM(IOS)
-Geolocation* NavigatorGeolocation::geolocation(Navigator* navigator)
+Geolocation* NavigatorGeolocation::geolocation(Navigator& navigator)
{
- return NavigatorGeolocation::from(navigator)->geolocation();
+ return NavigatorGeolocation::from(&navigator)->geolocation();
}
Geolocation* NavigatorGeolocation::geolocation() const