summaryrefslogtreecommitdiffstats
path: root/pdf
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2015-05-15 15:17:31 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-15 22:18:26 +0000
commit1626f004512fd5b52d80a18dda9c910825d8cc03 (patch)
tree037a0e74c613389afbdf01cf1f7116d45216a0c4 /pdf
parent1cf60af0cc6019f03d4cb89c5b3c4788730d3a5e (diff)
downloadchromium_src-1626f004512fd5b52d80a18dda9c910825d8cc03.zip
chromium_src-1626f004512fd5b52d80a18dda9c910825d8cc03.tar.gz
chromium_src-1626f004512fd5b52d80a18dda9c910825d8cc03.tar.bz2
Cleanup: Slight simplification in the PDFiumEngine dtor.
The functions being called already checks for NULL input. Review URL: https://codereview.chromium.org/1131093004 Cr-Commit-Position: refs/heads/master@{#330214}
Diffstat (limited to 'pdf')
-rw-r--r--pdf/pdfium/pdfium_engine.cc12
1 files changed, 3 insertions, 9 deletions
diff --git a/pdf/pdfium/pdfium_engine.cc b/pdf/pdfium/pdfium_engine.cc
index 8012dd2..e463f15 100644
--- a/pdf/pdfium/pdfium_engine.cc
+++ b/pdf/pdfium/pdfium_engine.cc
@@ -661,17 +661,11 @@ PDFiumEngine::~PDFiumEngine() {
pages_[i]->Unload();
if (doc_) {
- if (form_) {
- FORM_DoDocumentAAction(form_, FPDFDOC_AACTION_WC);
- }
+ FORM_DoDocumentAAction(form_, FPDFDOC_AACTION_WC);
FPDF_CloseDocument(doc_);
- if (form_) {
- FPDFDOC_ExitFormFillEnvironment(form_);
- }
+ FPDFDOC_ExitFormFillEnvironment(form_);
}
-
- if (fpdf_availability_)
- FPDFAvail_Destroy(fpdf_availability_);
+ FPDFAvail_Destroy(fpdf_availability_);
STLDeleteElements(&pages_);
}