diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2018-05-17 17:44:32 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-05-17 17:44:32 +0000 |
commit | d99d5e3a34e18a771d62d449f379cb65bb54eee1 (patch) | |
tree | 86190fd68491964507f4ed3cfe0ab2fddf16e26e /xfa | |
parent | 3689975377feb92a84488cd51b1cb30c818e3d55 (diff) | |
download | pdfium-d99d5e3a34e18a771d62d449f379cb65bb54eee1.tar.xz |
Add comment about cleaning binding nodes
The reason for calling ReleaseBindingNodes() has changed but the code
comment hadn't. This CL updates the code comment to make it clearer why
this release has to happen.
Change-Id: I0c08c7580ef7c8508cd4db7b8930d5f2cd595b1b
Reviewed-on: https://pdfium-review.googlesource.com/32690
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'xfa')
-rw-r--r-- | xfa/fxfa/parser/cxfa_document.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/xfa/fxfa/parser/cxfa_document.cpp b/xfa/fxfa/parser/cxfa_document.cpp index 4ed337019b..5c4b55776a 100644 --- a/xfa/fxfa/parser/cxfa_document.cpp +++ b/xfa/fxfa/parser/cxfa_document.cpp @@ -1283,7 +1283,9 @@ CXFA_Document::CXFA_Document(CXFA_FFNotify* notify) m_dwDocFlags(0) {} CXFA_Document::~CXFA_Document() { - // Remove all the bindings before freeing the node as the ownership is wonky. + // The destruction order of the nodes is not known because they're stored in a + // list in the document. Therefore. the binding nodes must be released before + // freeing the nodes to avoid dangling UnownedPtrs. if (m_pRootNode) m_pRootNode->ReleaseBindingNodes(); } |