Bug 1317724 - Add nsIURIWithQuery declarations. r=mkmelin,rkent CLOSED TREE DONTBUILD
authorJorg K <jorgk@jorgk.com>
Wed, 16 Nov 2016 22:43:50 +0100
changeset 20716 93c90c76663078286cde1cc0edefbe895938b6c7
parent 20715 00d54e057f2f8685381ee88a5d48476ad4208e6e
child 20717 55f880ae1400cfd153b7aa53d222311361f24f29
push id12539
push usermozilla@jorgk.com
push dateWed, 16 Nov 2016 21:45:01 +0000
treeherdercomm-central@93c90c766630 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmkmelin, rkent
bugs1317724
Bug 1317724 - Add nsIURIWithQuery declarations. r=mkmelin,rkent CLOSED TREE DONTBUILD
mailnews/base/util/nsMsgMailNewsUrl.cpp
mailnews/base/util/nsMsgMailNewsUrl.h
mailnews/jsaccount/src/JaUrl.cpp
mailnews/jsaccount/src/JaUrl.h
--- a/mailnews/base/util/nsMsgMailNewsUrl.cpp
+++ b/mailnews/base/util/nsMsgMailNewsUrl.cpp
@@ -48,17 +48,17 @@ nsMsgMailNewsUrl::nsMsgMailNewsUrl()
   }                                                                    \
   PR_END_MACRO
 
 nsMsgMailNewsUrl::~nsMsgMailNewsUrl()
 {
   PR_FREEIF(m_errorMessage);
 }
   
-NS_IMPL_ISUPPORTS(nsMsgMailNewsUrl, nsIMsgMailNewsUrl, nsIURL, nsIURI)
+NS_IMPL_ISUPPORTS(nsMsgMailNewsUrl, nsIMsgMailNewsUrl, nsIURL, nsIURIWithQuery, nsIURI)
 
 ////////////////////////////////////////////////////////////////////////////////////
 // Begin nsIMsgMailNewsUrl specific support
 ////////////////////////////////////////////////////////////////////////////////////
 
 nsresult nsMsgMailNewsUrl::GetUrlState(bool * aRunningUrl)
 {
   if (aRunningUrl)
--- a/mailnews/base/util/nsMsgMailNewsUrl.h
+++ b/mailnews/base/util/nsMsgMailNewsUrl.h
@@ -39,16 +39,17 @@
 class NS_MSG_BASE nsMsgMailNewsUrl : public nsIMsgMailNewsUrl
 {
 public:
     nsMsgMailNewsUrl();
 
     NS_DECL_THREADSAFE_ISUPPORTS
     NS_DECL_NSIMSGMAILNEWSURL
     NS_DECL_NSIURI
+    NS_DECL_NSIURIWITHQUERY
     NS_DECL_NSIURL
 
 protected:
   virtual ~nsMsgMailNewsUrl();
 
   nsCOMPtr<nsIURL> m_baseURL;
   nsWeakPtr m_statusFeedbackWeak;
   nsWeakPtr m_msgWindowWeak;
--- a/mailnews/jsaccount/src/JaUrl.cpp
+++ b/mailnews/jsaccount/src/JaUrl.cpp
@@ -127,16 +127,17 @@ NS_IMPL_ISUPPORTS_INHERITED(JaCppUrlDele
                             JaBaseCppUrl,
                             msgIOverride)
 
 // Delegator object to bypass JS method override.
 NS_IMPL_ISUPPORTS(JaCppUrlDelegator::Super,
                   nsIMsgMailNewsUrl,
                   nsIMsgMessageUrl,
                   nsIURI,
+                  nsIURIWithQuery,
                   nsIURL,
                   nsIInterfaceRequestor)
 
 JaCppUrlDelegator::JaCppUrlDelegator() :
   mCppBase(new Super(this)),
   mMethods(nullptr)
 { }
 
@@ -163,16 +164,17 @@ NS_IMETHODIMP JaCppUrlDelegator::GetMeth
 
 NS_IMETHODIMP JaCppUrlDelegator::SetJsDelegate(nsISupports *aJsDelegate)
 {
   // If these QIs fail, then overrides are not provided for methods in that
   // interface, which is OK.
   mJsISupports = aJsDelegate;
   mJsIMsgMailNewsUrl = do_QueryInterface(aJsDelegate);
   mJsIURI = do_QueryInterface(aJsDelegate);
+  mJsIURIWithQuery = do_QueryInterface(aJsDelegate);
   mJsIURL = do_QueryInterface(aJsDelegate);
   mJsIMsgMessageUrl = do_QueryInterface(aJsDelegate);
   mJsIInterfaceRequestor = do_QueryInterface(aJsDelegate);
   return NS_OK;
 }
 NS_IMETHODIMP JaCppUrlDelegator::GetJsDelegate(nsISupports **aJsDelegate)
 {
   NS_ENSURE_ARG_POINTER(aJsDelegate);
--- a/mailnews/jsaccount/src/JaUrl.h
+++ b/mailnews/jsaccount/src/JaUrl.h
@@ -62,46 +62,49 @@ class JaCppUrlDelegator : public JaBaseC
                           public msgIOverride
 {
 public:
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_MSGIOVERRIDE
 
   NS_FORWARD_NSIMSGMAILNEWSURL(DELEGATE_JS(nsIMsgMailNewsUrl, mJsIMsgMailNewsUrl)->)
   NS_FORWARD_NSIURI(DELEGATE_JS(nsIURI, mJsIURI)->)
+  NS_FORWARD_NSIURIWITHQUERY(DELEGATE_JS(nsIURIWithQuery, mJsIURIWithQuery)->)
   NS_FORWARD_NSIURL(DELEGATE_JS(nsIURL, mJsIURL)->)
   NS_FORWARD_NSIMSGMESSAGEURL(DELEGATE_JS(nsIMsgMessageUrl, mJsIMsgMessageUrl)->)
   NS_FORWARD_NSIINTERFACEREQUESTOR(DELEGATE_JS(nsIInterfaceRequestor, mJsIInterfaceRequestor)->)
 
   JaCppUrlDelegator();
 
   class Super : public nsIMsgMailNewsUrl,
                 public nsIMsgMessageUrl,
                 public nsIInterfaceRequestor
   {
     public:
       Super(JaCppUrlDelegator *aFakeThis) {mFakeThis = aFakeThis;}
       NS_DECL_ISUPPORTS
       NS_FORWARD_NSIMSGMAILNEWSURL(mFakeThis->JaBaseCppUrl::)
       NS_FORWARD_NSIURI(mFakeThis->JaBaseCppUrl::)
+      NS_FORWARD_NSIURIWITHQUERY(mFakeThis->JaBaseCppUrl::)
       NS_FORWARD_NSIURL(mFakeThis->JaBaseCppUrl::)
       NS_FORWARD_NSIMSGMESSAGEURL(mFakeThis->JaBaseCppUrl::)
       NS_FORWARD_NSIINTERFACEREQUESTOR(mFakeThis->JaBaseCppUrl::)
     private:
       virtual ~Super() {}
       JaCppUrlDelegator *mFakeThis;
   };
 
 private:
   virtual ~JaCppUrlDelegator() {
   }
 
   // Interfaces that may be overridden by JS.
   nsCOMPtr<nsIMsgMailNewsUrl> mJsIMsgMailNewsUrl;
   nsCOMPtr<nsIURI> mJsIURI;
+  nsCOMPtr<nsIURIWithQuery> mJsIURIWithQuery;
   nsCOMPtr<nsIURL> mJsIURL;
   nsCOMPtr<nsIMsgMessageUrl> mJsIMsgMessageUrl;
   nsCOMPtr<nsIInterfaceRequestor> mJsIInterfaceRequestor;
 
   // Owning reference to the JS override.
   nsCOMPtr<nsISupports> mJsISupports;
 
   // Class to bypass JS delegates. nsCOMPtr for when we do cycle collection.