diff --git a/dom/base/nsGlobalWindowOuter.cpp b/dom/base/nsGlobalWindowOuter.cpp index bda3c526ecbb..ae7bd979df1c 100644 --- a/dom/base/nsGlobalWindowOuter.cpp +++ b/dom/base/nsGlobalWindowOuter.cpp @@ -2603,7 +2603,7 @@ nsPIDOMWindowOuter::SetFrameElementInternal(Element* aFrameElement) mFrameElement = aFrameElement; } -nsIDOMNavigator* +Navigator* nsGlobalWindowOuter::GetNavigator() { FORWARD_TO_INNER(Navigator, (), nullptr); diff --git a/dom/base/nsGlobalWindowOuter.h b/dom/base/nsGlobalWindowOuter.h index 5a208ed1896a..ca7ab07f3444 100644 --- a/dom/base/nsGlobalWindowOuter.h +++ b/dom/base/nsGlobalWindowOuter.h @@ -608,7 +608,7 @@ public: nsIDocShellLoadInfo* aLoadInfo, bool aForceNoOpener, nsPIDOMWindowOuter **_retval) override; - nsIDOMNavigator* GetNavigator() override; + mozilla::dom::Navigator* GetNavigator() override; #if defined(MOZ_WIDGET_ANDROID) int16_t Orientation(mozilla::dom::CallerType aCallerType) const; diff --git a/dom/base/nsPIDOMWindow.h b/dom/base/nsPIDOMWindow.h index 56094af4f3e2..d33a5f258470 100644 --- a/dom/base/nsPIDOMWindow.h +++ b/dom/base/nsPIDOMWindow.h @@ -1101,7 +1101,7 @@ public: // XXX(nika): These feel like they should be inner window only, but they're // called on the outer window. virtual nsIDOMScreen* GetScreen() = 0; - virtual nsIDOMNavigator* GetNavigator() = 0; + virtual mozilla::dom::Navigator* GetNavigator() = 0; virtual mozilla::dom::Location* GetLocation() = 0; virtual nsresult GetPrompter(nsIPrompt** aPrompt) = 0; diff --git a/netwerk/protocol/http/nsHttpHandler.cpp b/netwerk/protocol/http/nsHttpHandler.cpp index e2515c958e54..698981e0e70b 100644 --- a/netwerk/protocol/http/nsHttpHandler.cpp +++ b/netwerk/protocol/http/nsHttpHandler.cpp @@ -16,8 +16,6 @@ #include "nsHttpAuthCache.h" #include "nsStandardURL.h" #include "nsIDOMWindow.h" -#include "nsIDOMNavigator.h" -#include "nsIMozNavigatorNetwork.h" #include "nsINetworkProperties.h" #include "nsIHttpChannel.h" #include "nsIStandardURL.h" @@ -69,6 +67,7 @@ #include "mozilla/BasePrincipal.h" #include "mozilla/dom/ContentParent.h" +#include "mozilla/dom/Navigator.h" #include "nsNSSComponent.h" @@ -2655,14 +2654,12 @@ nsHttpHandler::TickleWifi(nsIInterfaceRequestor *cb) if (!piWindow) return; - nsCOMPtr domNavigator = piWindow->GetNavigator(); - nsCOMPtr networkNavigator = - do_QueryInterface(domNavigator); - if (!networkNavigator) + RefPtr navigator = piWindow->GetNavigator(); + if (!navigator) return; nsCOMPtr networkProperties; - networkNavigator->GetProperties(getter_AddRefs(networkProperties)); + navigator->GetProperties(getter_AddRefs(networkProperties)); if (!networkProperties) return;