summaryrefslogtreecommitdiff
path: root/fpdfsdk/src
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/src')
-rw-r--r--fpdfsdk/src/javascript/JS_Object.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/fpdfsdk/src/javascript/JS_Object.cpp b/fpdfsdk/src/javascript/JS_Object.cpp
index 09150e796b..34ad8e1f0a 100644
--- a/fpdfsdk/src/javascript/JS_Object.cpp
+++ b/fpdfsdk/src/javascript/JS_Object.cpp
@@ -12,6 +12,13 @@
// #include "../../include/javascript/JS_ResMgr.h"
#include "../../include/javascript/JS_Context.h"
+JS_TIMER_MAPARRAY& GetTimeMap()
+{
+ // Leak the timer array at shutdown.
+ static auto* timeMap = new JS_TIMER_MAPARRAY;
+ return *timeMap;
+}
+
int FXJS_MsgBox(CPDFDoc_Environment* pApp, CPDFSDK_PageView* pPageView, FX_LPCWSTR swMsg, FX_LPCWSTR swTitle, FX_UINT nType, FX_UINT nIcon)
{
int nRet = 0;