Bug 1098703 - Zero HttpBaseChannel::{mSelfAddr,mPeerAddr} on construction to avoid Valgrind complaints in e10s builds. r=michal.

--HG--
extra : rebase_source : b95ade0b14397103711f74a53e75c514df2e1e1b
This commit is contained in:
Nicholas Nethercote 2014-11-13 19:27:31 -08:00
Родитель df8f80814b
Коммит d159649494
1 изменённых файлов: 7 добавлений и 1 удалений

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

@ -82,7 +82,13 @@ HttpBaseChannel::HttpBaseChannel()
{
LOG(("Creating HttpBaseChannel @%x\n", this));
// Subfields of unions cannot be targeted in an initializer list
// Subfields of unions cannot be targeted in an initializer list.
#ifdef MOZ_VALGRIND
// Zero the entire unions so that Valgrind doesn't complain when we send them
// to another process.
memset(&mSelfAddr, 0, sizeof(NetAddr));
memset(&mPeerAddr, 0, sizeof(NetAddr));
#endif
mSelfAddr.raw.family = PR_AF_UNSPEC;
mPeerAddr.raw.family = PR_AF_UNSPEC;
}