Bug 1300459 - Pass MediaInfo by const-ref to SetMediaInfo - r?jya draft
authorGerald Squelart <gsquelart@mozilla.com>
Mon, 05 Sep 2016 14:23:23 +1000
changeset 409758 cb14f2e7f42879d105d1bb33a406ca6181b2bd7d
parent 409737 dbe4b47941c7b3d6298a0ead5e40dd828096c808
child 530404 6522de11a936cc65e49a4e7faa106007d556fec0
push id28539
push usergsquelart@mozilla.com
push dateMon, 05 Sep 2016 04:24:21 +0000
reviewersjya
bugs1300459
milestone51.0a1
Bug 1300459 - Pass MediaInfo by const-ref to SetMediaInfo - r?jya MozReview-Commit-ID: 5KvCBHmI1JC
dom/html/HTMLMediaElement.cpp
dom/html/HTMLMediaElement.h
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -6536,17 +6536,17 @@ HTMLMediaElement::ShouldElementBePaused(
   if (!IsActive()) {
     return true;
   }
 
   return false;
 }
 
 void
-HTMLMediaElement::SetMediaInfo(const MediaInfo aInfo)
+HTMLMediaElement::SetMediaInfo(const MediaInfo& aInfo)
 {
   mMediaInfo = aInfo;
   AudioCaptureStreamChangeIfNeeded();
 }
 
 void
 HTMLMediaElement::AudioCaptureStreamChangeIfNeeded()
 {
--- a/dom/html/HTMLMediaElement.h
+++ b/dom/html/HTMLMediaElement.h
@@ -734,17 +734,17 @@ public:
   IMPL_EVENT_HANDLER(mozinterruptbegin)
   IMPL_EVENT_HANDLER(mozinterruptend)
 
   // These are used for testing only
   float ComputedVolume() const;
   bool ComputedMuted() const;
   nsSuspendedTypes ComputedSuspended() const;
 
-  void SetMediaInfo(const MediaInfo aInfo);
+  void SetMediaInfo(const MediaInfo& aInfo);
 
 protected:
   virtual ~HTMLMediaElement();
 
   class ChannelLoader;
   class MediaLoadListener;
   class MediaStreamTracksAvailableCallback;
   class MediaStreamTrackListener;