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

Unified Diff: fpdfsdk/src/javascript/JS_Object.cpp

Issue 800883004: XFA: merge patch from CL 831903002, m_sTimeMap fixes (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: fpdfsdk/src/javascript/JS_Object.cpp
diff --git a/fpdfsdk/src/javascript/JS_Object.cpp b/fpdfsdk/src/javascript/JS_Object.cpp
index 09150e796b610635e8da591056a8a45ddcedfcb7..34ad8e1f0a343624bf037900c8e9c2939b18e5f3 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;
« fpdfsdk/include/javascript/JS_Object.h ('K') | « fpdfsdk/include/javascript/JS_Object.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698