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

Unified Diff: fpdfsdk/formfiller/cffl_formfiller.cpp

Issue 2368403002: Watch destruction of widgets around OnAAction() method (Closed)
Patch Set: Pass everywhere 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..633e086fe05ef0660eb7ec099fc8199b6fbe05e7 100644
--- a/fpdfsdk/formfiller/cffl_formfiller.cpp
+++ b/fpdfsdk/formfiller/cffl_formfiller.cpp
@@ -527,15 +527,19 @@ 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);
+ CPDFSDK_Annot::ObservedPtr pObserved(m_pWidget);
+ pFormFiller->OnKeyStrokeCommit(pObserved, pPageView, bRC, bExit, nFlag);
+ if (!pObserved)
Lei Zhang 2016/09/27 17:02:22 Combine into: if (!pObserved || bExit) Same patte
Tom Sepez 2016/09/27 20:21:08 Ah, ok. bExit in a few places is an out variable,
+ bExit = TRUE;
if (bExit)
return TRUE;
if (!bRC) {
ResetPDFWindow(pPageView, FALSE);
return TRUE;
}
-
- pFormFiller->OnValidate(m_pWidget, pPageView, bRC, bExit, nFlag);
+ pFormFiller->OnValidate(pObserved, pPageView, bRC, bExit, nFlag);
+ if (!pObserved)
+ bExit = TRUE;
if (bExit)
return TRUE;
if (!bRC) {
« 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