Rip out the KillFocusAnnot call from CPDFSDK_PageView's destructor
authorOliver Chang <ochang@chromium.org>
Fri, 30 Oct 2015 19:48:49 +0000 (12:48 -0700)
committerOliver Chang <ochang@chromium.org>
Fri, 30 Oct 2015 19:48:49 +0000 (12:48 -0700)
commita548b1d3e2444f256bcbf6c2fa2165798e33ba8d
treeacabce92e644f27adef15b1beaeb384d719f2b0a
parent23e20f2d3ce5b416e1c7f7f1c2d68c90ddf2d4ad
Rip out the KillFocusAnnot call from CPDFSDK_PageView's destructor

Previously, blur event actions could potentially touch deleted PageViews
as CPDFSDK_Document deletes the PageViews one by one.

This also fixes a related issue: CPDFSDK_Document::SetFocusAnnot no
longer does anything if the document is being destroyed. Otherwise, it
eventually tries to use m_pEnv->GetSDKDocument() at which point has
already been set to NULL by FPDFDOC_ExitFormFillEnvironment.

R=tsepez@chromium.org, thestig@chromium.org
BUG=512445

Review URL: https://codereview.chromium.org/1414353007 .
fpdfsdk/include/fsdk_mgr.h
fpdfsdk/src/fsdk_mgr.cpp