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

Side by Side Diff: Source/platform/Timer.cpp

Issue 273993002: Allow XHR timeout attribute to be overridden after send(), per spec (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 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 unified diff | Download patch
« Source/platform/Timer.h ('K') | « Source/platform/Timer.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2009 Google Inc. All rights reserved. 3 * Copyright (C) 2009 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 205
206 void TimerBase::start(double nextFireInterval, double repeatInterval, const Trac eLocation& caller) 206 void TimerBase::start(double nextFireInterval, double repeatInterval, const Trac eLocation& caller)
207 { 207 {
208 ASSERT(m_thread == currentThread()); 208 ASSERT(m_thread == currentThread());
209 209
210 m_location = caller; 210 m_location = caller;
211 m_repeatInterval = repeatInterval; 211 m_repeatInterval = repeatInterval;
212 setNextFireTime(monotonicallyIncreasingTime() + nextFireInterval); 212 setNextFireTime(monotonicallyIncreasingTime() + nextFireInterval);
213 } 213 }
214 214
215 void TimerBase::startExact(double nextFireInterval, double repeatInterval, const TraceLocation& caller)
tyoshino (SeeGerritForStatus) 2014/05/09 08:04:36 s/nextFireInterval/nextFireTime/
216 {
217 ASSERT(m_thread == currentThread());
218
219 m_location = caller;
220 m_repeatInterval = repeatInterval;
221 setNextFireTime(nextFireInterval);
222 }
223
224
tyoshino (SeeGerritForStatus) 2014/05/09 08:04:36 single blank line
215 void TimerBase::stop() 225 void TimerBase::stop()
216 { 226 {
217 ASSERT(m_thread == currentThread()); 227 ASSERT(m_thread == currentThread());
218 228
219 m_repeatInterval = 0; 229 m_repeatInterval = 0;
220 setNextFireTime(0); 230 setNextFireTime(0);
221 231
222 ASSERT(m_nextFireTime == 0); 232 ASSERT(m_nextFireTime == 0);
223 ASSERT(m_repeatInterval == 0); 233 ASSERT(m_repeatInterval == 0);
224 ASSERT(!inHeap()); 234 ASSERT(!inHeap());
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 } 417 }
408 418
409 double TimerBase::nextUnalignedFireInterval() const 419 double TimerBase::nextUnalignedFireInterval() const
410 { 420 {
411 ASSERT(isActive()); 421 ASSERT(isActive());
412 return max(m_unalignedNextFireTime - monotonicallyIncreasingTime(), 0.0); 422 return max(m_unalignedNextFireTime - monotonicallyIncreasingTime(), 0.0);
413 } 423 }
414 424
415 } // namespace WebCore 425 } // namespace WebCore
416 426
OLDNEW
« Source/platform/Timer.h ('K') | « Source/platform/Timer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698