author | Bob Owen <bobowencode@gmail.com> |
Wed, 01 Mar 2017 12:11:58 +0000 | |
changeset 345229 | fb5e539b6624112a60be8ac65058d2a2116e2c04 |
parent 345228 | bf3219269a11aff5b64a61b6c782aa97bb4594c1 |
child 345230 | 467c4bdf5110eb6ace092a4163a5eb4a68e0812d |
push id | 87543 |
push user | bobowencode@gmail.com |
push date | Wed, 01 Mar 2017 12:12:23 +0000 |
treeherder | mozilla-inbound@467c4bdf5110 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | dholbert |
bugs | 1141756 |
milestone | 54.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/layout/printing/nsPrintEngine.cpp +++ b/layout/printing/nsPrintEngine.cpp @@ -326,16 +326,25 @@ nsPrintEngine::InstallPrintPreviewListen //---------------------------------------------------------------------- nsresult nsPrintEngine::GetSeqFrameAndCountPagesInternal(nsPrintObject* aPO, nsIFrame*& aSeqFrame, int32_t& aCount) { NS_ENSURE_ARG_POINTER(aPO); + // This is sometimes incorrectly called before the pres shell has been created + // (bug 1141756). MOZ_DIAGNOSTIC_ASSERT so we'll still see the crash in + // Nightly/Aurora in case the other patch fixes this. + if (!aPO->mPresShell) { + MOZ_DIAGNOSTIC_ASSERT(false, + "GetSeqFrameAndCountPages needs a non-null pres shell"); + return NS_ERROR_FAILURE; + } + // Finds the SimplePageSequencer frame nsIPageSequenceFrame* seqFrame = aPO->mPresShell->GetPageSequenceFrame(); aSeqFrame = do_QueryFrame(seqFrame); if (!aSeqFrame) { return NS_ERROR_FAILURE; } // count the total number of pages