Index: pdf/pdfium/pdfium_engine.cc |
diff --git a/pdf/pdfium/pdfium_engine.cc b/pdf/pdfium/pdfium_engine.cc |
index 0528c94ecca007a1e58ec053c96689974027318d..f9f2877f0a825ba95c2d9cc5493e71ec8a1e434b 100644 |
--- a/pdf/pdfium/pdfium_engine.cc |
+++ b/pdf/pdfium/pdfium_engine.cc |
@@ -2598,9 +2598,10 @@ void PDFiumEngine::ContinueLoadingDocument( |
if (!form_) { |
// Only returns 0 when data isn't available. If form data is downloaded, or |
- // if this isn't a form, returns positive values. |
- if (!doc_loader_.IsDocumentComplete() && |
- !FPDFAvail_IsFormAvail(fpdf_availability_, &download_hints_)) { |
+ // if this isn't a form, returns positive values. FPDFAvail_IsFormAvail() |
+ // must be called before continuing, so it must come first in the condition. |
+ if (!FPDFAvail_IsFormAvail(fpdf_availability_, &download_hints_) && |
Lei Zhang
2015/12/30 01:09:21
How about we call these 2 functions separately, an
spelchat
2015/12/30 17:14:58
PDF_FORM_NOTEXIST is OK too, it just means there i
|
+ !doc_loader_.IsDocumentComplete()) { |
return; |
} |