From 5500b158042c8e9a12332f8d3e0415f8a7f57686 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Mon, 21 Jun 2010 15:35:49 -0500 Subject: [PATCH] Bug 571730: Initialize the entire XEvent union so that our simple memcpy() serializer doesn't cause valgrind to complain on copying an X*Event smaller than XEvent. r=karlt --- layout/generic/nsObjectFrame.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layout/generic/nsObjectFrame.cpp b/layout/generic/nsObjectFrame.cpp index e4044188525..93959e5d185 100644 --- a/layout/generic/nsObjectFrame.cpp +++ b/layout/generic/nsObjectFrame.cpp @@ -4704,7 +4704,7 @@ nsEventStatus nsPluginInstanceOwner::ProcessEvent(const nsGUIEvent& anEvent) #ifdef MOZ_X11 // this code supports windowless plugins nsIWidget* widget = anEvent.widget; - XEvent pluginEvent; + XEvent pluginEvent = XEvent(); pluginEvent.type = 0; switch(anEvent.eventStructType) @@ -5574,7 +5574,7 @@ nsPluginInstanceOwner::Renderer::NativeDraw(gfxXlibSurface * xsurface, #ifdef MOZ_COMPOSITED_PLUGINS if (mWindow->type == NPWindowTypeDrawable) { #endif - XEvent pluginEvent; + XEvent pluginEvent = XEvent(); XGraphicsExposeEvent& exposeEvent = pluginEvent.xgraphicsexpose; // set the drawing info exposeEvent.type = GraphicsExpose;