| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 { | 44 { |
| 45 } | 45 } |
| 46 | 46 |
| 47 WorkerEventQueue::~WorkerEventQueue() | 47 WorkerEventQueue::~WorkerEventQueue() |
| 48 { | 48 { |
| 49 ASSERT(m_eventTaskMap.isEmpty()); | 49 ASSERT(m_eventTaskMap.isEmpty()); |
| 50 } | 50 } |
| 51 | 51 |
| 52 void WorkerEventQueue::trace(Visitor* visitor) | 52 void WorkerEventQueue::trace(Visitor* visitor) |
| 53 { | 53 { |
| 54 visitor->trace(m_executionContext); |
| 54 visitor->trace(m_eventTaskMap); | 55 visitor->trace(m_eventTaskMap); |
| 56 EventQueue::trace(visitor); |
| 55 } | 57 } |
| 56 | 58 |
| 57 class WorkerEventQueue::EventDispatcherTask : public ExecutionContextTask { | 59 class WorkerEventQueue::EventDispatcherTask : public ExecutionContextTask { |
| 58 public: | 60 public: |
| 59 static PassOwnPtr<EventDispatcherTask> create(PassRefPtrWillBeRawPtr<Event>
event, WorkerEventQueue* eventQueue) | 61 static PassOwnPtr<EventDispatcherTask> create(PassRefPtrWillBeRawPtr<Event>
event, WorkerEventQueue* eventQueue) |
| 60 { | 62 { |
| 61 return adoptPtr(new EventDispatcherTask(event, eventQueue)); | 63 return adoptPtr(new EventDispatcherTask(event, eventQueue)); |
| 62 } | 64 } |
| 63 | 65 |
| 64 virtual ~EventDispatcherTask() | 66 virtual ~EventDispatcherTask() |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 { | 132 { |
| 131 m_isClosed = true; | 133 m_isClosed = true; |
| 132 for (EventTaskMap::iterator it = m_eventTaskMap.begin(); it != m_eventTaskMa
p.end(); ++it) { | 134 for (EventTaskMap::iterator it = m_eventTaskMap.begin(); it != m_eventTaskMa
p.end(); ++it) { |
| 133 EventDispatcherTask* task = it->value; | 135 EventDispatcherTask* task = it->value; |
| 134 task->cancel(); | 136 task->cancel(); |
| 135 } | 137 } |
| 136 m_eventTaskMap.clear(); | 138 m_eventTaskMap.clear(); |
| 137 } | 139 } |
| 138 | 140 |
| 139 } | 141 } |
| OLD | NEW |