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

Unified Diff: Source/platform/Timer.cpp

Issue 1171463006: Make Timer and CancellableTaskFactory embeddeable in lazily swept objects. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: mark ScriptRunner's CancellableTaskFactory as needing unpoisoning Created 5 years, 6 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 | « Source/platform/Timer.h ('k') | Source/platform/scheduler/CancellableTaskFactory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/Timer.cpp
diff --git a/Source/platform/Timer.cpp b/Source/platform/Timer.cpp
index 86c3d8340522ccb74f0d38d80ecc083d054d4efc..235966fbe161907dcd30d864fa748b1284e644e4 100644
--- a/Source/platform/Timer.cpp
+++ b/Source/platform/Timer.cpp
@@ -84,7 +84,6 @@ double TimerBase::nextFireInterval() const
return m_nextFireTime - current;
}
-NO_LAZY_SWEEP_SANITIZE_ADDRESS
void TimerBase::setNextFireTime(double now, double delay)
{
ASSERT(m_thread == currentThread());
@@ -103,8 +102,12 @@ void TimerBase::setNextFireTime(double now, double delay)
}
}
+NO_LAZY_SWEEP_SANITIZE_ADDRESS
void TimerBase::run()
{
+ if (!canFire())
+ return;
+
TRACE_EVENT0("blink", "TimerBase::run");
ASSERT_WITH_MESSAGE(m_thread == currentThread(), "Timer posted by %s %s was run on a different thread", m_location.functionName(), m_location.fileName());
TRACE_EVENT_SET_SAMPLING_STATE("blink", "BlinkInternal");
« no previous file with comments | « Source/platform/Timer.h ('k') | Source/platform/scheduler/CancellableTaskFactory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698