making string conversions explicit
git-svn-id: svn://10.0.0.236/trunk@66194 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -285,9 +285,8 @@ nsDocShell::SetDocument(nsIDOMDocument *aDOMDoc, nsIDOMElement *aRootNode)
|
||||
NS_ENSURE_SUCCESS(SetupNewViewer(documentViewer), NS_ERROR_FAILURE);
|
||||
|
||||
// XXX: It would be great to get rid of this dummy channel!
|
||||
const nsAutoString uriString = "about:blank";
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
NS_ENSURE_SUCCESS(NS_NewURI(getter_AddRefs(uri), uriString), NS_ERROR_FAILURE);
|
||||
NS_ENSURE_SUCCESS(NS_NewURI(getter_AddRefs(uri), NS_ConvertASCIItoUCS2("about:blank")), NS_ERROR_FAILURE);
|
||||
NS_ENSURE_TRUE(uri, NS_ERROR_OUT_OF_MEMORY);
|
||||
|
||||
nsCOMPtr<nsIChannel> dummyChannel;
|
||||
@@ -1036,8 +1035,7 @@ NS_IMETHODIMP nsDocShell::LoadURI(const PRUnichar* aURI)
|
||||
NS_ENSURE_TRUE(stringBundle, NS_ERROR_FAILURE);
|
||||
|
||||
nsXPIDLString messageStr;
|
||||
nsAutoString name("protocolNotFound");
|
||||
NS_ENSURE_SUCCESS(stringBundle->GetStringFromName(name.GetUnicode(),
|
||||
NS_ENSURE_SUCCESS(stringBundle->GetStringFromName(NS_ConvertASCIItoUCS2("protocolNotFound").GetUnicode(),
|
||||
getter_Copies(messageStr)), NS_ERROR_FAILURE);
|
||||
|
||||
nsAutoString uriString(aURI);
|
||||
@@ -1047,7 +1045,7 @@ NS_IMETHODIMP nsDocShell::LoadURI(const PRUnichar* aURI)
|
||||
uriString.Left(scheme, colon);
|
||||
|
||||
nsAutoString dnsMsg(scheme);
|
||||
dnsMsg.Append(' ');
|
||||
dnsMsg.AppendWithConversion(' ');
|
||||
dnsMsg.Append(messageStr);
|
||||
|
||||
prompter->Alert(dnsMsg.GetUnicode());
|
||||
@@ -1141,8 +1139,7 @@ NS_IMETHODIMP nsDocShell::GetCurrentURI(PRUnichar** aCurrentURI)
|
||||
char* spec;
|
||||
NS_ENSURE_SUCCESS(mCurrentURI->GetSpec(&spec), NS_ERROR_FAILURE);
|
||||
|
||||
nsAutoString strSpec(spec);
|
||||
*aCurrentURI = strSpec.ToNewUnicode();
|
||||
*aCurrentURI = NS_ConvertASCIItoUCS2(spec).ToNewUnicode();
|
||||
|
||||
if(spec)
|
||||
nsCRT::free(spec);
|
||||
@@ -2329,9 +2326,9 @@ NS_IMETHODIMP nsDocShell::CreateFixupURI(const PRUnichar* aStringURI,
|
||||
|
||||
// insert url spec corresponding to host name
|
||||
if(hostSpec.EqualsIgnoreCase("ftp"))
|
||||
uriString.Insert("ftp://", 0, 6);
|
||||
uriString.InsertWithConversion("ftp://", 0, 6);
|
||||
else
|
||||
uriString.Insert("http://", 0, 7);
|
||||
uriString.InsertWithConversion("http://", 0, 7);
|
||||
} // end if colon
|
||||
|
||||
return NS_NewURI(aURI, uriString.GetUnicode(), nsnull);
|
||||
@@ -2385,7 +2382,7 @@ NS_IMETHODIMP nsDocShell::ConvertFileToStringURI(nsString& aIn, nsString& aOut)
|
||||
#endif
|
||||
|
||||
// Build the file URL
|
||||
aOut.Insert(FILE_PROTOCOL,0);
|
||||
aOut.InsertWithConversion(FILE_PROTOCOL,0);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
@@ -2398,11 +2395,11 @@ NS_IMETHODIMP nsDocShell::ConvertStringURIToFileCharset(nsString& aIn,
|
||||
aOut = "";
|
||||
// for file url, we need to convert the nsString to the file system
|
||||
// charset before we pass to NS_NewURI
|
||||
static nsAutoString fsCharset("");
|
||||
static nsAutoString fsCharset;
|
||||
// find out the file system charset first
|
||||
if(0 == fsCharset.Length())
|
||||
{
|
||||
fsCharset = "ISO-8859-1"; // set the fallback first.
|
||||
fsCharset.AssignWithConversion("ISO-8859-1"); // set the fallback first.
|
||||
nsCOMPtr<nsIPlatformCharset> plat(do_GetService(kPlatformCharsetCID));
|
||||
NS_ENSURE_TRUE(plat, NS_ERROR_FAILURE);
|
||||
NS_ENSURE_SUCCESS(plat->GetCharset(kPlatformCharsetSel_FileName, fsCharset),
|
||||
@@ -2749,21 +2746,21 @@ NS_IMETHODIMP nsDocShell::ShouldAddToGlobalHistory(nsIURI* aURI,
|
||||
nsXPIDLCString scheme;
|
||||
NS_ENSURE_SUCCESS(aURI->GetScheme(getter_Copies(scheme)), NS_ERROR_FAILURE);
|
||||
|
||||
nsAutoString schemeStr(scheme);
|
||||
nsAutoString schemeStr; schemeStr.AssignWithConversion(scheme);
|
||||
|
||||
// The model is really if we don't know differently then add which basically
|
||||
// means we are suppose to try all the things we know not to allow in and
|
||||
// then if we don't bail go on and allow it in. But here lets compare
|
||||
// against the most common case we know to allow in and go on and say yes
|
||||
// to it.
|
||||
if(schemeStr.Equals("http") || schemeStr.Equals("https"))
|
||||
if(schemeStr.EqualsWithConversion("http") || schemeStr.EqualsWithConversion("https"))
|
||||
{
|
||||
*aShouldAdd = PR_TRUE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if(schemeStr.Equals("about") || schemeStr.Equals("imap") ||
|
||||
schemeStr.Equals("news") || schemeStr.Equals("mailbox"))
|
||||
if(schemeStr.EqualsWithConversion("about") || schemeStr.EqualsWithConversion("imap") ||
|
||||
schemeStr.EqualsWithConversion("news") || schemeStr.EqualsWithConversion("mailbox"))
|
||||
return NS_OK;
|
||||
|
||||
*aShouldAdd = PR_TRUE;
|
||||
|
||||
@@ -403,7 +403,6 @@ nsWebShell::nsWebShell() : nsDocShell()
|
||||
mThreadEventQueue = nsnull;
|
||||
InitFrameData();
|
||||
mItemType = typeContent;
|
||||
mDefaultCharacterSet = "";
|
||||
mProcessedEndDocumentLoad = PR_FALSE;
|
||||
mCharsetReloadState = eCharsetReloadInit;
|
||||
mHistoryState = nsnull;
|
||||
@@ -1158,8 +1157,7 @@ nsWebShell::GetURL(PRInt32 aIndex, const PRUnichar** aURLResult)
|
||||
nsXPIDLCString spec;
|
||||
uri->GetSpec(getter_Copies(spec));
|
||||
|
||||
nsAutoString uriSpec(spec);
|
||||
*aURLResult = uriSpec.ToNewUnicode();
|
||||
*aURLResult = NS_ConvertASCIItoUCS2(spec).ToNewUnicode();
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
@@ -1197,14 +1195,12 @@ nsWebShell::LoadDocument(const char* aURL,
|
||||
muDV->GetHintCharacterSetSource((PRInt32 *)(&hint));
|
||||
if( aSource > hint )
|
||||
{
|
||||
nsAutoString inputCharSet(aCharset);
|
||||
muDV->SetHintCharacterSet(inputCharSet.GetUnicode());
|
||||
muDV->SetHintCharacterSet(NS_ConvertASCIItoUCS2(aCharset).GetUnicode());
|
||||
muDV->SetHintCharacterSetSource((PRInt32)aSource);
|
||||
if(eCharsetReloadRequested != mCharsetReloadState)
|
||||
{
|
||||
mCharsetReloadState = eCharsetReloadRequested;
|
||||
nsAutoString url(aURL);
|
||||
LoadURI(url.GetUnicode());
|
||||
LoadURI(NS_ConvertASCIItoUCS2(aURL).GetUnicode());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1229,8 +1225,7 @@ nsWebShell::ReloadDocument(const char* aCharset,
|
||||
muDV->GetHintCharacterSetSource((PRInt32 *)(&hint));
|
||||
if( aSource > hint )
|
||||
{
|
||||
nsAutoString inputCharSet(aCharset);
|
||||
muDV->SetHintCharacterSet(inputCharSet.GetUnicode());
|
||||
muDV->SetHintCharacterSet(NS_ConvertASCIItoUCS2(aCharset).GetUnicode());
|
||||
muDV->SetHintCharacterSetSource((PRInt32)aSource);
|
||||
if(eCharsetReloadRequested != mCharsetReloadState)
|
||||
{
|
||||
@@ -1375,7 +1370,7 @@ nsWebShell::HandleLinkClickEvent(nsIContent *aContent,
|
||||
|
||||
switch(aVerb) {
|
||||
case eLinkVerb_New:
|
||||
target.Assign("_blank");
|
||||
target.AssignWithConversion("_blank");
|
||||
// Fall into replace case
|
||||
case eLinkVerb_Undefined:
|
||||
// Fall through, this seems like the most reasonable action
|
||||
@@ -1387,7 +1382,9 @@ nsWebShell::HandleLinkClickEvent(nsIContent *aContent,
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
NS_NewURI(getter_AddRefs(uri), aURLSpec, nsnull);
|
||||
|
||||
InternalLoad(uri, mCurrentURI, nsCAutoString(aTargetSpec), aPostDataStream, loadLink);
|
||||
nsCAutoString tempTargetSpecCString;
|
||||
tempTargetSpecCString.AssignWithConversion(aTargetSpec);
|
||||
InternalLoad(uri, mCurrentURI, tempTargetSpecCString, aPostDataStream, loadLink);
|
||||
}
|
||||
break;
|
||||
case eLinkVerb_Embed:
|
||||
@@ -1605,8 +1602,8 @@ nsWebShell::OnEndDocumentLoad(nsIDocumentLoader* loader,
|
||||
|
||||
if (keywordsEnabled && (-1 == dotLoc)) {
|
||||
// only send non-qualified hosts to the keyword server
|
||||
nsAutoString keywordSpec("keyword:");
|
||||
keywordSpec.Append(host);
|
||||
nsAutoString keywordSpec; keywordSpec.AssignWithConversion("keyword:");
|
||||
keywordSpec.AppendWithConversion(host);
|
||||
return LoadURI(keywordSpec.GetUnicode());
|
||||
} // end keywordsEnabled
|
||||
}
|
||||
@@ -1643,9 +1640,8 @@ nsWebShell::OnEndDocumentLoad(nsIDocumentLoader* loader,
|
||||
nsXPIDLCString aSpec;
|
||||
rv = aURL->GetSpec(getter_Copies(aSpec));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
nsAutoString newURL(aSpec);
|
||||
// reload the url
|
||||
return LoadURI(newURL.GetUnicode());
|
||||
return LoadURI(NS_ConvertASCIItoUCS2(aSpec).GetUnicode());
|
||||
} // retry
|
||||
|
||||
// throw a DNS failure dialog
|
||||
@@ -1653,12 +1649,11 @@ nsWebShell::OnEndDocumentLoad(nsIDocumentLoader* loader,
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsXPIDLString messageStr;
|
||||
nsAutoString name("dnsNotFound");
|
||||
rv = mStringBundle->GetStringFromName(name.GetUnicode(), getter_Copies(messageStr));
|
||||
rv = mStringBundle->GetStringFromName(NS_ConvertASCIItoUCS2("dnsNotFound").GetUnicode(), getter_Copies(messageStr));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
errorMsg.Assign(host);
|
||||
errorMsg.Append(' ');
|
||||
errorMsg.AssignWithConversion(host);
|
||||
errorMsg.AppendWithConversion(' ');
|
||||
errorMsg.Append(messageStr);
|
||||
|
||||
(void)mPrompter->Alert(errorMsg.GetUnicode());
|
||||
@@ -1675,18 +1670,17 @@ nsWebShell::OnEndDocumentLoad(nsIDocumentLoader* loader,
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsXPIDLString messageStr;
|
||||
nsAutoString name("connectionFailure");
|
||||
rv = mStringBundle->GetStringFromName(name.GetUnicode(), getter_Copies(messageStr));
|
||||
rv = mStringBundle->GetStringFromName(NS_ConvertASCIItoUCS2("connectionFailure").GetUnicode(), getter_Copies(messageStr));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
errorMsg.Assign(messageStr);
|
||||
errorMsg.Append(' ');
|
||||
errorMsg.Append(host);
|
||||
errorMsg.AppendWithConversion(' ');
|
||||
errorMsg.AppendWithConversion(host);
|
||||
if (port > 0) {
|
||||
errorMsg.Append(':');
|
||||
errorMsg.Append(port);
|
||||
errorMsg.AppendWithConversion(':');
|
||||
errorMsg.AppendInt(port);
|
||||
}
|
||||
errorMsg.Append('.');
|
||||
errorMsg.AppendWithConversion('.');
|
||||
|
||||
(void)mPrompter->Alert(errorMsg.GetUnicode());
|
||||
} else // end NS_ERROR_CONNECTION_REFUSED
|
||||
@@ -1698,14 +1692,13 @@ nsWebShell::OnEndDocumentLoad(nsIDocumentLoader* loader,
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsXPIDLString messageStr;
|
||||
nsAutoString name("netTimeout");
|
||||
rv = mStringBundle->GetStringFromName(name.GetUnicode(), getter_Copies(messageStr));
|
||||
rv = mStringBundle->GetStringFromName(NS_ConvertASCIItoUCS2("netTimeout").GetUnicode(), getter_Copies(messageStr));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
errorMsg.Assign(messageStr);
|
||||
errorMsg.Append(' ');
|
||||
errorMsg.Append(host);
|
||||
errorMsg.Append('.');
|
||||
errorMsg.AppendWithConversion(' ');
|
||||
errorMsg.AppendWithConversion(host);
|
||||
errorMsg.AppendWithConversion('.');
|
||||
|
||||
(void)mPrompter->Alert(errorMsg.GetUnicode());
|
||||
} // end NS_ERROR_NET_TIMEOUT
|
||||
@@ -2104,9 +2097,8 @@ NS_IMETHODIMP nsWebShell::SetDocument(nsIDOMDocument *aDOMDoc,
|
||||
NS_ENSURE_SUCCESS(SetupNewViewer(documentViewer), NS_ERROR_FAILURE);
|
||||
|
||||
// XXX: It would be great to get rid of this dummy channel!
|
||||
const nsAutoString uriString = "about:blank";
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
NS_ENSURE_SUCCESS(NS_NewURI(getter_AddRefs(uri), uriString), NS_ERROR_FAILURE);
|
||||
NS_ENSURE_SUCCESS(NS_NewURI(getter_AddRefs(uri), NS_ConvertASCIItoUCS2("about:blank")), NS_ERROR_FAILURE);
|
||||
if (!uri) { return NS_ERROR_OUT_OF_MEMORY; }
|
||||
|
||||
nsCOMPtr<nsIChannel> dummyChannel;
|
||||
|
||||
@@ -403,7 +403,6 @@ nsWebShell::nsWebShell() : nsDocShell()
|
||||
mThreadEventQueue = nsnull;
|
||||
InitFrameData();
|
||||
mItemType = typeContent;
|
||||
mDefaultCharacterSet = "";
|
||||
mProcessedEndDocumentLoad = PR_FALSE;
|
||||
mCharsetReloadState = eCharsetReloadInit;
|
||||
mHistoryState = nsnull;
|
||||
@@ -1158,8 +1157,7 @@ nsWebShell::GetURL(PRInt32 aIndex, const PRUnichar** aURLResult)
|
||||
nsXPIDLCString spec;
|
||||
uri->GetSpec(getter_Copies(spec));
|
||||
|
||||
nsAutoString uriSpec(spec);
|
||||
*aURLResult = uriSpec.ToNewUnicode();
|
||||
*aURLResult = NS_ConvertASCIItoUCS2(spec).ToNewUnicode();
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
@@ -1197,14 +1195,12 @@ nsWebShell::LoadDocument(const char* aURL,
|
||||
muDV->GetHintCharacterSetSource((PRInt32 *)(&hint));
|
||||
if( aSource > hint )
|
||||
{
|
||||
nsAutoString inputCharSet(aCharset);
|
||||
muDV->SetHintCharacterSet(inputCharSet.GetUnicode());
|
||||
muDV->SetHintCharacterSet(NS_ConvertASCIItoUCS2(aCharset).GetUnicode());
|
||||
muDV->SetHintCharacterSetSource((PRInt32)aSource);
|
||||
if(eCharsetReloadRequested != mCharsetReloadState)
|
||||
{
|
||||
mCharsetReloadState = eCharsetReloadRequested;
|
||||
nsAutoString url(aURL);
|
||||
LoadURI(url.GetUnicode());
|
||||
LoadURI(NS_ConvertASCIItoUCS2(aURL).GetUnicode());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1229,8 +1225,7 @@ nsWebShell::ReloadDocument(const char* aCharset,
|
||||
muDV->GetHintCharacterSetSource((PRInt32 *)(&hint));
|
||||
if( aSource > hint )
|
||||
{
|
||||
nsAutoString inputCharSet(aCharset);
|
||||
muDV->SetHintCharacterSet(inputCharSet.GetUnicode());
|
||||
muDV->SetHintCharacterSet(NS_ConvertASCIItoUCS2(aCharset).GetUnicode());
|
||||
muDV->SetHintCharacterSetSource((PRInt32)aSource);
|
||||
if(eCharsetReloadRequested != mCharsetReloadState)
|
||||
{
|
||||
@@ -1375,7 +1370,7 @@ nsWebShell::HandleLinkClickEvent(nsIContent *aContent,
|
||||
|
||||
switch(aVerb) {
|
||||
case eLinkVerb_New:
|
||||
target.Assign("_blank");
|
||||
target.AssignWithConversion("_blank");
|
||||
// Fall into replace case
|
||||
case eLinkVerb_Undefined:
|
||||
// Fall through, this seems like the most reasonable action
|
||||
@@ -1387,7 +1382,9 @@ nsWebShell::HandleLinkClickEvent(nsIContent *aContent,
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
NS_NewURI(getter_AddRefs(uri), aURLSpec, nsnull);
|
||||
|
||||
InternalLoad(uri, mCurrentURI, nsCAutoString(aTargetSpec), aPostDataStream, loadLink);
|
||||
nsCAutoString tempTargetSpecCString;
|
||||
tempTargetSpecCString.AssignWithConversion(aTargetSpec);
|
||||
InternalLoad(uri, mCurrentURI, tempTargetSpecCString, aPostDataStream, loadLink);
|
||||
}
|
||||
break;
|
||||
case eLinkVerb_Embed:
|
||||
@@ -1605,8 +1602,8 @@ nsWebShell::OnEndDocumentLoad(nsIDocumentLoader* loader,
|
||||
|
||||
if (keywordsEnabled && (-1 == dotLoc)) {
|
||||
// only send non-qualified hosts to the keyword server
|
||||
nsAutoString keywordSpec("keyword:");
|
||||
keywordSpec.Append(host);
|
||||
nsAutoString keywordSpec; keywordSpec.AssignWithConversion("keyword:");
|
||||
keywordSpec.AppendWithConversion(host);
|
||||
return LoadURI(keywordSpec.GetUnicode());
|
||||
} // end keywordsEnabled
|
||||
}
|
||||
@@ -1643,9 +1640,8 @@ nsWebShell::OnEndDocumentLoad(nsIDocumentLoader* loader,
|
||||
nsXPIDLCString aSpec;
|
||||
rv = aURL->GetSpec(getter_Copies(aSpec));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
nsAutoString newURL(aSpec);
|
||||
// reload the url
|
||||
return LoadURI(newURL.GetUnicode());
|
||||
return LoadURI(NS_ConvertASCIItoUCS2(aSpec).GetUnicode());
|
||||
} // retry
|
||||
|
||||
// throw a DNS failure dialog
|
||||
@@ -1653,12 +1649,11 @@ nsWebShell::OnEndDocumentLoad(nsIDocumentLoader* loader,
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsXPIDLString messageStr;
|
||||
nsAutoString name("dnsNotFound");
|
||||
rv = mStringBundle->GetStringFromName(name.GetUnicode(), getter_Copies(messageStr));
|
||||
rv = mStringBundle->GetStringFromName(NS_ConvertASCIItoUCS2("dnsNotFound").GetUnicode(), getter_Copies(messageStr));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
errorMsg.Assign(host);
|
||||
errorMsg.Append(' ');
|
||||
errorMsg.AssignWithConversion(host);
|
||||
errorMsg.AppendWithConversion(' ');
|
||||
errorMsg.Append(messageStr);
|
||||
|
||||
(void)mPrompter->Alert(errorMsg.GetUnicode());
|
||||
@@ -1675,18 +1670,17 @@ nsWebShell::OnEndDocumentLoad(nsIDocumentLoader* loader,
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsXPIDLString messageStr;
|
||||
nsAutoString name("connectionFailure");
|
||||
rv = mStringBundle->GetStringFromName(name.GetUnicode(), getter_Copies(messageStr));
|
||||
rv = mStringBundle->GetStringFromName(NS_ConvertASCIItoUCS2("connectionFailure").GetUnicode(), getter_Copies(messageStr));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
errorMsg.Assign(messageStr);
|
||||
errorMsg.Append(' ');
|
||||
errorMsg.Append(host);
|
||||
errorMsg.AppendWithConversion(' ');
|
||||
errorMsg.AppendWithConversion(host);
|
||||
if (port > 0) {
|
||||
errorMsg.Append(':');
|
||||
errorMsg.Append(port);
|
||||
errorMsg.AppendWithConversion(':');
|
||||
errorMsg.AppendInt(port);
|
||||
}
|
||||
errorMsg.Append('.');
|
||||
errorMsg.AppendWithConversion('.');
|
||||
|
||||
(void)mPrompter->Alert(errorMsg.GetUnicode());
|
||||
} else // end NS_ERROR_CONNECTION_REFUSED
|
||||
@@ -1698,14 +1692,13 @@ nsWebShell::OnEndDocumentLoad(nsIDocumentLoader* loader,
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsXPIDLString messageStr;
|
||||
nsAutoString name("netTimeout");
|
||||
rv = mStringBundle->GetStringFromName(name.GetUnicode(), getter_Copies(messageStr));
|
||||
rv = mStringBundle->GetStringFromName(NS_ConvertASCIItoUCS2("netTimeout").GetUnicode(), getter_Copies(messageStr));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
errorMsg.Assign(messageStr);
|
||||
errorMsg.Append(' ');
|
||||
errorMsg.Append(host);
|
||||
errorMsg.Append('.');
|
||||
errorMsg.AppendWithConversion(' ');
|
||||
errorMsg.AppendWithConversion(host);
|
||||
errorMsg.AppendWithConversion('.');
|
||||
|
||||
(void)mPrompter->Alert(errorMsg.GetUnicode());
|
||||
} // end NS_ERROR_NET_TIMEOUT
|
||||
@@ -2104,9 +2097,8 @@ NS_IMETHODIMP nsWebShell::SetDocument(nsIDOMDocument *aDOMDoc,
|
||||
NS_ENSURE_SUCCESS(SetupNewViewer(documentViewer), NS_ERROR_FAILURE);
|
||||
|
||||
// XXX: It would be great to get rid of this dummy channel!
|
||||
const nsAutoString uriString = "about:blank";
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
NS_ENSURE_SUCCESS(NS_NewURI(getter_AddRefs(uri), uriString), NS_ERROR_FAILURE);
|
||||
NS_ENSURE_SUCCESS(NS_NewURI(getter_AddRefs(uri), NS_ConvertASCIItoUCS2("about:blank")), NS_ERROR_FAILURE);
|
||||
if (!uri) { return NS_ERROR_OUT_OF_MEMORY; }
|
||||
|
||||
nsCOMPtr<nsIChannel> dummyChannel;
|
||||
|
||||
Reference in New Issue
Block a user