mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1228950 - Disallow scheme sets on nsHostObjectURI. r=bz
This commit is contained in:
parent
952f898e0a
commit
4360860a8d
@ -135,6 +135,15 @@ nsHostObjectURI::Deserialize(const mozilla::ipc::URIParams& aParams)
|
||||
return mPrincipal != nullptr;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHostObjectURI::SetScheme(const nsACString& aScheme)
|
||||
{
|
||||
// Disallow setting the scheme, since that could cause us to be associated
|
||||
// with a different protocol handler that doesn't expect us to be carrying
|
||||
// around a principal with nsIURIWithPrincipal.
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
// nsIURI methods:
|
||||
nsresult
|
||||
nsHostObjectURI::CloneInternal(nsSimpleURI::RefHandlingEnum aRefHandlingMode,
|
||||
|
@ -38,6 +38,8 @@ public:
|
||||
NS_DECL_NSICLASSINFO
|
||||
NS_DECL_NSIIPCSERIALIZABLEURI
|
||||
|
||||
NS_IMETHOD SetScheme(const nsACString &aProtocol) override;
|
||||
|
||||
// Override CloneInternal() and EqualsInternal()
|
||||
virtual nsresult CloneInternal(RefHandlingEnum aRefHandlingMode,
|
||||
nsIURI** aClone) override;
|
||||
|
Loading…
Reference in New Issue
Block a user