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

Unified Diff: fpdfsdk/formfiller/cffl_formfiller.cpp

Issue 2368403002: Watch destruction of widgets around OnAAction() method (Closed)
Patch Set: blown merge Created 4 years, 3 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 | « fpdfsdk/formfiller/cffl_checkbox.cpp ('k') | fpdfsdk/formfiller/cffl_interactiveformfiller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/formfiller/cffl_formfiller.cpp
diff --git a/fpdfsdk/formfiller/cffl_formfiller.cpp b/fpdfsdk/formfiller/cffl_formfiller.cpp
index 7aeda57c2e3950f0bb29f84e80e4c86e088a0c04..827b9b09ca829dd8d89b8c68619a7f81f0e66525 100644
--- a/fpdfsdk/formfiller/cffl_formfiller.cpp
+++ b/fpdfsdk/formfiller/cffl_formfiller.cpp
@@ -527,22 +527,21 @@ FX_BOOL CFFL_FormFiller::CommitData(CPDFSDK_PageView* pPageView,
FX_BOOL bExit = FALSE;
CFFL_InteractiveFormFiller* pFormFiller =
m_pEnv->GetInteractiveFormFiller();
- pFormFiller->OnKeyStrokeCommit(m_pWidget, pPageView, bRC, bExit, nFlag);
- if (bExit)
+ CPDFSDK_Annot::ObservedPtr pObserved(m_pWidget);
+ pFormFiller->OnKeyStrokeCommit(&pObserved, pPageView, bRC, bExit, nFlag);
+ if (!pObserved || bExit)
return TRUE;
if (!bRC) {
ResetPDFWindow(pPageView, FALSE);
return TRUE;
}
-
- pFormFiller->OnValidate(m_pWidget, pPageView, bRC, bExit, nFlag);
- if (bExit)
+ pFormFiller->OnValidate(&pObserved, pPageView, bRC, bExit, nFlag);
+ if (!pObserved || bExit)
return TRUE;
if (!bRC) {
ResetPDFWindow(pPageView, FALSE);
return TRUE;
}
-
SaveData(pPageView);
pFormFiller->OnCalculate(m_pWidget, pPageView, bExit, nFlag);
if (bExit)
« no previous file with comments | « fpdfsdk/formfiller/cffl_checkbox.cpp ('k') | fpdfsdk/formfiller/cffl_interactiveformfiller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698