From ab9b11d32d44e0fc42c51be56850b0d7b7613d0e Mon Sep 17 00:00:00 2001 From: Tim Taubert Date: Mon, 2 Feb 2015 15:36:04 +0100 Subject: [PATCH] Bug 1128479 - Don't use nsIDOMCrypto in Crypto.webidl r=smaug --- dom/base/nsGlobalWindow.cpp | 2 +- dom/base/nsGlobalWindow.h | 6 +++--- dom/webidl/Crypto.webidl | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp index 042d7ea265ae..8cf7f7aeead7 100644 --- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -4413,7 +4413,7 @@ nsGlobalWindow::GetApplicationCache(nsIDOMOfflineResourceList **aApplicationCach return rv.ErrorCode(); } -nsIDOMCrypto* +Crypto* nsGlobalWindow::GetCrypto(ErrorResult& aError) { FORWARD_TO_INNER_OR_THROW(GetCrypto, (aError), aError, nullptr); diff --git a/dom/base/nsGlobalWindow.h b/dom/base/nsGlobalWindow.h index 647fa45e06ec..be3ab37ffacc 100644 --- a/dom/base/nsGlobalWindow.h +++ b/dom/base/nsGlobalWindow.h @@ -74,7 +74,6 @@ class nsIBaseWindow; class nsIContent; class nsICSSDeclaration; class nsIDocShellTreeOwner; -class nsIDOMCrypto; class nsIDOMOfflineResourceList; class nsIScrollableFrame; class nsIControllers; @@ -101,6 +100,7 @@ class DOMEventTargetHelper; namespace dom { class BarProp; class Console; +class Crypto; class External; class Function; class Gamepad; @@ -995,7 +995,7 @@ public: } int64_t GetMozAnimationStartTime(mozilla::ErrorResult& aError); void SizeToContent(mozilla::ErrorResult& aError); - nsIDOMCrypto* GetCrypto(mozilla::ErrorResult& aError); + mozilla::dom::Crypto* GetCrypto(mozilla::ErrorResult& aError); nsIControllers* GetControllers(mozilla::ErrorResult& aError); mozilla::dom::Element* GetRealFrameElement(mozilla::ErrorResult& aError); float GetMozInnerScreenX(mozilla::ErrorResult& aError); @@ -1556,7 +1556,7 @@ protected: nsString mStatus; nsString mDefaultStatus; nsGlobalWindowObserver* mObserver; // Inner windows only. - nsCOMPtr mCrypto; + nsRefPtr mCrypto; nsRefPtr mConsole; // We need to store an nsISupports pointer to this object because the // mozilla::dom::External class doesn't exist on b2g and using the type diff --git a/dom/webidl/Crypto.webidl b/dom/webidl/Crypto.webidl index 984707fbfea6..9a89efc5fca7 100644 --- a/dom/webidl/Crypto.webidl +++ b/dom/webidl/Crypto.webidl @@ -9,8 +9,7 @@ [NoInterfaceObject] interface GlobalCrypto { - //[Throws] readonly attribute Crypto crypto; - [Throws] readonly attribute nsIDOMCrypto crypto; + [Throws] readonly attribute Crypto crypto; }; //[Exposed=(Window,Worker)]