diff --git a/mozilla/docshell/base/nsWebShell.cpp b/mozilla/docshell/base/nsWebShell.cpp index e42ad967f2b..9a30e3b257c 100644 --- a/mozilla/docshell/base/nsWebShell.cpp +++ b/mozilla/docshell/base/nsWebShell.cpp @@ -71,6 +71,7 @@ #include "nsIGlobalHistory.h" #include "prmem.h" #include "nsXPIDLString.h" +#include "nsDOMError.h" #include "nsIDOMHTMLElement.h" #include "nsIDOMHTMLDocument.h" #include "nsLayoutCID.h" @@ -1719,8 +1720,12 @@ nsWebShell::DoLoadURL(nsIURI * aUri, rv = pNetService->NewChannelFromURI(aCommand, aUri, loadGroup, requestor, aType, referrer /* referring uri */, 0, 0, getter_AddRefs(pChannel)); - if (NS_FAILED(rv)) return rv; // uhoh we were unable to get a channel to handle the url!!! - + if (NS_FAILED(rv)) { + if (rv == NS_ERROR_DOM_RETVAL_UNDEFINED) // if causing the channel changed the + return NS_OK; // dom and there is nothing else to do + else + return rv; // uhoh we were unable to get a channel to handle the url!!! + } // Mark the channel as being a document URI... nsLoadFlags loadAttribs = 0; pChannel->GetLoadAttributes(&loadAttribs); diff --git a/mozilla/webshell/src/nsWebShell.cpp b/mozilla/webshell/src/nsWebShell.cpp index e42ad967f2b..9a30e3b257c 100644 --- a/mozilla/webshell/src/nsWebShell.cpp +++ b/mozilla/webshell/src/nsWebShell.cpp @@ -71,6 +71,7 @@ #include "nsIGlobalHistory.h" #include "prmem.h" #include "nsXPIDLString.h" +#include "nsDOMError.h" #include "nsIDOMHTMLElement.h" #include "nsIDOMHTMLDocument.h" #include "nsLayoutCID.h" @@ -1719,8 +1720,12 @@ nsWebShell::DoLoadURL(nsIURI * aUri, rv = pNetService->NewChannelFromURI(aCommand, aUri, loadGroup, requestor, aType, referrer /* referring uri */, 0, 0, getter_AddRefs(pChannel)); - if (NS_FAILED(rv)) return rv; // uhoh we were unable to get a channel to handle the url!!! - + if (NS_FAILED(rv)) { + if (rv == NS_ERROR_DOM_RETVAL_UNDEFINED) // if causing the channel changed the + return NS_OK; // dom and there is nothing else to do + else + return rv; // uhoh we were unable to get a channel to handle the url!!! + } // Mark the channel as being a document URI... nsLoadFlags loadAttribs = 0; pChannel->GetLoadAttributes(&loadAttribs);