diff options
author | Tom Sepez <tsepez@chromium.org> | 2017-05-18 09:51:57 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-05-18 17:57:26 +0000 |
commit | 7dc9fe5a646b68cf4774a25c67d0aa0cf9c8a453 (patch) | |
tree | 6dc9bd2c2c78ebd2a9bcdf3a943837d754eca53e /fpdfsdk/fpdfdoc_unittest.cpp | |
parent | 41066c1ecaafd99904b160211985b56cce195ee8 (diff) | |
download | pdfium-7dc9fe5a646b68cf4774a25c67d0aa0cf9c8a453.tar.xz |
Break linkage from CPDFXA_DocEnvironment to IJS_EventContext.
CPDFXFA_DocEnvionment is part of the heirarchy of objects owned by
the embedder under its FPDF_Document object.
IJS_EventContext is part of the hierarchy of objects owned by the
embedder under its FPDF_FormHandle object.
The FPDF_Document must outlive the FPDF_FormHandle, so there is a
lifetime inversion with the m_pJSEventContext member. No matter,
event contexts are transient and allocated in a stack-based manner
as control bounces from C++ to JS and vice versa, and keeping a
persistent one seems wrong. So make it only as needed.
Bug: 723644
Change-Id: I74dd328ad4b501e4adf57821b44ecc78d945eb0f
Reviewed-on: https://pdfium-review.googlesource.com/5656
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdfdoc_unittest.cpp')
0 files changed, 0 insertions, 0 deletions