Commit 7b9251fa authored by Lei Zhang's avatar Lei Zhang Committed by Commit Bot

Fix DCHECK failure in PrintRenderFrameHelper::PrintPreviewContext.

Accept the "DONE" state as a valid state for failing, since after the
rendering is done, there is still work to do and that work can
potentially fail.

BUG=872980

Change-Id: If1eb31c57057b2e6354dc4649ec7806468fa3f1d
Reviewed-on: https://chromium-review.googlesource.com/1170199Reviewed-by: default avatarRebekah Potter <rbpotter@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#582775}
parent 33e3f98a
...@@ -2306,7 +2306,7 @@ void PrintRenderFrameHelper::PrintPreviewContext::Finished() { ...@@ -2306,7 +2306,7 @@ void PrintRenderFrameHelper::PrintPreviewContext::Finished() {
} }
void PrintRenderFrameHelper::PrintPreviewContext::Failed(bool report_error) { void PrintRenderFrameHelper::PrintPreviewContext::Failed(bool report_error) {
DCHECK(state_ == INITIALIZED || state_ == RENDERING); DCHECK(state_ != UNINITIALIZED);
state_ = INITIALIZED; state_ = INITIALIZED;
if (report_error) { if (report_error) {
DCHECK_NE(PREVIEW_ERROR_NONE, error_); DCHECK_NE(PREVIEW_ERROR_NONE, error_);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment