mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1168158 - Make URLValue::mString a smart pointer. r=heycam
This commit is contained in:
parent
bb019f6a50
commit
7d35de2ca3
@ -2326,7 +2326,6 @@ css::URLValue::URLValue(nsIURI* aURI, nsStringBuffer* aString,
|
||||
mURIResolved(true)
|
||||
{
|
||||
MOZ_ASSERT(aOriginPrincipal, "Must have an origin principal");
|
||||
mString->AddRef();
|
||||
}
|
||||
|
||||
css::URLValue::URLValue(nsStringBuffer* aString, nsIURI* aBaseURI,
|
||||
@ -2338,12 +2337,6 @@ css::URLValue::URLValue(nsStringBuffer* aString, nsIURI* aBaseURI,
|
||||
mURIResolved(false)
|
||||
{
|
||||
MOZ_ASSERT(aOriginPrincipal, "Must have an origin principal");
|
||||
mString->AddRef();
|
||||
}
|
||||
|
||||
css::URLValue::~URLValue()
|
||||
{
|
||||
mString->Release();
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -87,7 +87,7 @@ struct URLValue {
|
||||
nsIPrincipal* aOriginPrincipal);
|
||||
|
||||
protected:
|
||||
~URLValue();
|
||||
~URLValue() {};
|
||||
|
||||
public:
|
||||
bool operator==(const URLValue& aOther) const;
|
||||
@ -108,8 +108,7 @@ private:
|
||||
// null if the URI is invalid.
|
||||
mutable nsCOMPtr<nsIURI> mURI;
|
||||
public:
|
||||
nsStringBuffer* mString; // Could use nsRefPtr, but it'd add useless
|
||||
// null-checks; this is never null.
|
||||
nsRefPtr<nsStringBuffer> mString;
|
||||
nsCOMPtr<nsIURI> mReferrer;
|
||||
nsCOMPtr<nsIPrincipal> mOriginPrincipal;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user