From e0c25a9459b3e643d4fd06b773092e6f8d073052 Mon Sep 17 00:00:00 2001 From: Jim Mathies Date: Mon, 19 Oct 2015 10:38:42 -0500 Subject: [PATCH] Bug 1213758 - Aquire the inderect layer trees data lock during plugin window update calculations. r=matt.woodrow --- gfx/layers/ipc/CompositorParent.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gfx/layers/ipc/CompositorParent.cpp b/gfx/layers/ipc/CompositorParent.cpp index 615b309d29eb..3c936c3d00f8 100644 --- a/gfx/layers/ipc/CompositorParent.cpp +++ b/gfx/layers/ipc/CompositorParent.cpp @@ -2057,7 +2057,13 @@ CrossProcessCompositorParent::ShadowLayersUpdated( bool CompositorParent::UpdatePluginWindowState(uint64_t aId) { + MonitorAutoLock lock(*sIndirectLayerTreesLock); CompositorParent::LayerTreeState& lts = sIndirectLayerTrees[aId]; + if (!lts.mParent) { + PLUGINS_LOG("[%" PRIu64 "] layer tree compositor parent pointer is null", aId); + return false; + } + // Check if this layer tree has received any shadow layer updates if (!lts.mUpdatedPluginDataAvailable) { PLUGINS_LOG("[%" PRIu64 "] no plugin data", aId);