mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 849665 - Outparamdel nsHTMLDocument::GetDomainURI; r=khuey
This commit is contained in:
parent
947d25f1a8
commit
fe39d61dc1
@ -937,15 +937,19 @@ nsHTMLDocument::SetCompatibilityMode(nsCompatibility aMode)
|
||||
//
|
||||
// nsIDOMHTMLDocument interface implementation
|
||||
//
|
||||
void
|
||||
nsHTMLDocument::GetDomainURI(nsIURI **aURI)
|
||||
already_AddRefed<nsIURI>
|
||||
nsHTMLDocument::GetDomainURI()
|
||||
{
|
||||
nsIPrincipal *principal = NodePrincipal();
|
||||
nsIPrincipal* principal = NodePrincipal();
|
||||
|
||||
principal->GetDomain(aURI);
|
||||
if (!*aURI) {
|
||||
principal->GetURI(aURI);
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
principal->GetDomain(getter_AddRefs(uri));
|
||||
if (uri) {
|
||||
return uri.forget();
|
||||
}
|
||||
|
||||
principal->GetURI(getter_AddRefs(uri));
|
||||
return uri.forget();
|
||||
}
|
||||
|
||||
|
||||
@ -960,8 +964,7 @@ nsHTMLDocument::GetDomain(nsAString& aDomain)
|
||||
void
|
||||
nsHTMLDocument::GetDomain(nsAString& aDomain, ErrorResult& rv)
|
||||
{
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
GetDomainURI(getter_AddRefs(uri));
|
||||
nsCOMPtr<nsIURI> uri = GetDomainURI();
|
||||
|
||||
if (!uri) {
|
||||
rv.Throw(NS_ERROR_FAILURE);
|
||||
@ -996,8 +999,7 @@ nsHTMLDocument::SetDomain(const nsAString& aDomain, ErrorResult& rv)
|
||||
}
|
||||
|
||||
// Create new URI
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
GetDomainURI(getter_AddRefs(uri));
|
||||
nsCOMPtr<nsIURI> uri = GetDomainURI();
|
||||
|
||||
if (!uri) {
|
||||
rv.Throw(NS_ERROR_FAILURE);
|
||||
|
@ -268,7 +268,7 @@ protected:
|
||||
|
||||
static void DocumentWriteTerminationFunc(nsISupports *aRef);
|
||||
|
||||
void GetDomainURI(nsIURI **uri);
|
||||
already_AddRefed<nsIURI> GetDomainURI();
|
||||
|
||||
nsresult WriteCommon(JSContext *cx, const nsAString& aText,
|
||||
bool aNewlineTerminate);
|
||||
|
Loading…
Reference in New Issue
Block a user