Bug 1523795: Make temp copy of query->now to avoid access after query has been moved. r=ng
authorByron Campen [:bwc] <docfaraday@gmail.com>
Mon, 11 Feb 2019 17:04:23 +0000
changeset 458519 f2bb667f30312a3dd063f586c5496f43606ca284
parent 458518 5f4edb1fe66f3cc2794d5738bfe3805c39f798f3
child 458520 a1905418c2732b56321c85e050e5ae0b0f492595
push id35536
push userbtara@mozilla.com
push dateMon, 11 Feb 2019 21:54:04 +0000
treeherdermozilla-central@6d8e6f960446 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersng
bugs1523795
milestone67.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 1523795: Make temp copy of query->now to avoid access after query has been moved. r=ng Differential Revision: https://phabricator.services.mozilla.com/D19380
media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
--- a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
+++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
@@ -2988,19 +2988,20 @@ RefPtr<RTCStatsQueryPromise> PeerConnect
     }
   }
 
   std::string transportId;
   if (!query->grabAllLevels) {
     transportId = query->transportId;
   }
   auto report = std::move(query->report);
+  auto now = query->now;
 
   return aTransportHandler
-      ->GetIceStats(transportId, query->now, std::move(report))
+      ->GetIceStats(transportId, now, std::move(report))
       ->Then(
           GetMainThreadSerialEventTarget(), __func__,
           [query = std::move(query)](
               std::unique_ptr<dom::RTCStatsReportInternal>&& aReport) mutable {
             query->report = std::move(aReport);
             return RTCStatsQueryPromise::CreateAndResolve(std::move(query),
                                                           __func__);
           },