Bug 1282750 - Convert AboutCache to use AsyncOpen2() r=honza
authorChristoph Kerschbaumer <ckerschb@christophkerschbaumer.com>
Wed, 29 Jun 2016 15:42:13 +0200
changeset 303418 4306097418bfa74f88ac2b922e4cab0eb0fc6f35
parent 303417 5ecebd971de4d59c5fd54cf47842606d025fd0be
child 303419 733e6ac3ee54688ebb80acea0aa23820c7527ec2
push id30388
push usercbook@mozilla.com
push dateSat, 02 Jul 2016 09:15:23 +0000
treeherdermozilla-central@39dffbba7642 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershonza
bugs1282750
milestone50.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 1282750 - Convert AboutCache to use AsyncOpen2() r=honza
netwerk/protocol/about/nsAboutCache.cpp
--- a/netwerk/protocol/about/nsAboutCache.cpp
+++ b/netwerk/protocol/about/nsAboutCache.cpp
@@ -141,48 +141,36 @@ NS_IMETHODIMP nsAboutCache::Channel::Asy
     if (!mChannel) {
         return NS_ERROR_UNEXPECTED;
     }
 
     // Kick the walk loop.
     rv = VisitNextStorage();
     if (NS_FAILED(rv)) return rv;
 
-    rv = mChannel->AsyncOpen(aListener, aContext);
+    MOZ_ASSERT(!aContext, "asyncOpen2() does not take a context argument");
+    rv = NS_MaybeOpenChannelUsingAsyncOpen2(mChannel, aListener);
     if (NS_FAILED(rv)) return rv;
 
     return NS_OK;
 }
 
 NS_IMETHODIMP nsAboutCache::Channel::AsyncOpen2(nsIStreamListener *aListener)
 {
     return AsyncOpen(aListener, nullptr);
 }
 
 NS_IMETHODIMP nsAboutCache::Channel::Open(nsIInputStream * *_retval)
 {
-    nsresult rv;
-
-    if (!mChannel) {
-        return NS_ERROR_UNEXPECTED;
-    }
-
-    // Kick the walk loop.
-    rv = VisitNextStorage();
-    if (NS_FAILED(rv)) return rv;
-
-    rv = mChannel->Open(_retval);
-    if (NS_FAILED(rv)) return rv;
-
-    return NS_OK;
+    return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP nsAboutCache::Channel::Open2(nsIInputStream * *_retval)
 {
-    return Open(_retval);
+    return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 nsresult
 nsAboutCache::Channel::ParseURI(nsIURI * uri, nsACString & storage)
 {
     //
     // about:cache[?storage=<storage-name>[&context=<context-key>]]
     //