Bug 1522847 - Port bug 1522596: Remove reference to nsIIPCSerializableURI and implement Serialize() for AB, mailto and LDAP URLs. r=mkmelin

This commit is contained in:
Jorg K 2019-01-25 22:54:30 +01:00
Родитель 5a3003050d
Коммит 4bf9c01517
5 изменённых файлов: 21 добавлений и 11 удалений

Просмотреть файл

@ -723,6 +723,12 @@ nsresult nsLDAPURL::SetQueryWithEncoding(const nsACString &aQuery, const mozilla
return NS_MutateURI(mBaseURL).SetQueryWithEncoding(aQuery, aEncoding).Finalize(mBaseURL);
}
NS_IMETHODIMP_(void)
nsLDAPURL::Serialize(mozilla::ipc::URIParams &aParams)
{
mBaseURL->Serialize(aParams);
}
NS_IMPL_ISUPPORTS(nsLDAPURL::Mutator, nsIURISetters, nsIURIMutator)
NS_IMETHODIMP

Просмотреть файл

@ -240,6 +240,12 @@ nsresult nsAddbookUrl::SetQueryWithEncoding(const nsACString &aQuery, const mozi
return NS_MutateURI(m_baseURL).SetQueryWithEncoding(aQuery, aEncoding).Finalize(m_baseURL);
}
NS_IMETHODIMP_(void)
nsAddbookUrl::Serialize(mozilla::ipc::URIParams &aParams)
{
m_baseURL->Serialize(aParams);
}
NS_IMETHODIMP nsAddbookUrl::EqualsExceptRef(nsIURI *other, bool *_retval)
{
// The passed-in URI might be an nsMailtoUrl. Pass our inner URL to its

Просмотреть файл

@ -85,7 +85,6 @@ NS_INTERFACE_MAP_BEGIN(nsMsgMailNewsUrl)
NS_INTERFACE_MAP_ENTRY(nsIURI)
NS_INTERFACE_MAP_ENTRY(nsISerializable)
NS_INTERFACE_MAP_ENTRY(nsIClassInfo)
NS_INTERFACE_MAP_ENTRY(nsIIPCSerializableURI)
NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsIURIWithSpecialOrigin, m_hasNormalizedOrigin)
NS_INTERFACE_MAP_END
@ -97,12 +96,8 @@ NS_INTERFACE_MAP_END
// cause problems in the future. See bug 1512356 and bug 1515337 for details,
// follow-up in bug 1512698.
//----------------------------------
// Support for nsIIPCSerializableURI
//----------------------------------
void nsMsgMailNewsUrl::Serialize(mozilla::ipc::URIParams &aParams) {
nsCOMPtr<nsIIPCSerializableURI> serializable = do_QueryInterface(m_baseURL);
return serializable->Serialize(aParams);
NS_IMETHODIMP_(void) nsMsgMailNewsUrl::Serialize(mozilla::ipc::URIParams &aParams) {
m_baseURL->Serialize(aParams);
}
//----------------------------

Просмотреть файл

@ -28,7 +28,6 @@
#include "nsIURIMutator.h"
#include "nsISerializable.h"
#include "nsIClassInfo.h"
#include "nsIIPCSerializableURI.h"
///////////////////////////////////////////////////////////////////////////////////
// Okay, I found that all of the mail and news url interfaces needed to support
@ -44,8 +43,7 @@
class NS_MSG_BASE nsMsgMailNewsUrl : public nsIMsgMailNewsUrl,
public nsIURIWithSpecialOrigin,
public nsISerializable,
public nsIClassInfo,
public nsIIPCSerializableURI
public nsIClassInfo
{
public:
nsMsgMailNewsUrl();
@ -57,7 +55,6 @@ public:
NS_DECL_NSIURIWITHSPECIALORIGIN
NS_DECL_NSISERIALIZABLE
NS_DECL_NSICLASSINFO
NS_DECL_NSIIPCSERIALIZABLEURI
protected:
virtual nsresult Clone(nsIURI **_retval);

Просмотреть файл

@ -629,6 +629,12 @@ nsresult nsMailtoUrl::SetQueryWithEncoding(const nsACString &aQuery, const mozil
return NS_MutateURI(m_baseURL).SetQueryWithEncoding(aQuery, aEncoding).Finalize(m_baseURL);
}
NS_IMETHODIMP_(void)
nsMailtoUrl::Serialize(mozilla::ipc::URIParams &aParams)
{
m_baseURL->Serialize(aParams);
}
NS_IMPL_ISUPPORTS(nsMailtoUrl::Mutator, nsIURISetters, nsIURIMutator)
NS_IMETHODIMP