From bb9d9e645b2d64c44eafa04646e79df2476a6cd5 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Tue, 18 Nov 2014 00:29:12 -0800 Subject: [PATCH] Bug 1100205 - Zero ScreenDetails outparam in RecvScreenForBrowser() so Valgrind doesn't complain. r=mconley. --HG-- extra : rebase_source : 6420a5d78ed1d28d157ab10db14951fb14cc523a --- dom/ipc/ScreenManagerParent.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dom/ipc/ScreenManagerParent.cpp b/dom/ipc/ScreenManagerParent.cpp index a95b676ee4b0..cc460ef4ac20 100644 --- a/dom/ipc/ScreenManagerParent.cpp +++ b/dom/ipc/ScreenManagerParent.cpp @@ -121,6 +121,11 @@ ScreenManagerParent::RecvScreenForBrowser(PBrowserParent* aBrowser, bool* aSuccess) { *aSuccess = false; +#ifdef MOZ_VALGRIND + // Zero this so that Valgrind doesn't complain when we send it to another + // process. + memset(aRetVal, 0, sizeof(ScreenDetails)); +#endif // Find the mWidget associated with the tabparent, and then return // the nsIScreen it's on.