Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Unified Diff: pdf/pdfium/pdfium_engine.cc

Issue 1556603002: Call FPDFAvail_IsFormAvail() before creating form. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698