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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Byron Campen [:bwc] 2019-02-11 17:04:23 +00:00
parent 79daacfda9
commit 91aa85ed89

View File

@ -2993,9 +2993,10 @@ RefPtr<RTCStatsQueryPromise> PeerConnectionImpl::ExecuteStatsQuery_s(
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)](