diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-06-21 17:28:24 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-06-21 17:28:24 +0000 |
commit | 3d8131535e6b127c7ededdbd2e76662688997272 (patch) | |
tree | 656faaadbaf0139f8a299b672f6530e7a004b6bb /fpdfsdk/cpdfsdk_actionhandler.cpp | |
parent | a964f2a5ab09dc01d09fad78f940ee8e0e5c0c04 (diff) | |
download | pdfium-3d8131535e6b127c7ededdbd2e76662688997272.tar.xz |
Pass output parameters as pointers in ijs_event_context
It is hard to tell if there is some unsavory stuff going on with
references otherwise. Avoids some const_casts in the process.
Add some UnownedPtrs along the way to check caller's storage duration.
Change-Id: Ic8d85802083f0b27e07993ea25f8f1c15fca1712
Reviewed-on: https://pdfium-review.googlesource.com/35750
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fpdfsdk/cpdfsdk_actionhandler.cpp')
-rw-r--r-- | fpdfsdk/cpdfsdk_actionhandler.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/fpdfsdk/cpdfsdk_actionhandler.cpp b/fpdfsdk/cpdfsdk_actionhandler.cpp index 5b72082104..64d82b93ba 100644 --- a/fpdfsdk/cpdfsdk_actionhandler.cpp +++ b/fpdfsdk/cpdfsdk_actionhandler.cpp @@ -422,22 +422,24 @@ void CPDFSDK_ActionHandler::RunFieldJavaScript( break; case CPDF_AAction::GetFocus: context->OnField_Focus(data->bModifier, data->bShift, pFormField, - data->sValue); + &data->sValue); break; case CPDF_AAction::LoseFocus: context->OnField_Blur(data->bModifier, data->bShift, pFormField, - data->sValue); + &data->sValue); break; case CPDF_AAction::KeyStroke: context->OnField_Keystroke( - data->sChange, data->sChangeEx, data->bKeyDown, data->bModifier, - data->nSelEnd, data->nSelStart, data->bShift, pFormField, - data->sValue, data->bWillCommit, data->bFieldFull, data->bRC); + &data->sChange, data->sChangeEx, data->bKeyDown, + data->bModifier, &data->nSelEnd, &data->nSelStart, data->bShift, + pFormField, &data->sValue, data->bWillCommit, data->bFieldFull, + &data->bRC); break; case CPDF_AAction::Validate: - context->OnField_Validate( - data->sChange, data->sChangeEx, data->bKeyDown, data->bModifier, - data->bShift, pFormField, data->sValue, data->bRC); + context->OnField_Validate(&data->sChange, data->sChangeEx, + data->bKeyDown, data->bModifier, + data->bShift, pFormField, &data->sValue, + &data->bRC); break; default: NOTREACHED(); |