Bug 1405962. P2 - use thread-safe ref counting. r=gerald
authorJW Wang <jwwang@mozilla.com>
Wed, 20 Sep 2017 17:14:01 +0800
changeset 384879 acdec618988d182069b392385541849b175c8db9
parent 384878 8d6aae7d3ebba4a1bb4b46cb5a9281adcafa51a7
child 384880 f01862c860c8805bb1230701ec58c13770411659
push id95880
push userarchaeopteryx@coole-files.de
push dateSat, 07 Oct 2017 08:58:44 +0000
treeherdermozilla-inbound@156942799371 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgerald
bugs1405962
milestone58.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 1405962. P2 - use thread-safe ref counting. r=gerald These listeners will be AddRefed/Released off the main thread when OMT data delivery is enabled. MozReview-Commit-ID: CSOBgNNf3OW
dom/html/HTMLMediaElement.cpp
dom/media/ChannelMediaResource.h
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -454,17 +454,17 @@ class HTMLMediaElement::MediaLoadListene
   : public nsIStreamListener
   , public nsIChannelEventSink
   , public nsIInterfaceRequestor
   , public nsIObserver
   , public nsIThreadRetargetableStreamListener
 {
   ~MediaLoadListener() {}
 
-  NS_DECL_ISUPPORTS
+  NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIREQUESTOBSERVER
   NS_DECL_NSISTREAMLISTENER
   NS_DECL_NSICHANNELEVENTSINK
   NS_DECL_NSIOBSERVER
   NS_DECL_NSIINTERFACEREQUESTOR
   NS_DECL_NSITHREADRETARGETABLESTREAMLISTENER
 
 public:
--- a/dom/media/ChannelMediaResource.h
+++ b/dom/media/ChannelMediaResource.h
@@ -166,17 +166,17 @@ public:
   public:
     Listener(ChannelMediaResource* aResource, int64_t aOffset, uint32_t aLoadID)
       : mMutex("Listener.mMutex")
       , mResource(aResource)
       , mOffset(aOffset)
       , mLoadID(aLoadID)
     {}
 
-    NS_DECL_ISUPPORTS
+    NS_DECL_THREADSAFE_ISUPPORTS
     NS_DECL_NSIREQUESTOBSERVER
     NS_DECL_NSISTREAMLISTENER
     NS_DECL_NSICHANNELEVENTSINK
     NS_DECL_NSIINTERFACEREQUESTOR
     NS_DECL_NSITHREADRETARGETABLESTREAMLISTENER
 
     void Revoke();