Backed out changeset b0c952f7d225 (bug 1421004)for build bustage r=backout on a CLOSED TREE
authorTiberius Oros <toros@mozilla.com>
Wed, 06 Dec 2017 14:00:22 +0200
changeset 708678 c408aa5f26f9c0e2a7ffcae82364379a73d9f1da
parent 708677 8b27792a61207bef953ad90cd1fd26079bf86b7e
child 708679 0a040f4441d0a284b1b51daa8567a8ed7feb1b6f
push id92403
push userVYV03354@nifty.ne.jp
push dateWed, 06 Dec 2017 22:18:41 +0000
reviewersbackout
bugs1421004
milestone59.0a1
backs outb0c952f7d225181a76d4dafbe144dcd72e10b08b
Backed out changeset b0c952f7d225 (bug 1421004)for build bustage r=backout on a CLOSED TREE
dom/html/MediaDocument.h
dom/html/PluginDocument.cpp
dom/html/VideoDocument.cpp
--- a/dom/html/MediaDocument.h
+++ b/dom/html/MediaDocument.h
@@ -90,21 +90,16 @@ public:
   void SetStreamListener(nsIStreamListener *aListener);
 
   NS_DECL_ISUPPORTS
 
   NS_DECL_NSIREQUESTOBSERVER
 
   NS_DECL_NSISTREAMLISTENER
 
-  void DropDocumentRef()
-  {
-    mDocument = nullptr;
-  }
-
-  RefPtr<MediaDocument> mDocument;
-  nsCOMPtr<nsIStreamListener> mNextStream;
+  RefPtr<MediaDocument>      mDocument;
+  nsCOMPtr<nsIStreamListener>  mNextStream;
 };
 
 } // namespace dom
 } // namespace mozilla
 
 #endif /* mozilla_dom_MediaDocument_h */
--- a/dom/html/PluginDocument.cpp
+++ b/dom/html/PluginDocument.cpp
@@ -43,24 +43,16 @@ public:
   void SetScriptGlobalObject(nsIScriptGlobalObject* aScriptGlobalObject) override;
   bool CanSavePresentation(nsIRequest *aNewRequest) override;
 
   const nsCString& GetType() const { return mMimeType; }
   Element*         GetPluginContent() { return mPluginContent; }
 
   void StartLayout() { MediaDocument::StartLayout(); }
 
-  virtual void Destroy()
-  {
-    if (mStreamListener) {
-      mStreamListener->DropDocumentRef();
-    }
-    MediaDocument::Destroy();
-  }
-
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(PluginDocument, MediaDocument)
 protected:
   ~PluginDocument() override;
 
   nsresult CreateSyntheticPluginDocument();
 
   nsCOMPtr<Element>                        mPluginContent;
   RefPtr<MediaDocumentStreamListener>    mStreamListener;
--- a/dom/html/VideoDocument.cpp
+++ b/dom/html/VideoDocument.cpp
@@ -23,24 +23,16 @@ public:
                                      nsIChannel*         aChannel,
                                      nsILoadGroup*       aLoadGroup,
                                      nsISupports*        aContainer,
                                      nsIStreamListener** aDocListener,
                                      bool                aReset = true,
                                      nsIContentSink*     aSink = nullptr);
   virtual void SetScriptGlobalObject(nsIScriptGlobalObject* aScriptGlobalObject);
 
-  virtual void Destroy()
-  {
-    if (mStreamListener) {
-      mStreamListener->DropDocumentRef();
-    }
-    MediaDocument::Destroy();
-  }
-
 protected:
 
   // Sets document <title> to reflect the file name and description.
   void UpdateTitle(nsIChannel* aChannel);
 
   nsresult CreateSyntheticVideoDocument(nsIChannel* aChannel,
                                         nsIStreamListener** aListener);