From e3dbe4db199586bee83f7db3ace142d4c71d0a18 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Thu, 5 Feb 2015 15:52:15 -0800 Subject: Merge to master: Kill off some dodgy JS callbacks Note that this work was done opposite the usual branch order, because I didn't want to kill things in master that turned out to be in use in XFA. Original Review URL: https://codereview.chromium.org/883393007 TBR=jam@chromium.org Review URL: https://codereview.chromium.org/903893002 --- fpdfsdk/include/javascript/JS_Object.h | 22 ++++++++++------------ fpdfsdk/include/javascript/app.h | 3 --- 2 files changed, 10 insertions(+), 15 deletions(-) (limited to 'fpdfsdk/include/javascript') diff --git a/fpdfsdk/include/javascript/JS_Object.h b/fpdfsdk/include/javascript/JS_Object.h index 2351b096f3..dbf7da68a4 100644 --- a/fpdfsdk/include/javascript/JS_Object.h +++ b/fpdfsdk/include/javascript/JS_Object.h @@ -1,7 +1,7 @@ // Copyright 2014 PDFium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. - + // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com #ifndef _JS_OBJECT_H_ @@ -28,10 +28,8 @@ public: CPDFSDK_PageView * JSGetPageView(IFXJS_Context* cc); int MsgBox(CPDFDoc_Environment* pApp, CPDFSDK_PageView* pPageView, FX_LPCWSTR swMsg, FX_LPCWSTR swTitle = NULL, FX_UINT nType = 0, FX_UINT nIcon = 0); void Alert(CJS_Context* pContext, FX_LPCWSTR swMsg); - FX_BOOL IsSafeMode(IFXJS_Context* cc); protected: - CJS_Object* m_pJSObject; }; @@ -40,7 +38,7 @@ class CJS_Object : public CFX_Object public: CJS_Object(JSFXObject pObject); virtual ~CJS_Object(void); - + void MakeWeak(); virtual FX_BOOL IsType(FX_LPCSTR sClassName){return TRUE;}; @@ -141,9 +139,9 @@ public: } int Find(FX_UINT nIndex) - { + { for (int i=0,sz=m_Array.GetSize(); inID == nIndex) @@ -165,8 +163,8 @@ class CJS_Timer { public: CJS_Timer(CJS_EmbedObj * pObj,CPDFDoc_Environment* pApp): - m_nTimerID(0), - m_pEmbedObj(pObj), + m_nTimerID(0), + m_pEmbedObj(pObj), m_bProcessing(FALSE), m_dwStartTime(0), m_dwTimeOut(0), @@ -176,7 +174,7 @@ public: m_pApp(pApp) { } - + virtual ~CJS_Timer() { KillJSTimer(); @@ -184,7 +182,7 @@ public: public: FX_UINT SetJSTimer(FX_UINT nElapse) - { + { if (m_nTimerID)KillJSTimer(); IFX_SystemHandler* pHandler = m_pApp->GetSysHandler(); m_nTimerID = pHandler->SetTimer(nElapse,TimerProc); @@ -238,7 +236,7 @@ public: { m_pRuntime = pRuntime; } - + CJS_Runtime* GetRuntime() const { return m_pRuntime; @@ -272,7 +270,7 @@ public: }; private: - FX_UINT m_nTimerID; + FX_UINT m_nTimerID; CJS_EmbedObj* m_pEmbedObj; FX_BOOL m_bProcessing; diff --git a/fpdfsdk/include/javascript/app.h b/fpdfsdk/include/javascript/app.h index 671b3581a5..1c95bf430d 100644 --- a/fpdfsdk/include/javascript/app.h +++ b/fpdfsdk/include/javascript/app.h @@ -160,9 +160,6 @@ private: public: static CFX_WideString SysPathToPDFPath(const CFX_WideString& sOldPath); - static CFX_WideString PDFPathToSysPath(const CFX_WideString& sOldPath); - static CFX_WideString RelativePathToSysPath(const CFX_WideString& sOldPath, const CFX_WideString& sFilePath); - private: -- cgit v1.2.3