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

Side by Side Diff: Source/core/frame/DOMTimerCoordinator.cpp

Issue 1160123004: Oilpan: safely finalize DOMTimers. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix grammatical error in comment 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/frame/DOMTimer.cpp ('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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "core/frame/DOMTimerCoordinator.h" 6 #include "core/frame/DOMTimerCoordinator.h"
7 7
8 #include "core/dom/ExecutionContext.h" 8 #include "core/dom/ExecutionContext.h"
9 #include "core/frame/DOMTimer.h" 9 #include "core/frame/DOMTimer.h"
10 10
(...skipping 18 matching lines...) Expand all
29 29
30 return timeoutID; 30 return timeoutID;
31 } 31 }
32 32
33 void DOMTimerCoordinator::removeTimeoutByID(int timeoutID) 33 void DOMTimerCoordinator::removeTimeoutByID(int timeoutID)
34 { 34 {
35 if (timeoutID <= 0) 35 if (timeoutID <= 0)
36 return; 36 return;
37 37
38 if (DOMTimer* removedTimer = m_timers.get(timeoutID)) 38 if (DOMTimer* removedTimer = m_timers.get(timeoutID))
39 removedTimer->dispose(); 39 removedTimer->disposeTimer();
40 40
41 m_timers.remove(timeoutID); 41 m_timers.remove(timeoutID);
42 } 42 }
43 43
44 void DOMTimerCoordinator::didChangeTimerAlignmentInterval() 44 void DOMTimerCoordinator::didChangeTimerAlignmentInterval()
45 { 45 {
46 for (TimeoutMap::iterator iter = m_timers.begin(); iter != m_timers.end(); + +iter) 46 for (TimeoutMap::iterator iter = m_timers.begin(); iter != m_timers.end(); + +iter)
47 iter->value->didChangeAlignmentInterval(); 47 iter->value->didChangeAlignmentInterval();
48 } 48 }
49 49
(...skipping 11 matching lines...) Expand all
61 61
62 if (m_circularSequentialID <= 0) 62 if (m_circularSequentialID <= 0)
63 m_circularSequentialID = 1; 63 m_circularSequentialID = 1;
64 64
65 if (!m_timers.contains(m_circularSequentialID)) 65 if (!m_timers.contains(m_circularSequentialID))
66 return m_circularSequentialID; 66 return m_circularSequentialID;
67 } 67 }
68 } 68 }
69 69
70 } // namespace blink 70 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/frame/DOMTimer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698