From 49ea77b59f87f29fda64519c4cb32fadeb49d287 Mon Sep 17 00:00:00 2001 From: Ryan Hunt Date: Mon, 5 Nov 2018 15:03:15 -0600 Subject: [PATCH] Bug 1503655 part 7 - Remove aHasRenderFrame from PBrowser::InitRendering. r=kats All remaining code paths hardcode true here, we can remove this argument. It wasn't clear to me how this could ever be null before this series. The only case I could find is that DoFakeShow might be called with a null RenderFrameChild, but that code is gone now. Differential Revision: https://phabricator.services.mozilla.com/D11063 --HG-- extra : rebase_source : 872d78ae1b46b0651bc4e109786f4d0d332859c2 extra : histedit_source : 40719e865f2243f90618deba5261124a260ba974 --- dom/ipc/PBrowser.ipdl | 3 +-- dom/ipc/TabChild.cpp | 16 +++------------- dom/ipc/TabChild.h | 6 ++---- dom/ipc/TabParent.cpp | 3 +-- 4 files changed, 7 insertions(+), 21 deletions(-) diff --git a/dom/ipc/PBrowser.ipdl b/dom/ipc/PBrowser.ipdl index 024453e166b2..d1ae3c6fd92a 100644 --- a/dom/ipc/PBrowser.ipdl +++ b/dom/ipc/PBrowser.ipdl @@ -597,8 +597,7 @@ child: async InitRendering(TextureFactoryIdentifier textureFactoryIdentifier, LayersId layersId, CompositorOptions compositorOptions, - bool layersConnected, - bool hasRenderFrame); + bool layersConnected); async LoadURL(nsCString uri, ShowInfo info); diff --git a/dom/ipc/TabChild.cpp b/dom/ipc/TabChild.cpp index 18e93a54add1..1bd92c81666b 100644 --- a/dom/ipc/TabChild.cpp +++ b/dom/ipc/TabChild.cpp @@ -1221,13 +1221,10 @@ mozilla::ipc::IPCResult TabChild::RecvInitRendering(const TextureFactoryIdentifier& aTextureFactoryIdentifier, const layers::LayersId& aLayersId, const CompositorOptions& aCompositorOptions, - const bool& aLayersConnected, - const bool& aHasRenderFrame) + const bool& aLayersConnected) { - MOZ_ASSERT((!mDidFakeShow && aHasRenderFrame) || (mDidFakeShow && !aHasRenderFrame)); - mLayersConnected = Some(aLayersConnected); - InitRenderingState(aTextureFactoryIdentifier, aLayersId, aCompositorOptions, aHasRenderFrame); + InitRenderingState(aTextureFactoryIdentifier, aLayersId, aCompositorOptions); return IPC_OK(); } @@ -2752,17 +2749,10 @@ TabChild::InitTabChildMessageManager() void TabChild::InitRenderingState(const TextureFactoryIdentifier& aTextureFactoryIdentifier, const layers::LayersId& aLayersId, - const CompositorOptions& aCompositorOptions, - const bool aHasRenderFrame) + const CompositorOptions& aCompositorOptions) { mPuppetWidget->InitIMEState(); - if (!aHasRenderFrame) { - mLayersConnected = Some(false); - NS_WARNING("failed to construct RenderFrame"); - return; - } - MOZ_ASSERT(aLayersId.IsValid()); mTextureFactoryIdentifier = aTextureFactoryIdentifier; diff --git a/dom/ipc/TabChild.h b/dom/ipc/TabChild.h index eca201341c60..d60d6b69ae20 100644 --- a/dom/ipc/TabChild.h +++ b/dom/ipc/TabChild.h @@ -303,8 +303,7 @@ public: RecvInitRendering(const TextureFactoryIdentifier& aTextureFactoryIdentifier, const layers::LayersId& aLayersId, const mozilla::layers::CompositorOptions& aCompositorOptions, - const bool& aLayersConnected, - const bool& aHasRenderFrame) override; + const bool& aLayersConnected) override; virtual mozilla::ipc::IPCResult RecvUpdateDimensions(const mozilla::dom::DimensionInfo& aDimensionInfo) override; @@ -763,8 +762,7 @@ private: void InitRenderingState(const TextureFactoryIdentifier& aTextureFactoryIdentifier, const layers::LayersId& aLayersId, - const mozilla::layers::CompositorOptions& aCompositorOptions, - const bool aHasRenderFrame); + const mozilla::layers::CompositorOptions& aCompositorOptions); void InitAPZState(); void DestroyWindow(); diff --git a/dom/ipc/TabParent.cpp b/dom/ipc/TabParent.cpp index d0fdd7f2986f..7f8a17c6e496 100644 --- a/dom/ipc/TabParent.cpp +++ b/dom/ipc/TabParent.cpp @@ -650,8 +650,7 @@ TabParent::InitRenderFrame() mRenderFrame->GetTextureFactoryIdentifier(&textureFactoryIdentifier); Unused << SendInitRendering(textureFactoryIdentifier, layersId, mRenderFrame->GetCompositorOptions(), - mRenderFrame->IsLayersConnected(), - true); + mRenderFrame->IsLayersConnected()); } void