diff --git a/dom/ipc/TabChild.cpp b/dom/ipc/TabChild.cpp index 309c6bffd59b..f01c468161ab 100644 --- a/dom/ipc/TabChild.cpp +++ b/dom/ipc/TabChild.cpp @@ -1224,15 +1224,11 @@ TabChild::RecvShow(const ScreenIntSize& aSize, const bool& aParentIsActive, const nsSizeMode& aSizeMode) { - MOZ_ASSERT((!mDidFakeShow && aRenderFrame) || (mDidFakeShow && !aRenderFrame)); - - mPuppetWidget->SetSizeMode(aSizeMode); - if (mDidFakeShow) { - ApplyShowInfo(aInfo); - RecvParentActivated(aParentIsActive); - return IPC_OK(); - } + MOZ_ASSERT((!mDidFakeShow && aRenderFrame) || (mDidFakeShow && !aRenderFrame)); + bool res = true; + mPuppetWidget->SetSizeMode(aSizeMode); + if (!mDidFakeShow) { nsCOMPtr baseWindow = do_QueryInterface(WebNavigation()); if (!baseWindow) { NS_ERROR("WebNavigation() doesn't QI to nsIBaseWindow"); @@ -1242,15 +1238,16 @@ TabChild::RecvShow(const ScreenIntSize& aSize, InitRenderingState(aTextureFactoryIdentifier, aLayersId, aRenderFrame); baseWindow->SetVisibility(true); + res = InitTabChildGlobal(); + } - bool res = InitTabChildGlobal(); - ApplyShowInfo(aInfo); - RecvParentActivated(aParentIsActive); + ApplyShowInfo(aInfo); + RecvParentActivated(aParentIsActive); - if (!res) { - return IPC_FAIL_NO_REASON(this); - } - return IPC_OK(); + if (!res) { + return IPC_FAIL_NO_REASON(this); + } + return IPC_OK(); } mozilla::ipc::IPCResult