Bug 1276810 follow-up - Backout the nsPresShell.cpp change to reduce infallibility coupling. r=milan

This commit is contained in:
Jonathan Watt 2016-05-26 12:31:14 +01:00
parent ee23c0a77c
commit 0a2efa2106

View File

@ -2923,8 +2923,9 @@ PresShell::CreateReferenceRenderingContext()
RefPtr<gfxContext> rc;
if (mPresContext->IsScreen()) {
rc = gfxContext::ForDrawTarget(gfxPlatform::GetPlatform()->ScreenReferenceDrawTarget());
MOZ_RELEASE_ASSERT(rc, "ScreenReferenceDrawTarget never returns null and "
"ForDrawTarget always succeeds with it");
if (!rc) {
return nullptr;
}
} else {
// We assume the devCtx has positive width and height for this call.
// However, width and height, may be outside of the reasonable range