From 913d6b76eeb484f8743c653ca7939f0fec257505 Mon Sep 17 00:00:00 2001 From: Jonathan Watt Date: Wed, 29 May 2019 10:42:14 +0100 Subject: [PATCH 1/2] Bug 1557687. Remove nsPrintData::mDocWasToBeDestroyed. r=bobowen This shows that this variable has never been read going back all the way to the original Mercurial import in 2007: hg grep -f --diff mDocWasToBeDestroyed layout/printing/ns* Differential Revision: https://phabricator.services.mozilla.com/D34143 --HG-- extra : rebase_source : c14a51dab1825e26fb8031d291d2c69e78931c84 extra : amend_source : 73794b07d703987db8d2eb49dd97d74b1a9be325 --- layout/printing/nsPrintData.cpp | 1 - layout/printing/nsPrintData.h | 12 ++---------- layout/printing/nsPrintJob.cpp | 9 --------- layout/printing/nsPrintJob.h | 3 ++- 4 files changed, 4 insertions(+), 21 deletions(-) diff --git a/layout/printing/nsPrintData.cpp b/layout/printing/nsPrintData.cpp index 4b19405d8e2e..fcf1b0857883 100644 --- a/layout/printing/nsPrintData.cpp +++ b/layout/printing/nsPrintData.cpp @@ -33,7 +33,6 @@ nsPrintData::nsPrintData(ePrintDataType aType) mOnStartSent(false), mIsAborted(false), mPreparingForPrint(false), - mDocWasToBeDestroyed(false), mShrinkToFit(false), mNumPrintablePages(0), mNumPagesPrinted(0), diff --git a/layout/printing/nsPrintData.h b/layout/printing/nsPrintData.h index 17738dd5c1e9..fb7936fb622d 100644 --- a/layout/printing/nsPrintData.h +++ b/layout/printing/nsPrintData.h @@ -31,13 +31,6 @@ class PrintPreviewUserEventSuppressor; // mPreparingForPrint - indicates that we have started Printing but // have not gone to the timer to start printing the pages. It gets turned // off right before we go to the timer. -// -// mDocWasToBeDestroyed - Gets set when "someone" tries to unload the document -// while we were prparing to Print. This typically happens if a user starts -// to print while a page is still loading. If they start printing and pause -// at the print dialog and then the page comes in, we then abort printing -// because the document is no longer stable. -// //------------------------------------------------------------------------ class nsPrintData { typedef mozilla::PrintPreviewUserEventSuppressor @@ -77,9 +70,8 @@ class nsPrintData { bool mIsIFrameSelected; bool mIsParentAFrameSet; bool mOnStartSent; - bool mIsAborted; // tells us the document is being aborted - bool mPreparingForPrint; // see comments above - bool mDocWasToBeDestroyed; // see comments above + bool mIsAborted; // tells us the document is being aborted + bool mPreparingForPrint; // see comments above bool mShrinkToFit; int32_t mNumPrintablePages; int32_t mNumPagesPrinted; diff --git a/layout/printing/nsPrintJob.cpp b/layout/printing/nsPrintJob.cpp index d8b31052658f..98c3d520cdab 100644 --- a/layout/printing/nsPrintJob.cpp +++ b/layout/printing/nsPrintJob.cpp @@ -630,15 +630,6 @@ nsresult nsPrintJob::Initialize(nsIDocumentViewerPrint* aDocViewerPrint, return NS_OK; } -//------------------------------------------------------- -bool nsPrintJob::CheckBeforeDestroy() { - if (mPrt && mPrt->mPreparingForPrint) { - mPrt->mDocWasToBeDestroyed = true; - return true; - } - return false; -} - //------------------------------------------------------- nsresult nsPrintJob::Cancel() { if (mPrt && mPrt->mPrintSettings) { diff --git a/layout/printing/nsPrintJob.h b/layout/printing/nsPrintJob.h index e7936e1631b2..76c5a7df19b7 100644 --- a/layout/printing/nsPrintJob.h +++ b/layout/printing/nsPrintJob.h @@ -208,7 +208,8 @@ class nsPrintJob final : public nsIObserver, nsAString& aTitle, nsAString& aURLStr, eDocTitleDefault aDefType); - bool CheckBeforeDestroy(); + bool CheckBeforeDestroy() const { return mPrt && mPrt->mPreparingForPrint; } + nsresult Cancel(); mozilla::PresShell* GetPrintPreviewPresShell() { From 45ada477777e26cfad8601bddcf31d2749deacab Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Thu, 30 May 2019 18:55:00 +0300 Subject: [PATCH 2/2] Bug 1555871 - Unbreak build on Tier3 after bug 1523351. r=daoshengmu --- dom/gamepad/fallback/FallbackGamepad.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dom/gamepad/fallback/FallbackGamepad.cpp b/dom/gamepad/fallback/FallbackGamepad.cpp index e74acbc80e19..e83ae6ed4e28 100644 --- a/dom/gamepad/fallback/FallbackGamepad.cpp +++ b/dom/gamepad/fallback/FallbackGamepad.cpp @@ -4,6 +4,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include + namespace mozilla { namespace dom { @@ -11,5 +13,7 @@ void StartGamepadMonitoring() {} void StopGamepadMonitoring() {} +void SetGamepadLightIndicatorColor(uint32_t, uint32_t, uint8_t, uint8_t, uint8_t) {} + } // namespace dom } // namespace mozilla