diff --git a/dom/base/nsIFrameLoader.idl b/dom/base/nsIFrameLoader.idl index 2fe29b3a78ce..bab9979a9290 100644 --- a/dom/base/nsIFrameLoader.idl +++ b/dom/base/nsIFrameLoader.idl @@ -256,7 +256,7 @@ interface nsIFrameLoaderOwner : nsISupports /** * The frame loader owned by this nsIFrameLoaderOwner */ - readonly attribute nsIFrameLoader frameLoader; + [binaryname(FrameLoaderXPCOM)] readonly attribute nsIFrameLoader frameLoader; [noscript, notxpcom] alreadyAddRefed_nsFrameLoader GetFrameLoader(); /** diff --git a/dom/base/nsObjectLoadingContent.cpp b/dom/base/nsObjectLoadingContent.cpp index 5c492322fa3e..b431d6038d1d 100644 --- a/dom/base/nsObjectLoadingContent.cpp +++ b/dom/base/nsObjectLoadingContent.cpp @@ -1235,7 +1235,7 @@ nsObjectLoadingContent::OnDataAvailable(nsIRequest *aRequest, // nsIFrameLoaderOwner NS_IMETHODIMP -nsObjectLoadingContent::GetFrameLoader(nsIFrameLoader** aFrameLoader) +nsObjectLoadingContent::GetFrameLoaderXPCOM(nsIFrameLoader** aFrameLoader) { NS_IF_ADDREF(*aFrameLoader = mFrameLoader); return NS_OK; diff --git a/dom/browser-element/BrowserElementParent.cpp b/dom/browser-element/BrowserElementParent.cpp index ce71b254be48..d1daf26e0258 100644 --- a/dom/browser-element/BrowserElementParent.cpp +++ b/dom/browser-element/BrowserElementParent.cpp @@ -301,8 +301,7 @@ BrowserElementParent::OpenWindowInProcess(nsPIDOMWindowOuter* aOpenerWindow, } // Return popupFrameElement's window. - nsCOMPtr frameLoader; - popupFrameElement->GetFrameLoader(getter_AddRefs(frameLoader)); + RefPtr frameLoader = popupFrameElement->GetFrameLoader(); NS_ENSURE_TRUE(frameLoader, BrowserElementParent::OPEN_WINDOW_IGNORED); nsCOMPtr docshell; diff --git a/dom/html/nsGenericHTMLFrameElement.cpp b/dom/html/nsGenericHTMLFrameElement.cpp index 6400e1dfc7ef..a795fc151bc9 100644 --- a/dom/html/nsGenericHTMLFrameElement.cpp +++ b/dom/html/nsGenericHTMLFrameElement.cpp @@ -174,7 +174,7 @@ nsGenericHTMLFrameElement::CreateRemoteFrameLoader(nsITabParent* aTabParent) } NS_IMETHODIMP -nsGenericHTMLFrameElement::GetFrameLoader(nsIFrameLoader **aFrameLoader) +nsGenericHTMLFrameElement::GetFrameLoaderXPCOM(nsIFrameLoader **aFrameLoader) { NS_IF_ADDREF(*aFrameLoader = mFrameLoader); return NS_OK; diff --git a/dom/presentation/PresentationSessionInfo.cpp b/dom/presentation/PresentationSessionInfo.cpp index 4df73791f366..ff0a04314e1c 100644 --- a/dom/presentation/PresentationSessionInfo.cpp +++ b/dom/presentation/PresentationSessionInfo.cpp @@ -15,7 +15,7 @@ #include "nsContentUtils.h" #include "nsGlobalWindow.h" #include "nsIDocShell.h" -#include "nsIFrameLoader.h" +#include "nsFrameLoader.h" #include "nsIMutableArray.h" #include "nsINetAddr.h" #include "nsISocketTransport.h" @@ -1366,9 +1366,8 @@ PresentationPresentingInfo::ResolvedCallback(JSContext* aCx, return; } - nsCOMPtr frameLoader; - rv = owner->GetFrameLoader(getter_AddRefs(frameLoader)); - if (NS_WARN_IF(NS_FAILED(rv))) { + nsCOMPtr frameLoader = owner->GetFrameLoader(); + if (NS_WARN_IF(!frameLoader)) { ReplyError(NS_ERROR_DOM_OPERATION_ERR); return; } diff --git a/dom/xul/nsXULElement.cpp b/dom/xul/nsXULElement.cpp index a61d24da85e4..e66fdedac1c1 100644 --- a/dom/xul/nsXULElement.cpp +++ b/dom/xul/nsXULElement.cpp @@ -1589,7 +1589,7 @@ nsXULElement::LoadSrc() } nsresult -nsXULElement::GetFrameLoader(nsIFrameLoader **aFrameLoader) +nsXULElement::GetFrameLoaderXPCOM(nsIFrameLoader **aFrameLoader) { *aFrameLoader = GetFrameLoader().take(); return NS_OK; diff --git a/dom/xul/nsXULElement.h b/dom/xul/nsXULElement.h index ca16188da5aa..da3482697859 100644 --- a/dom/xul/nsXULElement.h +++ b/dom/xul/nsXULElement.h @@ -411,7 +411,7 @@ public: virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) const override; virtual mozilla::EventStates IntrinsicState() const override; - nsresult GetFrameLoader(nsIFrameLoader** aFrameLoader); + nsresult GetFrameLoaderXPCOM(nsIFrameLoader** aFrameLoader); nsresult GetParentApplication(mozIApplication** aApplication); nsresult SetIsPrerendered(); diff --git a/layout/generic/nsSubDocumentFrame.cpp b/layout/generic/nsSubDocumentFrame.cpp index e3214ddd70ca..6439347a0a21 100644 --- a/layout/generic/nsSubDocumentFrame.cpp +++ b/layout/generic/nsSubDocumentFrame.cpp @@ -1038,9 +1038,7 @@ nsSubDocumentFrame::FrameLoader() if (!mFrameLoader) { nsCOMPtr loaderOwner = do_QueryInterface(content); if (loaderOwner) { - nsCOMPtr loader; - loaderOwner->GetFrameLoader(getter_AddRefs(loader)); - mFrameLoader = static_cast(loader.get()); + mFrameLoader = loaderOwner->GetFrameLoader(); } } return mFrameLoader;