From f97329324304fabd7cce47208e8bff28c1f35136 Mon Sep 17 00:00:00 2001 From: Sotaro Ikeda Date: Thu, 29 Sep 2016 23:27:29 -0700 Subject: [PATCH] Bug 1306211 - Add sanity check to CompositorBridgeChild::SendAllPluginsCaptured() r=nical --- gfx/layers/ipc/CompositorBridgeChild.cpp | 9 +++++++++ gfx/layers/ipc/CompositorBridgeChild.h | 1 + 2 files changed, 10 insertions(+) diff --git a/gfx/layers/ipc/CompositorBridgeChild.cpp b/gfx/layers/ipc/CompositorBridgeChild.cpp index 3757113af2b5..e9e6b724cc85 100644 --- a/gfx/layers/ipc/CompositorBridgeChild.cpp +++ b/gfx/layers/ipc/CompositorBridgeChild.cpp @@ -843,6 +843,15 @@ CompositorBridgeChild::SendNotifyApproximatelyVisibleRegion(const ScrollableLaye return PCompositorBridgeChild::SendNotifyApproximatelyVisibleRegion(aGuid, aRegion); } +bool +CompositorBridgeChild::SendAllPluginsCaptured() +{ + if (!mCanSend) { + return false; + } + return PCompositorBridgeChild::SendAllPluginsCaptured(); +} + PTextureChild* CompositorBridgeChild::AllocPTextureChild(const SurfaceDescriptor&, const LayersBackend&, diff --git a/gfx/layers/ipc/CompositorBridgeChild.h b/gfx/layers/ipc/CompositorBridgeChild.h index d2c854dd8d4a..e95d24a7c894 100644 --- a/gfx/layers/ipc/CompositorBridgeChild.h +++ b/gfx/layers/ipc/CompositorBridgeChild.h @@ -165,6 +165,7 @@ public: bool SendClearApproximatelyVisibleRegions(uint64_t aLayersId, uint32_t aPresShellId); bool SendNotifyApproximatelyVisibleRegion(const ScrollableLayerGuid& aGuid, const mozilla::CSSIntRegion& aRegion); + bool SendAllPluginsCaptured(); bool IsSameProcess() const override; virtual bool IPCOpen() const override { return mCanSend; }