OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #include "../../include/javascript/JavaScript.h" | 7 #include "../../include/javascript/JavaScript.h" |
8 #include "../../include/javascript/IJavaScript.h" | 8 #include "../../include/javascript/IJavaScript.h" |
9 //#include "../../include/javascript/JS_ResMgr.h" | 9 //#include "../../include/javascript/JS_ResMgr.h" |
10 #include "../../include/javascript/JS_Context.h" | 10 #include "../../include/javascript/JS_Context.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 } | 76 } |
77 else | 77 else |
78 { | 78 { |
79 nRet = JS_Parse(*m_pRuntime, this, script, script.GetLen
gth(), &error); | 79 nRet = JS_Parse(*m_pRuntime, this, script, script.GetLen
gth(), &error); |
80 } | 80 } |
81 } | 81 } |
82 | 82 |
83 if (nRet < 0) | 83 if (nRet < 0) |
84 { | 84 { |
85 CFX_WideString sLine; | 85 CFX_WideString sLine; |
86 » » sLine.Format((FX_LPCWSTR)L"[ Line: %05d { %s } ] : %s",error.lin
num-1,error.srcline,error.message); | 86 » » sLine.Format(L"[ Line: %05d { %s } ] : %s",error.linnum-1,error.
srcline,error.message); |
87 | 87 |
88 // TRACE(L"/* -------------- JS Error -------------- */\n")
; | 88 // TRACE(L"/* -------------- JS Error -------------- */\n")
; |
89 // TRACE(sLine); | 89 // TRACE(sLine); |
90 // TRACE(L"\n"); | 90 // TRACE(L"\n"); |
91 //CFX_ByteString sTemp = CFX_ByteString::FromUnicode(error.messa
ge); | 91 //CFX_ByteString sTemp = CFX_ByteString::FromUnicode(error.messa
ge); |
92 info += sLine; | 92 info += sLine; |
93 } | 93 } |
94 else | 94 else |
95 { | 95 { |
96 info = JSGetStringFromID(this, IDS_STRING_RUN); | 96 info = JSGetStringFromID(this, IDS_STRING_RUN); |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 ASSERT(m_pEventHandler != NULL); | 346 ASSERT(m_pEventHandler != NULL); |
347 m_pEventHandler->OnBatchExec(pTarget); | 347 m_pEventHandler->OnBatchExec(pTarget); |
348 } | 348 } |
349 | 349 |
350 void CJS_Context::OnMenu_Exec(CPDFSDK_Document* pTarget,const CFX_WideString& st
rTargetName) | 350 void CJS_Context::OnMenu_Exec(CPDFSDK_Document* pTarget,const CFX_WideString& st
rTargetName) |
351 { | 351 { |
352 ASSERT(m_pEventHandler != NULL); | 352 ASSERT(m_pEventHandler != NULL); |
353 m_pEventHandler->OnMenu_Exec(pTarget, strTargetName); | 353 m_pEventHandler->OnMenu_Exec(pTarget, strTargetName); |
354 } | 354 } |
355 | 355 |
OLD | NEW |