Bug 1405022 - Remove unnecessary use of nsAutoCString from the call to NS_NewURI in nsViewSourceChannel::BuildViewSourceURI. r=mayhemer
authorDiego Pino Garcia <dpino@igalia.com>
Wed, 15 Aug 2018 09:02:00 -0400
changeset 486881 f80952f550064f804eb5df04f21592e14b51e0ef
parent 486880 e7aaefc49e5f08eef8e4cbe8dc08fdc00e1ade45
child 486882 8ab9f8c268fff2af8d7f638b30d55f2211424402
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmayhemer
bugs1405022
milestone63.0a1
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
Bug 1405022 - Remove unnecessary use of nsAutoCString from the call to NS_NewURI in nsViewSourceChannel::BuildViewSourceURI. r=mayhemer
netwerk/protocol/viewsource/nsViewSourceChannel.cpp
--- a/netwerk/protocol/viewsource/nsViewSourceChannel.cpp
+++ b/netwerk/protocol/viewsource/nsViewSourceChannel.cpp
@@ -199,21 +199,17 @@ nsViewSourceChannel::BuildViewSourceURI(
     }
 
     nsAutoCString spec;
     rv = aURI->GetSpec(spec);
     if (NS_FAILED(rv)) {
         return rv;
     }
 
-    return NS_NewURI(aResult,
-                     /* XXX Gross hack -- NS_NewURI goes into an infinite loop on
-                     non-flat specs.  See bug 136980 */
-                     nsAutoCString(NS_LITERAL_CSTRING("view-source:") + spec),
-                     nullptr);
+    return NS_NewURI(aResult, NS_LITERAL_CSTRING("view-source:") + spec);
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsIRequest methods:
 
 NS_IMETHODIMP
 nsViewSourceChannel::GetName(nsACString &result)
 {