mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
r=pavlov, sr=rpotts. 77906. making GetName() more generic for user presentation purposes.
This commit is contained in:
parent
75da890c11
commit
349d7fcbf7
@ -102,7 +102,7 @@ nsresult imgRequestProxy::Init(imgRequest *request, nsILoadGroup *aLoadGroup, im
|
||||
/* readonly attribute wstring name; */
|
||||
NS_IMETHODIMP imgRequestProxy::GetName(PRUnichar * *aName)
|
||||
{
|
||||
nsAutoString name(NS_LITERAL_STRING("imgRequestProxy["));
|
||||
nsAutoString name;
|
||||
if (mOwner) {
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
mOwner->GetURI(getter_AddRefs(uri));
|
||||
@ -112,10 +112,7 @@ NS_IMETHODIMP imgRequestProxy::GetName(PRUnichar * *aName)
|
||||
if (spec)
|
||||
name.Append(NS_ConvertUTF8toUCS2(spec));
|
||||
}
|
||||
} else {
|
||||
name.Append(NS_LITERAL_STRING("(null)"));
|
||||
}
|
||||
name.Append(PRUnichar(']'));
|
||||
|
||||
*aName = nsCRT::strdup(name.get());
|
||||
return NS_OK;
|
||||
|
Loading…
Reference in New Issue
Block a user