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

Unified Diff: samples/pdfium_test.cc

Issue 1234323003: XFA: Add a comment regarding the shut down order. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@xfa
Patch Set: Created 5 years, 5 months 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 | testing/embedder_test.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/pdfium_test.cc
diff --git a/samples/pdfium_test.cc b/samples/pdfium_test.cc
index 417bd5603b229528130daea57ca64c8e20e94b97..aa171afe3f212460e7d53d6e2bc953569a0ea1ef 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);
« no previous file with comments | « no previous file | testing/embedder_test.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698