diff --git a/xpfe/components/xremote/src/XRemoteService.cpp b/xpfe/components/xremote/src/XRemoteService.cpp index b0a62261ca1..3d27e78a39c 100644 --- a/xpfe/components/xremote/src/XRemoteService.cpp +++ b/xpfe/components/xremote/src/XRemoteService.cpp @@ -724,10 +724,6 @@ XRemoteService::OpenURL(nsCString &aArgument, nsIDOMWindowInternal *aParent, PRBool aOpenBrowser) { - // check if we can handle this type of URL - if (!MayOpenURL(aArgument)) - return NS_ERROR_ABORT; - // the eventual toplevel target of the load nsCOMPtr finalWindow = aParent; @@ -768,6 +764,10 @@ XRemoteService::OpenURL(nsCString &aArgument, newWindow = PR_TRUE; } + // check if we can handle this type of URL + if (!MayOpenURL(aArgument)) + return NS_ERROR_ABORT; + // try to fixup the argument passed in nsString url; url.AssignWithConversion(aArgument.get());