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

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

Issue 847803002: Make ScriptStreamer and dependents Oilpan friendly. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add ScriptSourceCode::isNull() comment 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/frame/DOMTimerCoordinator.h ('k') | Source/core/frame/DOMWindowTimers.cpp » ('j') | 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 10
10 namespace blink { 11 namespace blink {
11 12
12 DOMTimerCoordinator::DOMTimerCoordinator() 13 DOMTimerCoordinator::DOMTimerCoordinator()
13 : m_circularSequentialID(0) 14 : m_circularSequentialID(0)
14 , m_timerNestingLevel(0) 15 , m_timerNestingLevel(0)
15 { 16 {
16 } 17 }
17 18
18 int DOMTimerCoordinator::installNewTimeout(ExecutionContext* context, PassOwnPtr <ScheduledAction> action, int timeout, bool singleShot) 19 int DOMTimerCoordinator::installNewTimeout(ExecutionContext* context, PassOwnPtr WillBeRawPtr<ScheduledAction> action, int timeout, bool singleShot)
19 { 20 {
20 // FIXME: DOMTimers depends heavily on ExecutionContext. Decouple them. 21 // FIXME: DOMTimers depends heavily on ExecutionContext. Decouple them.
21 ASSERT(context->timers() == this); 22 ASSERT(context->timers() == this);
22 int timeoutID = nextID(); 23 int timeoutID = nextID();
23 TimeoutMap::AddResult result = m_timers.add(timeoutID, DOMTimer::create(cont ext, action, timeout, singleShot, timeoutID)); 24 TimeoutMap::AddResult result = m_timers.add(timeoutID, DOMTimer::create(cont ext, action, timeout, singleShot, timeoutID));
24 ASSERT(result.isNewEntry); 25 ASSERT(result.isNewEntry);
25 DOMTimer* timer = result.storedValue->value.get(); 26 DOMTimer* timer = result.storedValue->value.get();
26 27
27 timer->suspendIfNeeded(); 28 timer->suspendIfNeeded();
28 29
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 61
61 if (m_circularSequentialID <= 0) 62 if (m_circularSequentialID <= 0)
62 m_circularSequentialID = 1; 63 m_circularSequentialID = 1;
63 64
64 if (!m_timers.contains(m_circularSequentialID)) 65 if (!m_timers.contains(m_circularSequentialID))
65 return m_circularSequentialID; 66 return m_circularSequentialID;
66 } 67 }
67 } 68 }
68 69
69 } // namespace blink 70 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/frame/DOMTimerCoordinator.h ('k') | Source/core/frame/DOMWindowTimers.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698