Backed out changesets f6d75433812f,7864cbaa9e5d (bug 1173214) for reftest failures CLOSED TREE

This commit is contained in:
Wes Kocher 2015-07-28 15:20:25 -07:00
parent ff526b21c7
commit 68b9154e3f
4 changed files with 5 additions and 61 deletions

View File

@ -67,22 +67,13 @@ nsIconProtocolHandler::NewURI(const nsACString& aSpec,
nsIURI* aBaseURI, nsIURI* aBaseURI,
nsIURI** result) nsIURI** result)
{ {
nsCOMPtr<nsIMozIconURI> uri = new nsMozIconURI();
nsCOMPtr<nsIURI> uri = new nsMozIconURI();
if (!uri) return NS_ERROR_OUT_OF_MEMORY; if (!uri) return NS_ERROR_OUT_OF_MEMORY;
nsresult rv = uri->SetSpec(aSpec); nsresult rv = uri->SetSpec(aSpec);
if (NS_FAILED(rv)) return rv; if (NS_FAILED(rv)) return rv;
nsCOMPtr<nsIURL> iconURL;
uri->GetIconURL(getter_AddRefs(iconURL));
if (iconURL) {
//XXXgijs: is just assigning a new thing here OK?
uri = new nsNestedMozIconURI();
if (!uri) return NS_ERROR_OUT_OF_MEMORY;
rv = uri->SetSpec(aSpec);
if (NS_FAILED(rv)) return rv;
}
NS_ADDREF(*result = uri); NS_ADDREF(*result = uri);
return NS_OK; return NS_OK;
} }

View File

@ -15,7 +15,6 @@
#include "prprf.h" #include "prprf.h"
#include "plstr.h" #include "plstr.h"
#include <stdlib.h> #include <stdlib.h>
#include "nsNetUtil.h"
using namespace mozilla; using namespace mozilla;
using namespace mozilla::ipc; using namespace mozilla::ipc;
@ -642,29 +641,3 @@ nsMozIconURI::Deserialize(const URIParams& aParams)
return true; return true;
} }
////////////////////////////////////////////////////////////
// Nested version of nsIconURI
nsNestedMozIconURI::nsNestedMozIconURI()
{ }
nsNestedMozIconURI::~nsNestedMozIconURI()
{ }
NS_IMPL_ISUPPORTS_INHERITED(nsNestedMozIconURI, nsMozIconURI, nsINestedURI)
NS_IMETHODIMP
nsNestedMozIconURI::GetInnerURI(nsIURI** aURI)
{
*aURI = mIconURL;
NS_IF_ADDREF(*aURI);
return NS_OK;
}
NS_IMETHODIMP
nsNestedMozIconURI::GetInnermostURI(nsIURI** aURI)
{
return NS_ImplGetInnermostURI(this, aURI);
}

View File

@ -11,10 +11,9 @@
#include "nsCOMPtr.h" #include "nsCOMPtr.h"
#include "nsString.h" #include "nsString.h"
#include "nsIIPCSerializableURI.h" #include "nsIIPCSerializableURI.h"
#include "nsINestedURI.h"
class nsMozIconURI : public nsIMozIconURI class nsMozIconURI final : public nsIMozIconURI
, public nsIIPCSerializableURI , public nsIIPCSerializableURI
{ {
public: public:
NS_DECL_THREADSAFE_ISUPPORTS NS_DECL_THREADSAFE_ISUPPORTS
@ -41,22 +40,4 @@ protected:
// kStateStrings // kStateStrings
}; };
class nsNestedMozIconURI : public nsMozIconURI
, public nsINestedURI
{
NS_DECL_ISUPPORTS_INHERITED
NS_FORWARD_NSIURI(nsMozIconURI::)
NS_FORWARD_NSIMOZICONURI(nsMozIconURI::)
NS_FORWARD_NSIIPCSERIALIZABLEURI(nsMozIconURI::)
NS_DECL_NSINESTEDURI
// nsNestedMozIconURI
nsNestedMozIconURI();
protected:
virtual ~nsNestedMozIconURI();
};
#endif // mozilla_image_decoders_icon_nsIconURI_h #endif // mozilla_image_decoders_icon_nsIconURI_h

View File

@ -209,8 +209,7 @@ function run_test()
testURI("data:text/html,Hello World", "data resource", "data resource"); testURI("data:text/html,Hello World", "data resource", "data resource");
testURI("jar:http://www.mozilla.com/file!/magic", "mozilla.com", "www.mozilla.com"); testURI("jar:http://www.mozilla.com/file!/magic", "mozilla.com", "www.mozilla.com");
testURI("file:///C:/Cool/Stuff/", "local file", "local file"); testURI("file:///C:/Cool/Stuff/", "local file", "local file");
testURI("moz-icon:file:///test.extension", "local file", "local file"); testURI("moz-icon:file:///test.extension", "moz-icon resource", "moz-icon resource");
testURI("moz-icon://.extension", "moz-icon resource", "moz-icon resource");
testURI("about:config", "about resource", "about resource"); testURI("about:config", "about resource", "about resource");
testAllGetReadableDates(); testAllGetReadableDates();