summaryrefslogtreecommitdiff
path: root/samples/pdfium_test.cc
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-07-16 10:06:11 -0700
committerLei Zhang <thestig@chromium.org>2015-07-16 10:06:11 -0700
commitba026913c273a5c1c841bced288fdab03f10ad08 (patch)
treeed0891e25899bfb38c0ccf00acfdf46cb946217a /samples/pdfium_test.cc
parent98e77014d4732e3e8c85d14169090f058f5469d3 (diff)
downloadpdfium-ba026913c273a5c1c841bced288fdab03f10ad08.tar.xz
XFA: Add a comment regarding the shut down order.
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1234323003 .
Diffstat (limited to 'samples/pdfium_test.cc')
-rw-r--r--samples/pdfium_test.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/samples/pdfium_test.cc b/samples/pdfium_test.cc
index 417bd5603b..aa171afe3f 100644
--- a/samples/pdfium_test.cc
+++ b/samples/pdfium_test.cc
@@ -563,8 +563,13 @@ void RenderPdf(const std::string& name, const char* pBuf, size_t len,
}
FORM_DoDocumentAAction(form, FPDFDOC_AACTION_WC);
+
+ // Note: The shut down order here is the reverse of the non-XFA branch order.
+ // Need to work out if this is required, and if it is, the lifetimes of
+ // objects owned by |doc| that |form| reference.
FPDF_CloseDocument(doc);
FPDFDOC_ExitFormFillEnvironment(form);
+
FPDFAvail_Destroy(pdf_avail);
fprintf(stderr, "Rendered %d pages.\n", rendered_pages);