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

Unified Diff: fpdfsdk/javascript/app.cpp

Issue 2626863003: Don't put timers with ID == 0 into the global timer map. (Closed)
Patch Set: add test Created 3 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
« no previous file with comments | « fpdfsdk/fpdfformfill_embeddertest.cpp ('k') | testing/embedder_test_timer_handling_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/javascript/app.cpp
diff --git a/fpdfsdk/javascript/app.cpp b/fpdfsdk/javascript/app.cpp
index 80c952d6cac03d367db3ecde6d42fdc6c2e5bcfc..6562d1b5985f0695cce4a9b3f7e08e08d9487bc0 100644
--- a/fpdfsdk/javascript/app.cpp
+++ b/fpdfsdk/javascript/app.cpp
@@ -75,7 +75,8 @@ GlobalTimer::GlobalTimer(app* pObj,
m_pFormFillEnv(pFormFillEnv) {
CFX_SystemHandler* pHandler = m_pFormFillEnv->GetSysHandler();
m_nTimerID = pHandler->SetTimer(dwElapse, Trigger);
- (*GetGlobalTimerMap())[m_nTimerID] = this;
+ if (m_nTimerID)
+ (*GetGlobalTimerMap())[m_nTimerID] = this;
}
GlobalTimer::~GlobalTimer() {
« no previous file with comments | « fpdfsdk/fpdfformfill_embeddertest.cpp ('k') | testing/embedder_test_timer_handling_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698