Bug 1120652 - Remove MainThreadFetchResolver::OnResponseEnd() and provide an empty definition in the parent class FetchDriverObserver. r=nsm
authorTejas Srinivasan <tejas.srinivasan95@gmail.com>
Wed, 14 Jan 2015 23:59:00 -0500
changeset 224218 d172fffe7074288db17141d23f0bc2afe45f92c5
parent 224217 b0066a6e586534ea5a460eec8369671c9322f1e4
child 224219 d4a53fee1e2517002b25f06e5516fc95977f7b4b
push id54159
push userryanvm@gmail.com
push dateFri, 16 Jan 2015 16:01:22 +0000
treeherdermozilla-inbound@26263767b141 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnsm
bugs1120652
milestone38.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 1120652 - Remove MainThreadFetchResolver::OnResponseEnd() and provide an empty definition in the parent class FetchDriverObserver. r=nsm
dom/fetch/Fetch.cpp
dom/fetch/FetchDriver.h
--- a/dom/fetch/Fetch.cpp
+++ b/dom/fetch/Fetch.cpp
@@ -131,19 +131,16 @@ class MainThreadFetchResolver MOZ_FINAL 
 
   NS_DECL_OWNINGTHREAD
 public:
   explicit MainThreadFetchResolver(Promise* aPromise);
 
   void
   OnResponseAvailable(InternalResponse* aResponse) MOZ_OVERRIDE;
 
-  void
-  OnResponseEnd() MOZ_OVERRIDE;
-
 private:
   ~MainThreadFetchResolver();
 };
 
 class MainThreadFetchRunnable : public nsRunnable
 {
   nsRefPtr<WorkerFetchResolver> mResolver;
   nsRefPtr<InternalRequest> mRequest;
@@ -260,24 +257,16 @@ MainThreadFetchResolver::OnResponseAvail
   NS_ASSERT_OWNINGTHREAD(MainThreadFetchResolver);
   AssertIsOnMainThread();
 
   nsCOMPtr<nsIGlobalObject> go = mPromise->GetParentObject();
   mResponse = new Response(go, aResponse);
   mPromise->MaybeResolve(mResponse);
 }
 
-void
-MainThreadFetchResolver::OnResponseEnd()
-{
-  NS_ASSERT_OWNINGTHREAD(MainThreadFetchResolver);
-  AssertIsOnMainThread();
-  MOZ_ASSERT(mResponse);
-}
-
 MainThreadFetchResolver::~MainThreadFetchResolver()
 {
   NS_ASSERT_OWNINGTHREAD(MainThreadFetchResolver);
 }
 
 class WorkerFetchResponseRunnable MOZ_FINAL : public WorkerRunnable
 {
   nsRefPtr<WorkerFetchResolver> mResolver;
--- a/dom/fetch/FetchDriver.h
+++ b/dom/fetch/FetchDriver.h
@@ -26,17 +26,18 @@ class BlobSet;
 class InternalRequest;
 class InternalResponse;
 
 class FetchDriverObserver
 {
 public:
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(FetchDriverObserver);
   virtual void OnResponseAvailable(InternalResponse* aResponse) = 0;
-  virtual void OnResponseEnd() = 0;
+  virtual void OnResponseEnd()
+  { };
 
 protected:
   virtual ~FetchDriverObserver()
   { };
 };
 
 class FetchDriver MOZ_FINAL : public nsIStreamListener,
                               public nsIChannelEventSink,