Bug 950311 - deCOM nsIDOMLoadStatus. r=mayhemer
authorMasatoshi Kimura <VYV03354@nifty.ne.jp>
Thu, 19 Dec 2013 00:11:54 +0900
changeset 161042 0b492b10f992da0c1123a92e3d145d6e86d035bd
parent 161041 eaa48b9c70941cdfece372cc5f64955e6bb29f99
child 161043 a6a38ef6d1422bef8a3dfac7d7689fe864ca4054
push id25866
push userryanvm@gmail.com
push dateThu, 19 Dec 2013 02:15:01 +0000
treeherdermozilla-central@940c52e93281 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmayhemer
bugs950311
milestone29.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 950311 - deCOM nsIDOMLoadStatus. r=mayhemer
dom/interfaces/offline/moz.build
dom/interfaces/offline/nsIDOMLoadStatus.idl
dom/src/offline/nsDOMOfflineResourceList.cpp
uriloader/prefetch/nsIOfflineCacheUpdate.idl
uriloader/prefetch/nsIPrefetchService.idl
uriloader/prefetch/nsOfflineCacheUpdate.cpp
uriloader/prefetch/nsOfflineCacheUpdate.h
uriloader/prefetch/nsPrefetchService.cpp
uriloader/prefetch/nsPrefetchService.h
--- a/dom/interfaces/offline/moz.build
+++ b/dom/interfaces/offline/moz.build
@@ -1,13 +1,12 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 XPIDL_SOURCES += [
-    'nsIDOMLoadStatus.idl',
     'nsIDOMOfflineResourceList.idl',
 ]
 
 XPIDL_MODULE = 'dom_offline'
 
deleted file mode 100644
--- a/dom/interfaces/offline/nsIDOMLoadStatus.idl
+++ /dev/null
@@ -1,22 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "domstubs.idl"
-
-[uuid(2cb53a8a-d2f4-4ddf-874f-3bc2d595c41a)]
-interface nsIDOMLoadStatus : nsISupports
-{
-  readonly attribute nsIDOMNode source;
-  readonly attribute DOMString uri;
-  readonly attribute long totalSize;
-  readonly attribute long loadedSize;
-  readonly attribute unsigned short readyState;
-  readonly attribute unsigned short status;
-
-  const unsigned short UNINITIALIZED = 0;
-  const unsigned short REQUESTED     = 1;
-  const unsigned short RECEIVING     = 2;
-  const unsigned short LOADED        = 3;
-};
--- a/dom/src/offline/nsDOMOfflineResourceList.cpp
+++ b/dom/src/offline/nsDOMOfflineResourceList.cpp
@@ -9,17 +9,16 @@
 #include "nsDOMLists.h"
 #include "nsIPrefetchService.h"
 #include "nsCPrefetchService.h"
 #include "nsNetUtil.h"
 #include "nsNetCID.h"
 #include "nsICacheSession.h"
 #include "nsICacheService.h"
 #include "nsIOfflineCacheUpdate.h"
-#include "nsIDOMLoadStatus.h"
 #include "nsAutoPtr.h"
 #include "nsContentUtils.h"
 #include "nsEventDispatcher.h"
 #include "nsIObserverService.h"
 #include "nsIScriptGlobalObject.h"
 #include "nsIWebNavigation.h"
 #include "mozilla/dom/OfflineResourceListBinding.h"
 #include "mozilla/Preferences.h"
--- a/uriloader/prefetch/nsIOfflineCacheUpdate.idl
+++ b/uriloader/prefetch/nsIOfflineCacheUpdate.idl
@@ -4,17 +4,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsISupports.idl"
 
 interface nsIURI;
 interface nsIDOMWindow;
 interface nsIDOMNode;
 interface nsIDOMDocument;
-interface nsIDOMLoadStatus;
 interface nsIOfflineCacheUpdate;
 interface nsIPrincipal;
 interface nsIPrefBranch;
 interface nsIApplicationCache;
 interface nsIFile;
 interface nsIObserver;
 
 [scriptable, uuid(47360d57-8ef4-4a5d-8865-1a27a739ad1a)]
@@ -50,20 +49,16 @@ interface nsIOfflineCacheUpdateObserver 
 };
 
 /**
  * An nsIOfflineCacheUpdate is used to update an application's offline
  * resources.
  *
  * It can be used to perform partial or complete updates.
  *
- * Each update object maintains a list of nsIDOMLoadStatus items for the
- * resources it is updating.  The list of these items will be available
- * after the object is scheduled.
- *
  * One update object will be updating at a time.  The active object will
  * load its items one by one, sending itemCompleted() to any registered
  * observers.
  */
 [scriptable, uuid(a4503a53-6ab8-4b50-b01e-1c4f393fc980)]
 interface nsIOfflineCacheUpdate : nsISupports {
   /**
    * Fetch the status of the running update.  This will return a value
--- a/uriloader/prefetch/nsIPrefetchService.idl
+++ b/uriloader/prefetch/nsIPrefetchService.idl
@@ -21,15 +21,14 @@ interface nsIPrefetchService : nsISuppor
      * @param aExplicit the link element has an explicit prefetch link type
      */
     void prefetchURI(in nsIURI aURI,
                      in nsIURI aReferrerURI,
                      in nsIDOMNode aSource,
                      in boolean aExplicit);
 
     /**
-     * Enumerate the items in the prefetch queue.  Each element in the
-     * enumeration is an nsIDOMLoadStatus.
+     * Enumerate the items in the prefetch queue.
      */
     nsISimpleEnumerator enumerateQueue();
 
     // XXX do we need a way to cancel prefetch requests?
 };
--- a/uriloader/prefetch/nsOfflineCacheUpdate.cpp
+++ b/uriloader/prefetch/nsOfflineCacheUpdate.cpp
@@ -304,18 +304,17 @@ nsManifestCheck::AsyncOnChannelRedirect(
     aOldChannel->Cancel(NS_ERROR_ABORT);
     return NS_ERROR_ABORT;
 }
 
 //-----------------------------------------------------------------------------
 // nsOfflineCacheUpdateItem::nsISupports
 //-----------------------------------------------------------------------------
 
-NS_IMPL_ISUPPORTS6(nsOfflineCacheUpdateItem,
-                   nsIDOMLoadStatus,
+NS_IMPL_ISUPPORTS5(nsOfflineCacheUpdateItem,
                    nsIRequestObserver,
                    nsIStreamListener,
                    nsIRunnable,
                    nsIInterfaceRequestor,
                    nsIChannelEventSink)
 
 //-----------------------------------------------------------------------------
 // nsOfflineCacheUpdateItem <public>
@@ -327,17 +326,17 @@ nsOfflineCacheUpdateItem::nsOfflineCache
                                                    nsIApplicationCache *aPreviousApplicationCache,
                                                    uint32_t type)
     : mURI(aURI)
     , mReferrerURI(aReferrerURI)
     , mApplicationCache(aApplicationCache)
     , mPreviousApplicationCache(aPreviousApplicationCache)
     , mItemType(type)
     , mChannel(nullptr)
-    , mState(nsIDOMLoadStatus::UNINITIALIZED)
+    , mState(LoadStatus::UNINITIALIZED)
     , mBytesRead(0)
 {
 }
 
 nsOfflineCacheUpdateItem::~nsOfflineCacheUpdateItem()
 {
 }
 
@@ -404,43 +403,43 @@ nsOfflineCacheUpdateItem::OpenChannel(ns
                                       false);
     }
 
     rv = mChannel->AsyncOpen(this, nullptr);
     NS_ENSURE_SUCCESS(rv, rv);
 
     mUpdate = aUpdate;
 
-    mState = nsIDOMLoadStatus::REQUESTED;
+    mState = LoadStatus::REQUESTED;
 
     return NS_OK;
 }
 
 nsresult
 nsOfflineCacheUpdateItem::Cancel()
 {
     if (mChannel) {
         mChannel->Cancel(NS_ERROR_ABORT);
         mChannel = nullptr;
     }
 
-    mState = nsIDOMLoadStatus::UNINITIALIZED;
+    mState = LoadStatus::UNINITIALIZED;
 
     return NS_OK;
 }
 
 //-----------------------------------------------------------------------------
 // nsOfflineCacheUpdateItem::nsIStreamListener
 //-----------------------------------------------------------------------------
 
 NS_IMETHODIMP
 nsOfflineCacheUpdateItem::OnStartRequest(nsIRequest *aRequest,
                                          nsISupports *aContext)
 {
-    mState = nsIDOMLoadStatus::RECEIVING;
+    mState = LoadStatus::RECEIVING;
 
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsOfflineCacheUpdateItem::OnDataAvailable(nsIRequest *aRequest,
                                           nsISupports *aContext,
                                           nsIInputStream *aStream,
@@ -507,17 +506,17 @@ NS_IMETHODIMP
 nsOfflineCacheUpdateItem::Run()
 {
     // Set mState to LOADED here rather than in OnStopRequest to prevent
     // race condition when checking state of all mItems in ProcessNextURI().
     // If state would have been set in OnStopRequest we could mistakenly
     // take this item as already finished and finish the update process too
     // early when ProcessNextURI() would get called between OnStopRequest()
     // and Run() of this item.  Finish() would then have been called twice.
-    mState = nsIDOMLoadStatus::LOADED;
+    mState = LoadStatus::LOADED;
 
     nsRefPtr<nsOfflineCacheUpdate> update;
     update.swap(mUpdate);
     update->LoadCompleted(this);
 
     return NS_OK;
 }
 
@@ -586,67 +585,16 @@ nsOfflineCacheUpdateItem::AsyncOnChannel
                                   false);
 
     mChannel = aNewChannel;
 
     cb->OnRedirectVerifyCallback(NS_OK);
     return NS_OK;
 }
 
-//-----------------------------------------------------------------------------
-// nsOfflineCacheUpdateItem::nsIDOMLoadStatus
-//-----------------------------------------------------------------------------
-
-NS_IMETHODIMP
-nsOfflineCacheUpdateItem::GetSource(nsIDOMNode **aSource)
-{
-    *aSource = nullptr;
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-nsOfflineCacheUpdateItem::GetUri(nsAString &aURI)
-{
-    nsAutoCString spec;
-    nsresult rv = mURI->GetSpec(spec);
-    NS_ENSURE_SUCCESS(rv, rv);
-
-    CopyUTF8toUTF16(spec, aURI);
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-nsOfflineCacheUpdateItem::GetTotalSize(int32_t *aTotalSize)
-{
-    if (mChannel) {
-      int64_t size64;
-      nsresult rv = mChannel->GetContentLength(&size64);
-      NS_ENSURE_SUCCESS(rv, rv);
-      *aTotalSize = int32_t(size64); // XXX - loses precision
-      return NS_OK;
-    }
-
-    *aTotalSize = -1;
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-nsOfflineCacheUpdateItem::GetLoadedSize(int32_t *aLoadedSize)
-{
-    *aLoadedSize = int32_t(mBytesRead); // XXX - loses precision
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-nsOfflineCacheUpdateItem::GetReadyState(uint16_t *aReadyState)
-{
-    *aReadyState = mState;
-    return NS_OK;
-}
-
 nsresult
 nsOfflineCacheUpdateItem::GetRequestSucceeded(bool * succeeded)
 {
     *succeeded = false;
 
     if (!mChannel)
         return NS_OK;
 
@@ -676,33 +624,33 @@ nsOfflineCacheUpdateItem::GetRequestSucc
 
     *succeeded = true;
     return NS_OK;
 }
 
 bool
 nsOfflineCacheUpdateItem::IsScheduled()
 {
-    return mState == nsIDOMLoadStatus::UNINITIALIZED;
+    return mState == LoadStatus::UNINITIALIZED;
 }
 
 bool
 nsOfflineCacheUpdateItem::IsInProgress()
 {
-    return mState == nsIDOMLoadStatus::REQUESTED ||
-           mState == nsIDOMLoadStatus::RECEIVING;
+    return mState == LoadStatus::REQUESTED ||
+           mState == LoadStatus::RECEIVING;
 }
 
 bool
 nsOfflineCacheUpdateItem::IsCompleted()
 {
-    return mState == nsIDOMLoadStatus::LOADED;
+    return mState == LoadStatus::LOADED;
 }
 
-NS_IMETHODIMP
+nsresult
 nsOfflineCacheUpdateItem::GetStatus(uint16_t *aStatus)
 {
     if (!mChannel) {
         *aStatus = 0;
         return NS_OK;
     }
 
     nsresult rv;
--- a/uriloader/prefetch/nsOfflineCacheUpdate.h
+++ b/uriloader/prefetch/nsOfflineCacheUpdate.h
@@ -10,17 +10,16 @@
 
 #include "nsAutoPtr.h"
 #include "nsCOMArray.h"
 #include "nsCOMPtr.h"
 #include "nsICacheService.h"
 #include "nsIChannelEventSink.h"
 #include "nsIDOMDocument.h"
 #include "nsIDOMNode.h"
-#include "nsIDOMLoadStatus.h"
 #include "nsIInterfaceRequestor.h"
 #include "nsIMutableArray.h"
 #include "nsIObserver.h"
 #include "nsIObserverService.h"
 #include "nsIApplicationCache.h"
 #include "nsIRequestObserver.h"
 #include "nsIRunnable.h"
 #include "nsIStreamListener.h"
@@ -34,25 +33,23 @@
 #include "mozilla/Attributes.h"
 
 class nsOfflineCacheUpdate;
 
 class nsICacheEntryDescriptor;
 class nsIUTF8StringEnumerator;
 class nsILoadContext;
 
-class nsOfflineCacheUpdateItem : public nsIDOMLoadStatus
-                               , public nsIStreamListener
+class nsOfflineCacheUpdateItem : public nsIStreamListener
                                , public nsIRunnable
                                , public nsIInterfaceRequestor
                                , public nsIChannelEventSink
 {
 public:
     NS_DECL_ISUPPORTS
-    NS_DECL_NSIDOMLOADSTATUS
     NS_DECL_NSIREQUESTOBSERVER
     NS_DECL_NSISTREAMLISTENER
     NS_DECL_NSIRUNNABLE
     NS_DECL_NSIINTERFACEREQUESTOR
     NS_DECL_NSICHANNELEVENTSINK
 
     nsOfflineCacheUpdateItem(nsIURI *aURI,
                              nsIURI *aReferrerURI,
@@ -71,17 +68,26 @@ public:
     nsresult OpenChannel(nsOfflineCacheUpdate *aUpdate);
     nsresult Cancel();
     nsresult GetRequestSucceeded(bool * succeeded);
 
     bool IsInProgress();
     bool IsScheduled();
     bool IsCompleted();
 
+    nsresult GetStatus(uint16_t *aStatus);
+
 private:
+    enum LoadStatus MOZ_ENUM_TYPE(uint16_t) {
+      UNINITIALIZED = 0U,
+      REQUESTED = 1U,
+      RECEIVING = 2U,
+      LOADED = 3U
+    };
+
     nsRefPtr<nsOfflineCacheUpdate> mUpdate;
     nsCOMPtr<nsIChannel>           mChannel;
     uint16_t                       mState;
 
 protected:
     int64_t                        mBytesRead;
 };
 
--- a/uriloader/prefetch/nsPrefetchService.cpp
+++ b/uriloader/prefetch/nsPrefetchService.cpp
@@ -109,17 +109,17 @@ nsPrefetchQueueEnumerator::HasMoreElemen
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsPrefetchQueueEnumerator::GetNext(nsISupports **aItem)
 {
     if (!mCurrent) return NS_ERROR_FAILURE;
 
-    NS_ADDREF(*aItem = static_cast<nsIDOMLoadStatus*>(mCurrent.get()));
+    NS_ADDREF(*aItem = static_cast<nsIStreamListener*>(mCurrent.get()));
 
     Increment();
 
     return NS_OK;
 }
 
 //-----------------------------------------------------------------------------
 // nsPrefetchQueueEnumerator <private>
@@ -166,17 +166,16 @@ nsPrefetchNode::nsPrefetchNode(nsPrefetc
                                nsIURI *aURI,
                                nsIURI *aReferrerURI,
                                nsIDOMNode *aSource)
     : mNext(nullptr)
     , mURI(aURI)
     , mReferrerURI(aReferrerURI)
     , mService(aService)
     , mChannel(nullptr)
-    , mState(nsIDOMLoadStatus::UNINITIALIZED)
     , mBytesRead(0)
 {
     mSource = do_GetWeakReference(aSource);
 }
 
 nsresult
 nsPrefetchNode::OpenChannel()
 {
@@ -203,38 +202,33 @@ nsPrefetchNode::OpenChannel()
             NS_LITERAL_CSTRING("X-Moz"),
             NS_LITERAL_CSTRING("prefetch"),
             false);
     }
 
     rv = mChannel->AsyncOpen(this, nullptr);
     NS_ENSURE_SUCCESS(rv, rv);
 
-    mState = nsIDOMLoadStatus::REQUESTED;
-
     return NS_OK;
 }
 
 nsresult
 nsPrefetchNode::CancelChannel(nsresult error)
 {
     mChannel->Cancel(error);
     mChannel = nullptr;
 
-    mState = nsIDOMLoadStatus::UNINITIALIZED;
-
     return NS_OK;
 }
 
 //-----------------------------------------------------------------------------
 // nsPrefetchNode::nsISupports
 //-----------------------------------------------------------------------------
 
-NS_IMPL_ISUPPORTS6(nsPrefetchNode,
-                   nsIDOMLoadStatus,
+NS_IMPL_ISUPPORTS5(nsPrefetchNode,
                    nsIRequestObserver,
                    nsIStreamListener,
                    nsIInterfaceRequestor,
                    nsIChannelEventSink,
                    nsIRedirectResultListener)
 
 //-----------------------------------------------------------------------------
 // nsPrefetchNode::nsIStreamListener
@@ -275,18 +269,16 @@ nsPrefetchNode::OnStartRequest(nsIReques
     if (NS_SUCCEEDED(entryInfo->GetExpirationTime(&expTime))) {
         if (NowInSeconds() >= expTime) {
             LOG(("document cannot be reused from cache; "
                  "canceling prefetch\n"));
             return NS_BINDING_ABORTED;
         }
     }
 
-    mState = nsIDOMLoadStatus::RECEIVING;
-
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsPrefetchNode::OnDataAvailable(nsIRequest *aRequest,
                                 nsISupports *aContext,
                                 nsIInputStream *aStream,
                                 uint64_t aOffset,
@@ -302,18 +294,16 @@ nsPrefetchNode::OnDataAvailable(nsIReque
 
 NS_IMETHODIMP
 nsPrefetchNode::OnStopRequest(nsIRequest *aRequest,
                               nsISupports *aContext,
                               nsresult aStatus)
 {
     LOG(("done prefetching [status=%x]\n", aStatus));
 
-    mState = nsIDOMLoadStatus::LOADED;
-
     if (mBytesRead == 0 && aStatus == NS_OK) {
         // we didn't need to read (because LOAD_ONLY_IF_MODIFIED was
         // specified), but the object should report loadedSize as if it
         // did.
         mChannel->GetContentLength(&mBytesRead);
     }
 
     mService->NotifyLoadCompleted(this);
@@ -482,29 +472,29 @@ nsPrefetchService::ProcessNextURI()
 void
 nsPrefetchService::NotifyLoadRequested(nsPrefetchNode *node)
 {
     nsCOMPtr<nsIObserverService> observerService =
       mozilla::services::GetObserverService();
     if (!observerService)
       return;
 
-    observerService->NotifyObservers(static_cast<nsIDOMLoadStatus*>(node),
+    observerService->NotifyObservers(static_cast<nsIStreamListener*>(node),
                                      "prefetch-load-requested", nullptr);
 }
 
 void
 nsPrefetchService::NotifyLoadCompleted(nsPrefetchNode *node)
 {
     nsCOMPtr<nsIObserverService> observerService =
       mozilla::services::GetObserverService();
     if (!observerService)
       return;
 
-    observerService->NotifyObservers(static_cast<nsIDOMLoadStatus*>(node),
+    observerService->NotifyObservers(static_cast<nsIStreamListener*>(node),
                                      "prefetch-load-completed", nullptr);
 }
 
 //-----------------------------------------------------------------------------
 // nsPrefetchService <private>
 //-----------------------------------------------------------------------------
 
 void
@@ -761,94 +751,16 @@ nsPrefetchService::EnumerateQueue(nsISim
     if (!*aEnumerator) return NS_ERROR_OUT_OF_MEMORY;
 
     NS_ADDREF(*aEnumerator);
 
     return NS_OK;
 }
 
 //-----------------------------------------------------------------------------
-// nsPrefetchNode::nsIDOMLoadStatus
-//-----------------------------------------------------------------------------
-NS_IMETHODIMP
-nsPrefetchNode::GetSource(nsIDOMNode **aSource)
-{
-    *aSource = nullptr;
-    nsCOMPtr<nsIDOMNode> source = do_QueryReferent(mSource);
-    if (source)
-        source.swap(*aSource);
-
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-nsPrefetchNode::GetUri(nsAString &aURI)
-{
-    nsAutoCString spec;
-    nsresult rv = mURI->GetSpec(spec);
-    NS_ENSURE_SUCCESS(rv, rv);
-
-    CopyUTF8toUTF16(spec, aURI);
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-nsPrefetchNode::GetTotalSize(int32_t *aTotalSize)
-{
-    if (mChannel) {
-        int64_t size64;
-        nsresult rv = mChannel->GetContentLength(&size64);
-        NS_ENSURE_SUCCESS(rv, rv);
-        *aTotalSize = int32_t(size64); // XXX - loses precision
-        return NS_OK;
-    }
-
-    *aTotalSize = -1;
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-nsPrefetchNode::GetLoadedSize(int32_t *aLoadedSize)
-{
-    *aLoadedSize = int32_t(mBytesRead); // XXX - loses precision
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-nsPrefetchNode::GetReadyState(uint16_t *aReadyState)
-{
-    *aReadyState = mState;
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-nsPrefetchNode::GetStatus(uint16_t *aStatus)
-{
-    if (!mChannel) {
-        *aStatus = 0;
-        return NS_OK;
-    }
-
-    nsresult rv;
-    nsCOMPtr<nsIHttpChannel> httpChannel = do_QueryInterface(mChannel, &rv);
-    NS_ENSURE_SUCCESS(rv, rv);
-
-    uint32_t httpStatus;
-    rv = httpChannel->GetResponseStatus(&httpStatus);
-    if (rv == NS_ERROR_NOT_AVAILABLE) {
-        *aStatus = 0;
-        return NS_OK;
-    }
-
-    NS_ENSURE_SUCCESS(rv, rv);
-    *aStatus = uint16_t(httpStatus);
-    return NS_OK;
-}
-
-//-----------------------------------------------------------------------------
 // nsPrefetchService::nsIWebProgressListener
 //-----------------------------------------------------------------------------
 
 NS_IMETHODIMP
 nsPrefetchService::OnProgressChange(nsIWebProgress *aProgress,
                                   nsIRequest *aRequest, 
                                   int32_t curSelfProgress, 
                                   int32_t maxSelfProgress, 
--- a/uriloader/prefetch/nsPrefetchService.h
+++ b/uriloader/prefetch/nsPrefetchService.h
@@ -9,17 +9,16 @@
 #include "nsIObserver.h"
 #include "nsIInterfaceRequestor.h"
 #include "nsIChannelEventSink.h"
 #include "nsIRedirectResultListener.h"
 #include "nsIWebProgressListener.h"
 #include "nsIStreamListener.h"
 #include "nsIChannel.h"
 #include "nsIURI.h"
-#include "nsIDOMLoadStatus.h"
 #include "nsWeakReference.h"
 #include "nsCOMPtr.h"
 #include "nsAutoPtr.h"
 #include "mozilla/Attributes.h"
 
 class nsPrefetchService;
 class nsPrefetchListener;
 class nsPrefetchNode;
@@ -77,25 +76,23 @@ private:
     int32_t                           mHaveProcessed;
     bool                              mDisabled;
 };
 
 //-----------------------------------------------------------------------------
 // nsPrefetchNode
 //-----------------------------------------------------------------------------
 
-class nsPrefetchNode MOZ_FINAL : public nsIDOMLoadStatus
-                               , public nsIStreamListener
+class nsPrefetchNode MOZ_FINAL : public nsIStreamListener
                                , public nsIInterfaceRequestor
                                , public nsIChannelEventSink
                                , public nsIRedirectResultListener
 {
 public:
     NS_DECL_ISUPPORTS
-    NS_DECL_NSIDOMLOADSTATUS
     NS_DECL_NSIREQUESTOBSERVER
     NS_DECL_NSISTREAMLISTENER
     NS_DECL_NSIINTERFACEREQUESTOR
     NS_DECL_NSICHANNELEVENTSINK
     NS_DECL_NSIREDIRECTRESULTLISTENER
 
     nsPrefetchNode(nsPrefetchService *aPrefetchService,
                    nsIURI *aURI,
@@ -111,13 +108,12 @@ public:
     nsCOMPtr<nsIURI>            mURI;
     nsCOMPtr<nsIURI>            mReferrerURI;
     nsCOMPtr<nsIWeakReference>  mSource;
 
 private:
     nsRefPtr<nsPrefetchService> mService;
     nsCOMPtr<nsIChannel>        mChannel;
     nsCOMPtr<nsIChannel>        mRedirectChannel;
-    uint16_t                    mState;
     int64_t                     mBytesRead;
 };
 
 #endif // !nsPrefetchService_h__