summaryrefslogtreecommitdiff
path: root/fpdfsdk/include/javascript/JS_Object.h
diff options
context:
space:
mode:
authorBo Xu <bo_xu@foxitsoftware.com>2014-10-28 23:03:33 -0700
committerBo Xu <bo_xu@foxitsoftware.com>2014-11-03 11:10:11 -0800
commitfdc00a7042d912aafaabddae4d9c84199921ef23 (patch)
tree32ab8ac91cc68d2cd15b9168782a71b3f3f5e7b9 /fpdfsdk/include/javascript/JS_Object.h
parente9b38fa38de2c95d8260be31c57d9272c4d127ed (diff)
downloadpdfium-fdc00a7042d912aafaabddae4d9c84199921ef23.tar.xz
Merge XFA to PDFium master at 4dc95e7 on 10/28/2014
Diffstat (limited to 'fpdfsdk/include/javascript/JS_Object.h')
-rw-r--r--fpdfsdk/include/javascript/JS_Object.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/fpdfsdk/include/javascript/JS_Object.h b/fpdfsdk/include/javascript/JS_Object.h
index a6dac5d2a3..ca6f4a1d11 100644
--- a/fpdfsdk/include/javascript/JS_Object.h
+++ b/fpdfsdk/include/javascript/JS_Object.h
@@ -26,7 +26,7 @@ public:
operator CJS_Object* (){return m_pJSObject;};
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);
+ 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);
@@ -56,7 +56,7 @@ public:
CJS_EmbedObj * GetEmbedObject(){return m_pEmbedObj;};
static CPDFSDK_PageView * JSGetPageView(IFXJS_Context* cc);
- static int MsgBox(CPDFDoc_Environment* pApp, CPDFSDK_PageView* pPageView, FX_LPCWSTR swMsg, FX_LPCWSTR swTitle = NULL, FX_UINT nType = 0,FX_UINT nIcon = 0);
+ static int MsgBox(CPDFDoc_Environment * pApp, CPDFSDK_PageView* pPageView, FX_LPCWSTR swMsg, FX_LPCWSTR swTitle = NULL, FX_UINT nType = 0,FX_UINT nIcon = 0);
static void Alert(CJS_Context* pContext, FX_LPCWSTR swMsg);
v8::Isolate* GetIsolate() {return m_pIsolate;}
@@ -164,7 +164,7 @@ class CJS_Runtime;
class CJS_Timer
{
public:
- CJS_Timer(CJS_EmbedObj * pObj,CPDFDoc_Environment* pApp):
+ CJS_Timer(CJS_EmbedObj * pObj, CPDFDoc_Environment* pApp):
m_nTimerID(0),
m_pEmbedObj(pObj),
m_bProcessing(FALSE),
@@ -197,6 +197,11 @@ public:
{
if (m_nTimerID)
{
+ if (m_pApp == NULL) {
+ m_sTimeMap.RemoveAt(m_nTimerID);
+ m_nTimerID = 0;
+ return;
+ }
IFX_SystemHandler* pHandler = m_pApp->GetSysHandler();
pHandler->KillTimer(m_nTimerID);
m_sTimeMap.RemoveAt(m_nTimerID);
@@ -277,8 +282,8 @@ private:
FX_BOOL m_bProcessing;
//data
- FX_DWORD m_dwStartTime;
- FX_DWORD m_dwTimeOut;
+ FX_DWORD m_dwStartTime;
+ FX_DWORD m_dwTimeOut;
FX_DWORD m_dwElapse;
CJS_Runtime* m_pRuntime;
CFX_WideString m_swJScript;