Chromium Code Reviews| 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) { |