summaryrefslogtreecommitdiff
path: root/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-01-02 17:17:02 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-01-03 19:54:37 +0000
commitc8fd3318a8deca3e1eabd6f7a9449ae4a0fa964d (patch)
treea5aedd888a3981f53722b7d65ea969d246f267c8 /xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
parentdb194cf018069b930d0e3d5fc0242e14f70e8620 (diff)
downloadpdfium-c8fd3318a8deca3e1eabd6f7a9449ae4a0fa964d.tar.xz
Cleaning out params in CPDFXFA_Context
This CL cleans up some of the out params in CPDFXFA_Context. In the process several of the strings returned by ::LoadString() are inlined in their call sites and the defines removed. BUG=pdfium:549 Change-Id: I41a7ceeba3962299eecd0cb714ddb03d28dbb0ea Reviewed-on: https://pdfium-review.googlesource.com/2134 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/fm2js/xfa_fm2jscontext.cpp')
-rw-r--r--xfa/fxfa/fm2js/xfa_fm2jscontext.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
index 01328f2374..862571e0af 100644
--- a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
+++ b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
@@ -6512,12 +6512,11 @@ void CXFA_FM2JSContext::GlobalPropertyGetter(CFXJSE_Value* pValue) {
void CXFA_FM2JSContext::ThrowException(int32_t iStringID, ...) {
IXFA_AppProvider* pAppProvider = m_pDocument->GetNotify()->GetAppProvider();
ASSERT(pAppProvider);
- CFX_WideString wsFormat;
- pAppProvider->LoadString(iStringID, wsFormat);
+
CFX_WideString wsMessage;
va_list arg_ptr;
va_start(arg_ptr, iStringID);
- wsMessage.FormatV(wsFormat.c_str(), arg_ptr);
+ wsMessage.FormatV(pAppProvider->LoadString(iStringID).c_str(), arg_ptr);
va_end(arg_ptr);
FXJSE_ThrowMessage(
FX_UTF8Encode(wsMessage.c_str(), wsMessage.GetLength()).AsStringC());