зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1237201 part 6 - Handle Vector OOM in media/webrtc/. r=jesup
This commit is contained in:
Родитель
6aaa4ac617
Коммит
dabcd72958
|
@ -328,7 +328,9 @@ PeerConnectionCtx::EverySecondTelemetryCallback_m(nsITimer* timer, void *closure
|
|||
for (auto p = ctx->mPeerConnections.begin();
|
||||
p != ctx->mPeerConnections.end(); ++p) {
|
||||
if (p->second->HasMedia()) {
|
||||
queries->append(nsAutoPtr<RTCStatsQuery>(new RTCStatsQuery(true)));
|
||||
if (!queries->append(nsAutoPtr<RTCStatsQuery>(new RTCStatsQuery(true)))) {
|
||||
return;
|
||||
}
|
||||
if (NS_WARN_IF(NS_FAILED(p->second->BuildStatsQuery_m(nullptr, // all tracks
|
||||
queries->back())))) {
|
||||
queries->popBack();
|
||||
|
|
|
@ -386,7 +386,9 @@ BuildStatsQueryList(
|
|||
if (aPcIdFilter.IsEmpty() ||
|
||||
aPcIdFilter.EqualsASCII(pc.second->GetIdAsAscii().c_str())) {
|
||||
if (pc.second->HasMedia()) {
|
||||
queries->append(nsAutoPtr<RTCStatsQuery>(new RTCStatsQuery(true)));
|
||||
if (!queries->append(nsAutoPtr<RTCStatsQuery>(new RTCStatsQuery(true)))) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
rv = pc.second->BuildStatsQuery_m(nullptr, queries->back()); // all tracks
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return rv;
|
||||
|
|
Загрузка…
Ссылка в новой задаче