OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
3 * Copyright (C) 2012 Google Inc. All Rights Reserved. | 3 * Copyright (C) 2012 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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 | 198 |
199 timer->suspendIfNeeded(); | 199 timer->suspendIfNeeded(); |
200 | 200 |
201 return timer->timeoutID(); | 201 return timer->timeoutID(); |
202 } | 202 } |
203 | 203 |
204 void ExecutionContext::removeTimeoutByID(int timeoutID) | 204 void ExecutionContext::removeTimeoutByID(int timeoutID) |
205 { | 205 { |
206 if (timeoutID <= 0) | 206 if (timeoutID <= 0) |
207 return; | 207 return; |
| 208 |
| 209 if (DOMTimer* removedTimer = m_timeouts.get(timeoutID)) |
| 210 removedTimer->dispose(); |
| 211 |
208 m_timeouts.remove(timeoutID); | 212 m_timeouts.remove(timeoutID); |
209 } | 213 } |
210 | 214 |
211 PublicURLManager& ExecutionContext::publicURLManager() | 215 PublicURLManager& ExecutionContext::publicURLManager() |
212 { | 216 { |
213 if (!m_publicURLManager) | 217 if (!m_publicURLManager) |
214 m_publicURLManager = PublicURLManager::create(this); | 218 m_publicURLManager = PublicURLManager::create(this); |
215 return *m_publicURLManager; | 219 return *m_publicURLManager; |
216 } | 220 } |
217 | 221 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 #if ENABLE(OILPAN) | 276 #if ENABLE(OILPAN) |
273 visitor->trace(m_pendingExceptions); | 277 visitor->trace(m_pendingExceptions); |
274 visitor->trace(m_publicURLManager); | 278 visitor->trace(m_publicURLManager); |
275 visitor->trace(m_timeouts); | 279 visitor->trace(m_timeouts); |
276 HeapSupplementable<ExecutionContext>::trace(visitor); | 280 HeapSupplementable<ExecutionContext>::trace(visitor); |
277 #endif | 281 #endif |
278 LifecycleContext<ExecutionContext>::trace(visitor); | 282 LifecycleContext<ExecutionContext>::trace(visitor); |
279 } | 283 } |
280 | 284 |
281 } // namespace blink | 285 } // namespace blink |
OLD | NEW |