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

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

Issue 1146903003: Allow timer heap updates on firing shared timer. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 void ThreadTimers::sharedTimerFired() 104 void ThreadTimers::sharedTimerFired()
105 { 105 {
106 TRACE_EVENT_SET_SAMPLING_STATE("blink", "BlinkInternal"); 106 TRACE_EVENT_SET_SAMPLING_STATE("blink", "BlinkInternal");
107 107
108 // Redirect to non-static method. 108 // Redirect to non-static method.
109 PlatformThreadData::current().threadTimers().sharedTimerFiredInternal(); 109 PlatformThreadData::current().threadTimers().sharedTimerFiredInternal();
110 110
111 TRACE_EVENT_SET_SAMPLING_STATE("blink", "Sleeping"); 111 TRACE_EVENT_SET_SAMPLING_STATE("blink", "Sleeping");
112 } 112 }
113 113
114 NO_LAZY_SWEEP_SANITIZE_ADDRESS
114 void ThreadTimers::sharedTimerFiredInternal() 115 void ThreadTimers::sharedTimerFiredInternal()
115 { 116 {
116 // Do a re-entrancy check. 117 // Do a re-entrancy check.
117 if (m_firingTimers) 118 if (m_firingTimers)
118 return; 119 return;
119 m_firingTimers = true; 120 m_firingTimers = true;
120 m_pendingSharedTimerFireTime = 0; 121 m_pendingSharedTimerFireTime = 0;
121 122
122 double fireTime = monotonicallyIncreasingTime(); 123 double fireTime = monotonicallyIncreasingTime();
123 double timeToQuit = fireTime + maxDurationOfFiringTimers; 124 double timeToQuit = fireTime + maxDurationOfFiringTimers;
(...skipping 19 matching lines...) Expand all
143 || (isMainThread() && Platform::current()->currentThread()->schedule r()->shouldYieldForHighPriorityWork())) 144 || (isMainThread() && Platform::current()->currentThread()->schedule r()->shouldYieldForHighPriorityWork()))
144 break; 145 break;
145 } 146 }
146 147
147 m_firingTimers = false; 148 m_firingTimers = false;
148 149
149 updateSharedTimer(); 150 updateSharedTimer();
150 } 151 }
151 152
152 } // namespace blink 153 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698