| Index: fpdfsdk/src/javascript/JS_Context.cpp
|
| diff --git a/fpdfsdk/src/javascript/JS_Context.cpp b/fpdfsdk/src/javascript/JS_Context.cpp
|
| index b67096d9bc0db49d93b5bcf9b4cad72576ec58bd..7e7a14a008c1bd1755408db5689d8d200c8c904d 100644
|
| --- a/fpdfsdk/src/javascript/JS_Context.cpp
|
| +++ b/fpdfsdk/src/javascript/JS_Context.cpp
|
| @@ -53,18 +53,15 @@ FX_BOOL CJS_Context::RunScript(const CFX_WideString& script,
|
| return FALSE;
|
| }
|
|
|
| - FXJSErr error = {NULL, NULL, 0};
|
| + CFX_WideString sErrorMessage;
|
| int nRet = 0;
|
| if (script.GetLength() > 0) {
|
| - nRet = FXJS_Execute(m_pRuntime->GetIsolate(), this, script.c_str(),
|
| - script.GetLength(), &error);
|
| + nRet = m_pRuntime->Execute(this, script.c_str(), script.GetLength(),
|
| + sErrorMessage);
|
| }
|
|
|
| if (nRet < 0) {
|
| - CFX_WideString sLine;
|
| - sLine.Format(L"[ Line: %05d { %s } ] : %s", error.linnum - 1, error.srcline,
|
| - error.message);
|
| - info += sLine;
|
| + info += sErrorMessage;
|
| } else {
|
| info = JSGetStringFromID(this, IDS_STRING_RUN);
|
| }
|
|
|