Backed out changesets f6d75433812f,7864cbaa9e5d (bug 1173214) for reftest failures CLOSED TREE
authorWes Kocher <wkocher@mozilla.com>
Tue, 28 Jul 2015 15:20:25 -0700
changeset 255072 9fa7dd954cd6f5d736d4d0fd763103bbf31f04d0
parent 255071 f6d75433812ffd08291665e96a2aab873c208f3d
child 255073 e8a0360b762d9c2016d11982bc73d45361e4f173
push id29129
push userryanvm@gmail.com
push dateWed, 29 Jul 2015 17:47:50 +0000
treeherdermozilla-central@b6873269bc49 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1173214
milestone42.0a1
backs outf6d75433812ffd08291665e96a2aab873c208f3d
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changesets f6d75433812f,7864cbaa9e5d (bug 1173214) for reftest failures CLOSED TREE
image/decoders/icon/nsIconProtocolHandler.cpp
image/decoders/icon/nsIconURI.cpp
image/decoders/icon/nsIconURI.h
toolkit/mozapps/downloads/tests/unit/test_DownloadUtils.js
--- a/image/decoders/icon/nsIconProtocolHandler.cpp
+++ b/image/decoders/icon/nsIconProtocolHandler.cpp
@@ -62,32 +62,23 @@ nsIconProtocolHandler::GetProtocolFlags(
 }
 
 NS_IMETHODIMP
 nsIconProtocolHandler::NewURI(const nsACString& aSpec,
                               const char* aOriginCharset, // ignored
                               nsIURI* aBaseURI,
                               nsIURI** result)
 {
-  nsCOMPtr<nsIMozIconURI> uri = new nsMozIconURI();
+
+  nsCOMPtr<nsIURI> uri = new nsMozIconURI();
   if (!uri) return NS_ERROR_OUT_OF_MEMORY;
 
   nsresult rv = uri->SetSpec(aSpec);
   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);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsIconProtocolHandler::NewChannel2(nsIURI* url,
                                    nsILoadInfo* aLoadInfo,
                                    nsIChannel** result)
--- a/image/decoders/icon/nsIconURI.cpp
+++ b/image/decoders/icon/nsIconURI.cpp
@@ -10,17 +10,16 @@
 #include "mozilla/ipc/URIUtils.h"
 
 #include "nsIconURI.h"
 #include "nsIIOService.h"
 #include "nsIURL.h"
 #include "prprf.h"
 #include "plstr.h"
 #include <stdlib.h>
-#include "nsNetUtil.h"
 
 using namespace mozilla;
 using namespace mozilla::ipc;
 
 #define DEFAULT_IMAGE_SIZE 16
 
 #if defined(MAX_PATH)
 #define SANE_FILE_NAME_LEN MAX_PATH
@@ -637,34 +636,8 @@ nsMozIconURI::Deserialize(const URIParam
   mContentType = params.contentType();
   mFileName = params.fileName();
   mStockIcon = params.stockIcon();
   mIconSize = params.iconSize();
   mIconState = params.iconState();
 
   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);
-}
-
--- a/image/decoders/icon/nsIconURI.h
+++ b/image/decoders/icon/nsIconURI.h
@@ -6,20 +6,19 @@
 
 #ifndef mozilla_image_decoders_icon_nsIconURI_h
 #define mozilla_image_decoders_icon_nsIconURI_h
 
 #include "nsIIconURI.h"
 #include "nsCOMPtr.h"
 #include "nsString.h"
 #include "nsIIPCSerializableURI.h"
-#include "nsINestedURI.h"
 
-class nsMozIconURI : public nsIMozIconURI
-                   , public nsIIPCSerializableURI
+class nsMozIconURI final : public nsIMozIconURI
+                         , public nsIIPCSerializableURI
 {
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIURI
   NS_DECL_NSIMOZICONURI
   NS_DECL_NSIIPCSERIALIZABLEURI
 
   // nsMozIconURI
@@ -36,27 +35,9 @@ protected:
                        // given a filename with an extension
   nsCString mStockIcon;
   int32_t mIconSize;   // -1 if not specified, otherwise index into
                        // kSizeStrings
   int32_t mIconState;  // -1 if not specified, otherwise index into
                        // 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
--- a/toolkit/mozapps/downloads/tests/unit/test_DownloadUtils.js
+++ b/toolkit/mozapps/downloads/tests/unit/test_DownloadUtils.js
@@ -204,14 +204,13 @@ function run_test()
   testStatus(statusFunc, 6, 6, 0, ["Unknown time remaining -- 1.4 of 2.9 KB", Infinity]);
   testStatus(statusFunc, 8, 5, 0, ["Unknown time remaining -- 9.2 of 9.3 GB", Infinity]);
 
   testURI("http://www.mozilla.org/", "mozilla.org", "www.mozilla.org");
   testURI("http://www.city.mikasa.hokkaido.jp/", "city.mikasa.hokkaido.jp", "www.city.mikasa.hokkaido.jp");
   testURI("data:text/html,Hello World", "data resource", "data resource");
   testURI("jar:http://www.mozilla.com/file!/magic", "mozilla.com", "www.mozilla.com");
   testURI("file:///C:/Cool/Stuff/", "local file", "local file");
-  testURI("moz-icon:file:///test.extension", "local file", "local file");
-  testURI("moz-icon://.extension", "moz-icon resource", "moz-icon resource");
+  testURI("moz-icon:file:///test.extension", "moz-icon resource", "moz-icon resource");
   testURI("about:config", "about resource", "about resource");
 
   testAllGetReadableDates();
 }