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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 int ExecutionContext::installNewTimeout(PassOwnPtr<ScheduledAction> action, int
timeout, bool singleShot) | 192 int ExecutionContext::installNewTimeout(PassOwnPtr<ScheduledAction> action, int
timeout, bool singleShot) |
193 { | 193 { |
194 int timeoutID; | 194 int timeoutID; |
195 while (true) { | 195 while (true) { |
196 timeoutID = circularSequentialID(); | 196 timeoutID = circularSequentialID(); |
197 if (!m_timeouts.contains(timeoutID)) | 197 if (!m_timeouts.contains(timeoutID)) |
198 break; | 198 break; |
199 } | 199 } |
200 TimeoutMap::AddResult result = m_timeouts.add(timeoutID, DOMTimer::create(th
is, action, timeout, singleShot, timeoutID)); | 200 TimeoutMap::AddResult result = m_timeouts.add(timeoutID, DOMTimer::create(th
is, action, timeout, singleShot, timeoutID)); |
201 ASSERT(result.isNewEntry); | 201 ASSERT(result.isNewEntry); |
202 DOMTimer* timer = result.iterator->value.get(); | 202 DOMTimer* timer = result.storedValue->value.get(); |
203 | 203 |
204 timer->suspendIfNeeded(); | 204 timer->suspendIfNeeded(); |
205 | 205 |
206 return timer->timeoutID(); | 206 return timer->timeoutID(); |
207 } | 207 } |
208 | 208 |
209 void ExecutionContext::removeTimeoutByID(int timeoutID) | 209 void ExecutionContext::removeTimeoutByID(int timeoutID) |
210 { | 210 { |
211 if (timeoutID <= 0) | 211 if (timeoutID <= 0) |
212 return; | 212 return; |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 | 328 |
329 RELEASE_ASSERT(m_client); | 329 RELEASE_ASSERT(m_client); |
330 // The SandboxOrigin is stored redundantly in the security origin. | 330 // The SandboxOrigin is stored redundantly in the security origin. |
331 if (isSandboxed(SandboxOrigin) && m_client->securityContext().securityOrigin
() && !m_client->securityContext().securityOrigin()->isUnique()) { | 331 if (isSandboxed(SandboxOrigin) && m_client->securityContext().securityOrigin
() && !m_client->securityContext().securityOrigin()->isUnique()) { |
332 m_client->securityContext().setSecurityOrigin(SecurityOrigin::createUniq
ue()); | 332 m_client->securityContext().setSecurityOrigin(SecurityOrigin::createUniq
ue()); |
333 m_client->didUpdateSecurityOrigin(); | 333 m_client->didUpdateSecurityOrigin(); |
334 } | 334 } |
335 } | 335 } |
336 | 336 |
337 } // namespace WebCore | 337 } // namespace WebCore |
OLD | NEW |