Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(825)

Side by Side Diff: fpdfsdk/javascript/cjs_runtime.cpp

Issue 2035743002: Remove unused context param from execute. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "fpdfsdk/javascript/cjs_runtime.h" 7 #include "fpdfsdk/javascript/cjs_runtime.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 (CJS_Document*)FXJS_GetPrivate(GetIsolate(), pThis)) { 214 (CJS_Document*)FXJS_GetPrivate(GetIsolate(), pThis)) {
215 if (Document* pDocument = (Document*)pJSDocument->GetEmbedObject()) 215 if (Document* pDocument = (Document*)pJSDocument->GetEmbedObject())
216 pDocument->AttachDoc(pReaderDoc); 216 pDocument->AttachDoc(pReaderDoc);
217 } 217 }
218 } 218 }
219 } 219 }
220 } 220 }
221 } 221 }
222 } 222 }
223 223
224 int CJS_Runtime::Execute(IJS_Context* cc, 224 int CJS_Runtime::Execute(const CFX_WideString script, CFX_WideString* info) {
225 const wchar_t* script,
226 CFX_WideString* info) {
227 FXJSErr error = {}; 225 FXJSErr error = {};
228 int nRet = FXJS_Execute(m_isolate, cc, script, &error); 226 int nRet = FXJS_Execute(m_isolate, script, &error);
229 if (nRet < 0) { 227 if (nRet < 0) {
230 info->Format(L"[ Line: %05d { %s } ] : %s", error.linnum - 1, error.srcline, 228 info->Format(L"[ Line: %05d { %s } ] : %s", error.linnum - 1, error.srcline,
231 error.message); 229 error.message);
232 } 230 }
233 return nRet; 231 return nRet;
234 } 232 }
235 233
236 bool CJS_Runtime::AddEventToSet(const FieldEvent& event) { 234 bool CJS_Runtime::AddEventToSet(const FieldEvent& event) {
237 return m_FieldEventSet.insert(event).second; 235 return m_FieldEventSet.insert(event).second;
238 } 236 }
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 #endif 322 #endif
325 void CJS_Runtime::AddObserver(Observer* observer) { 323 void CJS_Runtime::AddObserver(Observer* observer) {
326 ASSERT(!pdfium::ContainsKey(m_observers, observer)); 324 ASSERT(!pdfium::ContainsKey(m_observers, observer));
327 m_observers.insert(observer); 325 m_observers.insert(observer);
328 } 326 }
329 327
330 void CJS_Runtime::RemoveObserver(Observer* observer) { 328 void CJS_Runtime::RemoveObserver(Observer* observer) {
331 ASSERT(pdfium::ContainsKey(m_observers, observer)); 329 ASSERT(pdfium::ContainsKey(m_observers, observer));
332 m_observers.erase(observer); 330 m_observers.erase(observer);
333 } 331 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698