OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010, Google Inc. All rights reserved. | 2 * Copyright (C) 2010, Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 } | 240 } |
241 | 241 |
242 void DeferredTaskHandler::requestToDeleteHandlersOnMainThread() | 242 void DeferredTaskHandler::requestToDeleteHandlersOnMainThread() |
243 { | 243 { |
244 ASSERT(isGraphOwner()); | 244 ASSERT(isGraphOwner()); |
245 ASSERT(isAudioThread()); | 245 ASSERT(isAudioThread()); |
246 if (m_renderingOrphanHandlers.isEmpty()) | 246 if (m_renderingOrphanHandlers.isEmpty()) |
247 return; | 247 return; |
248 m_deletableOrphanHandlers.appendVector(m_renderingOrphanHandlers); | 248 m_deletableOrphanHandlers.appendVector(m_renderingOrphanHandlers); |
249 m_renderingOrphanHandlers.clear(); | 249 m_renderingOrphanHandlers.clear(); |
250 Platform::current()->mainThread()->postTask(FROM_HERE, threadSafeBind(&Defer
redTaskHandler::deleteHandlersOnMainThread, PassRefPtr<DeferredTaskHandler>(this
))); | 250 Platform::current()->mainThread()->taskRunner()->postTask(FROM_HERE, threadS
afeBind(&DeferredTaskHandler::deleteHandlersOnMainThread, PassRefPtr<DeferredTas
kHandler>(this))); |
251 } | 251 } |
252 | 252 |
253 void DeferredTaskHandler::deleteHandlersOnMainThread() | 253 void DeferredTaskHandler::deleteHandlersOnMainThread() |
254 { | 254 { |
255 ASSERT(isMainThread()); | 255 ASSERT(isMainThread()); |
256 AutoLocker locker(*this); | 256 AutoLocker locker(*this); |
257 m_deletableOrphanHandlers.clear(); | 257 m_deletableOrphanHandlers.clear(); |
258 } | 258 } |
259 | 259 |
260 void DeferredTaskHandler::clearHandlersToBeDeleted() | 260 void DeferredTaskHandler::clearHandlersToBeDeleted() |
261 { | 261 { |
262 ASSERT(isMainThread()); | 262 ASSERT(isMainThread()); |
263 AutoLocker locker(*this); | 263 AutoLocker locker(*this); |
264 m_renderingOrphanHandlers.clear(); | 264 m_renderingOrphanHandlers.clear(); |
265 m_deletableOrphanHandlers.clear(); | 265 m_deletableOrphanHandlers.clear(); |
266 } | 266 } |
267 | 267 |
268 } // namespace blink | 268 } // namespace blink |
269 | 269 |
270 #endif // ENABLE(WEB_AUDIO) | 270 #endif // ENABLE(WEB_AUDIO) |
OLD | NEW |