Bug 1377370. P1 - remove unused HLSResource::mURI. draft
authorJW Wang <jwwang@mozilla.com>
Fri, 30 Jun 2017 10:14:09 +0800
changeset 602504 10f42ba904c568af5012e9e64f6703cdb01555b9
parent 602503 d9f424aee6e41e2f3fae9c697d7f066ab352e4c0
child 602505 25538f7cc2d54548331c4a796ff71b1e68b11ce2
push id66453
push userjwwang@mozilla.com
push dateFri, 30 Jun 2017 02:28:35 +0000
bugs1377370
milestone56.0a1
Bug 1377370. P1 - remove unused HLSResource::mURI. MozReview-Commit-ID: F3L2RcdjjZw
dom/media/MediaResource.cpp
dom/media/hls/HLSResource.cpp
dom/media/hls/HLSResource.h
--- a/dom/media/MediaResource.cpp
+++ b/dom/media/MediaResource.cpp
@@ -1436,17 +1436,17 @@ MediaResource::Create(MediaResourceCallb
   if (!containerType) {
     return nullptr;
   }
 
   RefPtr<MediaResource> resource;
 
 #ifdef MOZ_ANDROID_HLS_SUPPORT
   if (DecoderTraits::IsHttpLiveStreamingType(containerType.value())) {
-    resource = new HLSResource(aCallback, aChannel, uri);
+    resource = new HLSResource(aCallback, aChannel);
     return resource.forget();
   }
 #endif
 
   // Let's try to create a FileMediaResource in case the channel is a nsIFile
   nsCOMPtr<nsIFileChannel> fc = do_QueryInterface(aChannel);
   if (fc) {
     resource = new FileMediaResource(aCallback, aChannel, uri);
--- a/dom/media/hls/HLSResource.cpp
+++ b/dom/media/hls/HLSResource.cpp
@@ -37,22 +37,19 @@ void
 HLSResourceCallbacksSupport::OnError(int aErrorCode)
 {
   MOZ_ASSERT(NS_IsMainThread());
   if (mResource) {
     mResource->onError(aErrorCode);
   }
 }
 
-HLSResource::HLSResource(MediaResourceCallback* aCallback,
-                         nsIChannel* aChannel,
-                         nsIURI* aURI)
+HLSResource::HLSResource(MediaResourceCallback* aCallback, nsIChannel* aChannel)
   : mCallback(aCallback)
   , mChannel(aChannel)
-  , mURI(aURI)
 {
   nsCString spec;
   nsresult rv = aURI->GetSpec(spec);
   (void)rv;
   HLSResourceCallbacksSupport::Init();
   mJavaCallbacks = GeckoHLSResourceWrapper::Callbacks::New();
   mCallbackSupport = new HLSResourceCallbacksSupport(this);
   HLSResourceCallbacksSupport::AttachNative(mJavaCallbacks, mCallbackSupport);
--- a/dom/media/hls/HLSResource.h
+++ b/dom/media/hls/HLSResource.h
@@ -114,16 +114,15 @@ private:
 
   size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override
   {
     return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
   }
 
   RefPtr<MediaResourceCallback> mCallback;
   nsCOMPtr<nsIChannel> mChannel;
-  nsCOMPtr<nsIURI> mURI;
   java::GeckoHLSResourceWrapper::GlobalRef mHLSResourceWrapper;
   java::GeckoHLSResourceWrapper::Callbacks::GlobalRef mJavaCallbacks;
   RefPtr<HLSResourceCallbacksSupport> mCallbackSupport;
 };
 
 } // namespace mozilla
 #endif /* HLSResource_h_ */