bug 720150 - spdy syn_reply div by zero on valid 0 len inflate buffer r=honzab

This commit is contained in:
Patrick McManus 2012-01-23 22:46:37 -05:00
Родитель 9df1a5e042
Коммит 3a7f5feac2
1 изменённых файлов: 5 добавлений и 3 удалений

Просмотреть файл

@ -891,9 +891,11 @@ SpdySession::HandleSynReply(SpdySession *self)
Telemetry::Accumulate(Telemetry::SPDY_SYN_REPLY_SIZE,
self->mFrameDataSize - 6);
PRUint32 ratio =
(self->mFrameDataSize - 6) * 100 / self->mDecompressBufferUsed;
Telemetry::Accumulate(Telemetry::SPDY_SYN_REPLY_RATIO, ratio);
if (self->mDecompressBufferUsed) {
PRUint32 ratio =
(self->mFrameDataSize - 6) * 100 / self->mDecompressBufferUsed;
Telemetry::Accumulate(Telemetry::SPDY_SYN_REPLY_RATIO, ratio);
}
// status and version are required.
nsDependentCSubstring status, version;