Merge to master: Kill off some dodgy JS callbacks
[pdfium.git] / fpdfsdk / src / javascript / JS_Object.cpp
index 3b7774d..6c0c868 100644 (file)
 // #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;
@@ -80,13 +87,6 @@ void CJS_EmbedObj::EndTimer(CJS_Timer* pTimer)
        delete pTimer;
 }
 
-FX_BOOL        CJS_EmbedObj::IsSafeMode(IFXJS_Context* cc)
-{
-       ASSERT(cc != NULL);
-
-       return TRUE;
-}
-
 /* ---------------------------------  CJS_Object --------------------------------- */
 void  FreeObject(const v8::WeakCallbackData<v8::Object, CJS_Object>& data)
 {