Loading docshell/base/appstrings.properties +4 −4 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ # # Contributor(s): dnsNotFound=could not be found. Please check the name and try again. protocolNotFound=is not a registered protocol. connectionFailure=The connection was refused when attempting to contact netTimeout=The operation timed out when attempting to contact dnsNotFound=%s could not be found. Please check the name and try again. protocolNotFound=%s is not a registered protocol. connectionFailure=The connection was refused when attempting to contact %s. netTimeout=The operation timed out when attempting to contact %s. docshell/base/nsDocShell.cpp +7 −4 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ #include "nsPoint.h" #include "nsGfxCIID.h" #include "nsIPrompt.h" #include "nsTextFormatter.h" // Local Includes #include "nsDocShell.h" Loading Loading @@ -1040,12 +1041,14 @@ NS_IMETHODIMP nsDocShell::LoadURI(const PRUnichar* aURI) // extract the scheme nsAutoString scheme; uriString.Left(scheme, colon); nsCAutoString cScheme; cScheme.AssignWithConversion(scheme); nsAutoString dnsMsg(scheme); dnsMsg.AppendWithConversion(' '); dnsMsg.Append(messageStr); PRUnichar *msg = nsTextFormatter::smprintf(messageStr, cScheme.GetBuffer()); if (!msg) return NS_ERROR_OUT_OF_MEMORY; prompter->Alert(nsnull, dnsMsg.GetUnicode()); prompter->Alert(nsnull, msg); nsTextFormatter::smprintf_free(msg); } // end unknown protocol if(!uri) Loading docshell/base/nsWebShell.cpp +20 −20 Original line number Diff line number Diff line Loading @@ -95,6 +95,7 @@ typedef unsigned long HMTX; #include "nsICharsetConverterManager.h" #include "nsISocketTransportService.h" #include "nsILayoutHistoryState.h" #include "nsTextFormatter.h" #include "nsIHTTPChannel.h" // add this to the ick include list...we need it to QI for post data interface #include "nsHTTPEnums.h" Loading Loading @@ -1189,7 +1190,6 @@ nsWebShell::OnEndDocumentLoad(nsIDocumentLoader* loader, if(mDocLoader == loader && NS_FAILED(aStatus)) { nsAutoString errorMsg; nsXPIDLCString host; NS_ENSURE_SUCCESS(aURL->GetHost(getter_Copies(host)), NS_ERROR_FAILURE); Loading Loading @@ -1270,11 +1270,11 @@ nsWebShell::OnEndDocumentLoad(nsIDocumentLoader* loader, NS_ConvertASCIItoUCS2("dnsNotFound").GetUnicode(), getter_Copies(messageStr)), NS_ERROR_FAILURE); errorMsg.AssignWithConversion(host); errorMsg.AppendWithConversion(' '); errorMsg.Append(messageStr); PRUnichar *msg = nsTextFormatter::smprintf(messageStr, (const char*)host); if (!msg) return NS_ERROR_OUT_OF_MEMORY; prompter->Alert(nsnull, errorMsg.GetUnicode()); prompter->Alert(nsnull, msg); nsTextFormatter::smprintf_free(msg); } else if(aStatus == NS_ERROR_CONNECTION_REFUSED) {// Doc failed to load because we couldn't connect to the server. Loading @@ -1293,16 +1293,17 @@ nsWebShell::OnEndDocumentLoad(nsIDocumentLoader* loader, NS_ConvertASCIItoUCS2("connectionFailure").GetUnicode(), getter_Copies(messageStr)), NS_ERROR_FAILURE); errorMsg.Assign(messageStr); errorMsg.AppendWithConversion(' '); errorMsg.AppendWithConversion(host); if(port > 0) { errorMsg.AppendWithConversion(':'); errorMsg.AppendInt(port); // build up the host:port string. nsCAutoString combo(host); if (port > 0) { combo.Append(':'); combo.AppendInt(port); } errorMsg.AppendWithConversion('.'); prompter->Alert(nsnull, errorMsg.GetUnicode()); PRUnichar *msg = nsTextFormatter::smprintf(messageStr, combo.GetBuffer()); if (!msg) return NS_ERROR_OUT_OF_MEMORY; prompter->Alert(nsnull, msg); nsTextFormatter::smprintf_free(msg); } else if(aStatus == NS_ERROR_NET_TIMEOUT) {// Doc failed to load because the socket function timed out. Loading @@ -1319,12 +1320,11 @@ nsWebShell::OnEndDocumentLoad(nsIDocumentLoader* loader, NS_ConvertASCIItoUCS2("netTimeout").GetUnicode(), getter_Copies(messageStr)), NS_ERROR_FAILURE); errorMsg.Assign(messageStr); errorMsg.AppendWithConversion(' '); errorMsg.AppendWithConversion(host); errorMsg.AppendWithConversion('.'); PRUnichar *msg = nsTextFormatter::smprintf(messageStr, (const char*)host); if (!msg) return NS_ERROR_OUT_OF_MEMORY; prompter->Alert(nsnull, errorMsg.GetUnicode()); prompter->Alert(nsnull, msg); nsTextFormatter::smprintf_free(msg); } // end NS_ERROR_NET_TIMEOUT } // end mDocLoader == loader Loading webshell/src/nsWebShell.cpp +20 −20 Original line number Diff line number Diff line Loading @@ -95,6 +95,7 @@ typedef unsigned long HMTX; #include "nsICharsetConverterManager.h" #include "nsISocketTransportService.h" #include "nsILayoutHistoryState.h" #include "nsTextFormatter.h" #include "nsIHTTPChannel.h" // add this to the ick include list...we need it to QI for post data interface #include "nsHTTPEnums.h" Loading Loading @@ -1189,7 +1190,6 @@ nsWebShell::OnEndDocumentLoad(nsIDocumentLoader* loader, if(mDocLoader == loader && NS_FAILED(aStatus)) { nsAutoString errorMsg; nsXPIDLCString host; NS_ENSURE_SUCCESS(aURL->GetHost(getter_Copies(host)), NS_ERROR_FAILURE); Loading Loading @@ -1270,11 +1270,11 @@ nsWebShell::OnEndDocumentLoad(nsIDocumentLoader* loader, NS_ConvertASCIItoUCS2("dnsNotFound").GetUnicode(), getter_Copies(messageStr)), NS_ERROR_FAILURE); errorMsg.AssignWithConversion(host); errorMsg.AppendWithConversion(' '); errorMsg.Append(messageStr); PRUnichar *msg = nsTextFormatter::smprintf(messageStr, (const char*)host); if (!msg) return NS_ERROR_OUT_OF_MEMORY; prompter->Alert(nsnull, errorMsg.GetUnicode()); prompter->Alert(nsnull, msg); nsTextFormatter::smprintf_free(msg); } else if(aStatus == NS_ERROR_CONNECTION_REFUSED) {// Doc failed to load because we couldn't connect to the server. Loading @@ -1293,16 +1293,17 @@ nsWebShell::OnEndDocumentLoad(nsIDocumentLoader* loader, NS_ConvertASCIItoUCS2("connectionFailure").GetUnicode(), getter_Copies(messageStr)), NS_ERROR_FAILURE); errorMsg.Assign(messageStr); errorMsg.AppendWithConversion(' '); errorMsg.AppendWithConversion(host); if(port > 0) { errorMsg.AppendWithConversion(':'); errorMsg.AppendInt(port); // build up the host:port string. nsCAutoString combo(host); if (port > 0) { combo.Append(':'); combo.AppendInt(port); } errorMsg.AppendWithConversion('.'); prompter->Alert(nsnull, errorMsg.GetUnicode()); PRUnichar *msg = nsTextFormatter::smprintf(messageStr, combo.GetBuffer()); if (!msg) return NS_ERROR_OUT_OF_MEMORY; prompter->Alert(nsnull, msg); nsTextFormatter::smprintf_free(msg); } else if(aStatus == NS_ERROR_NET_TIMEOUT) {// Doc failed to load because the socket function timed out. Loading @@ -1319,12 +1320,11 @@ nsWebShell::OnEndDocumentLoad(nsIDocumentLoader* loader, NS_ConvertASCIItoUCS2("netTimeout").GetUnicode(), getter_Copies(messageStr)), NS_ERROR_FAILURE); errorMsg.Assign(messageStr); errorMsg.AppendWithConversion(' '); errorMsg.AppendWithConversion(host); errorMsg.AppendWithConversion('.'); PRUnichar *msg = nsTextFormatter::smprintf(messageStr, (const char*)host); if (!msg) return NS_ERROR_OUT_OF_MEMORY; prompter->Alert(nsnull, errorMsg.GetUnicode()); prompter->Alert(nsnull, msg); nsTextFormatter::smprintf_free(msg); } // end NS_ERROR_NET_TIMEOUT } // end mDocLoader == loader Loading Loading
docshell/base/appstrings.properties +4 −4 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ # # Contributor(s): dnsNotFound=could not be found. Please check the name and try again. protocolNotFound=is not a registered protocol. connectionFailure=The connection was refused when attempting to contact netTimeout=The operation timed out when attempting to contact dnsNotFound=%s could not be found. Please check the name and try again. protocolNotFound=%s is not a registered protocol. connectionFailure=The connection was refused when attempting to contact %s. netTimeout=The operation timed out when attempting to contact %s.
docshell/base/nsDocShell.cpp +7 −4 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ #include "nsPoint.h" #include "nsGfxCIID.h" #include "nsIPrompt.h" #include "nsTextFormatter.h" // Local Includes #include "nsDocShell.h" Loading Loading @@ -1040,12 +1041,14 @@ NS_IMETHODIMP nsDocShell::LoadURI(const PRUnichar* aURI) // extract the scheme nsAutoString scheme; uriString.Left(scheme, colon); nsCAutoString cScheme; cScheme.AssignWithConversion(scheme); nsAutoString dnsMsg(scheme); dnsMsg.AppendWithConversion(' '); dnsMsg.Append(messageStr); PRUnichar *msg = nsTextFormatter::smprintf(messageStr, cScheme.GetBuffer()); if (!msg) return NS_ERROR_OUT_OF_MEMORY; prompter->Alert(nsnull, dnsMsg.GetUnicode()); prompter->Alert(nsnull, msg); nsTextFormatter::smprintf_free(msg); } // end unknown protocol if(!uri) Loading
docshell/base/nsWebShell.cpp +20 −20 Original line number Diff line number Diff line Loading @@ -95,6 +95,7 @@ typedef unsigned long HMTX; #include "nsICharsetConverterManager.h" #include "nsISocketTransportService.h" #include "nsILayoutHistoryState.h" #include "nsTextFormatter.h" #include "nsIHTTPChannel.h" // add this to the ick include list...we need it to QI for post data interface #include "nsHTTPEnums.h" Loading Loading @@ -1189,7 +1190,6 @@ nsWebShell::OnEndDocumentLoad(nsIDocumentLoader* loader, if(mDocLoader == loader && NS_FAILED(aStatus)) { nsAutoString errorMsg; nsXPIDLCString host; NS_ENSURE_SUCCESS(aURL->GetHost(getter_Copies(host)), NS_ERROR_FAILURE); Loading Loading @@ -1270,11 +1270,11 @@ nsWebShell::OnEndDocumentLoad(nsIDocumentLoader* loader, NS_ConvertASCIItoUCS2("dnsNotFound").GetUnicode(), getter_Copies(messageStr)), NS_ERROR_FAILURE); errorMsg.AssignWithConversion(host); errorMsg.AppendWithConversion(' '); errorMsg.Append(messageStr); PRUnichar *msg = nsTextFormatter::smprintf(messageStr, (const char*)host); if (!msg) return NS_ERROR_OUT_OF_MEMORY; prompter->Alert(nsnull, errorMsg.GetUnicode()); prompter->Alert(nsnull, msg); nsTextFormatter::smprintf_free(msg); } else if(aStatus == NS_ERROR_CONNECTION_REFUSED) {// Doc failed to load because we couldn't connect to the server. Loading @@ -1293,16 +1293,17 @@ nsWebShell::OnEndDocumentLoad(nsIDocumentLoader* loader, NS_ConvertASCIItoUCS2("connectionFailure").GetUnicode(), getter_Copies(messageStr)), NS_ERROR_FAILURE); errorMsg.Assign(messageStr); errorMsg.AppendWithConversion(' '); errorMsg.AppendWithConversion(host); if(port > 0) { errorMsg.AppendWithConversion(':'); errorMsg.AppendInt(port); // build up the host:port string. nsCAutoString combo(host); if (port > 0) { combo.Append(':'); combo.AppendInt(port); } errorMsg.AppendWithConversion('.'); prompter->Alert(nsnull, errorMsg.GetUnicode()); PRUnichar *msg = nsTextFormatter::smprintf(messageStr, combo.GetBuffer()); if (!msg) return NS_ERROR_OUT_OF_MEMORY; prompter->Alert(nsnull, msg); nsTextFormatter::smprintf_free(msg); } else if(aStatus == NS_ERROR_NET_TIMEOUT) {// Doc failed to load because the socket function timed out. Loading @@ -1319,12 +1320,11 @@ nsWebShell::OnEndDocumentLoad(nsIDocumentLoader* loader, NS_ConvertASCIItoUCS2("netTimeout").GetUnicode(), getter_Copies(messageStr)), NS_ERROR_FAILURE); errorMsg.Assign(messageStr); errorMsg.AppendWithConversion(' '); errorMsg.AppendWithConversion(host); errorMsg.AppendWithConversion('.'); PRUnichar *msg = nsTextFormatter::smprintf(messageStr, (const char*)host); if (!msg) return NS_ERROR_OUT_OF_MEMORY; prompter->Alert(nsnull, errorMsg.GetUnicode()); prompter->Alert(nsnull, msg); nsTextFormatter::smprintf_free(msg); } // end NS_ERROR_NET_TIMEOUT } // end mDocLoader == loader Loading
webshell/src/nsWebShell.cpp +20 −20 Original line number Diff line number Diff line Loading @@ -95,6 +95,7 @@ typedef unsigned long HMTX; #include "nsICharsetConverterManager.h" #include "nsISocketTransportService.h" #include "nsILayoutHistoryState.h" #include "nsTextFormatter.h" #include "nsIHTTPChannel.h" // add this to the ick include list...we need it to QI for post data interface #include "nsHTTPEnums.h" Loading Loading @@ -1189,7 +1190,6 @@ nsWebShell::OnEndDocumentLoad(nsIDocumentLoader* loader, if(mDocLoader == loader && NS_FAILED(aStatus)) { nsAutoString errorMsg; nsXPIDLCString host; NS_ENSURE_SUCCESS(aURL->GetHost(getter_Copies(host)), NS_ERROR_FAILURE); Loading Loading @@ -1270,11 +1270,11 @@ nsWebShell::OnEndDocumentLoad(nsIDocumentLoader* loader, NS_ConvertASCIItoUCS2("dnsNotFound").GetUnicode(), getter_Copies(messageStr)), NS_ERROR_FAILURE); errorMsg.AssignWithConversion(host); errorMsg.AppendWithConversion(' '); errorMsg.Append(messageStr); PRUnichar *msg = nsTextFormatter::smprintf(messageStr, (const char*)host); if (!msg) return NS_ERROR_OUT_OF_MEMORY; prompter->Alert(nsnull, errorMsg.GetUnicode()); prompter->Alert(nsnull, msg); nsTextFormatter::smprintf_free(msg); } else if(aStatus == NS_ERROR_CONNECTION_REFUSED) {// Doc failed to load because we couldn't connect to the server. Loading @@ -1293,16 +1293,17 @@ nsWebShell::OnEndDocumentLoad(nsIDocumentLoader* loader, NS_ConvertASCIItoUCS2("connectionFailure").GetUnicode(), getter_Copies(messageStr)), NS_ERROR_FAILURE); errorMsg.Assign(messageStr); errorMsg.AppendWithConversion(' '); errorMsg.AppendWithConversion(host); if(port > 0) { errorMsg.AppendWithConversion(':'); errorMsg.AppendInt(port); // build up the host:port string. nsCAutoString combo(host); if (port > 0) { combo.Append(':'); combo.AppendInt(port); } errorMsg.AppendWithConversion('.'); prompter->Alert(nsnull, errorMsg.GetUnicode()); PRUnichar *msg = nsTextFormatter::smprintf(messageStr, combo.GetBuffer()); if (!msg) return NS_ERROR_OUT_OF_MEMORY; prompter->Alert(nsnull, msg); nsTextFormatter::smprintf_free(msg); } else if(aStatus == NS_ERROR_NET_TIMEOUT) {// Doc failed to load because the socket function timed out. Loading @@ -1319,12 +1320,11 @@ nsWebShell::OnEndDocumentLoad(nsIDocumentLoader* loader, NS_ConvertASCIItoUCS2("netTimeout").GetUnicode(), getter_Copies(messageStr)), NS_ERROR_FAILURE); errorMsg.Assign(messageStr); errorMsg.AppendWithConversion(' '); errorMsg.AppendWithConversion(host); errorMsg.AppendWithConversion('.'); PRUnichar *msg = nsTextFormatter::smprintf(messageStr, (const char*)host); if (!msg) return NS_ERROR_OUT_OF_MEMORY; prompter->Alert(nsnull, errorMsg.GetUnicode()); prompter->Alert(nsnull, msg); nsTextFormatter::smprintf_free(msg); } // end NS_ERROR_NET_TIMEOUT } // end mDocLoader == loader Loading