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) 2009, 2011 Google Inc. All Rights Reserved. | 3 * Copyright (C) 2009, 2011 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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 m_terminationObserver->wasRequestedToTerminate(); | 205 m_terminationObserver->wasRequestedToTerminate(); |
206 } | 206 } |
207 | 207 |
208 void WorkerGlobalScope::dispose() | 208 void WorkerGlobalScope::dispose() |
209 { | 209 { |
210 ASSERT(thread()->isCurrentThread()); | 210 ASSERT(thread()->isCurrentThread()); |
211 | 211 |
212 clearScript(); | 212 clearScript(); |
213 clearInspector(); | 213 clearInspector(); |
214 setClient(0); | 214 setClient(0); |
| 215 deleteLifecycleNotifier(); |
215 | 216 |
216 // We do not clear the thread field of the | 217 // We do not clear the thread field of the |
217 // WorkerGlobalScope. Other objects keep the worker global scope | 218 // WorkerGlobalScope. Other objects keep the worker global scope |
218 // alive because they need its thread field to check that work is | 219 // alive because they need its thread field to check that work is |
219 // being carried out on the right thread. We therefore cannot clear | 220 // being carried out on the right thread. We therefore cannot clear |
220 // the thread field before all references to the worker global | 221 // the thread field before all references to the worker global |
221 // scope are gone. | 222 // scope are gone. |
222 } | 223 } |
223 | 224 |
224 void WorkerGlobalScope::importScripts(const Vector<String>& urls, ExceptionState
& exceptionState) | 225 void WorkerGlobalScope::importScripts(const Vector<String>& urls, ExceptionState
& exceptionState) |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 visitor->trace(m_console); | 326 visitor->trace(m_console); |
326 visitor->trace(m_location); | 327 visitor->trace(m_location); |
327 visitor->trace(m_navigator); | 328 visitor->trace(m_navigator); |
328 visitor->trace(m_workerClients); | 329 visitor->trace(m_workerClients); |
329 WillBeHeapSupplementable<WorkerGlobalScope>::trace(visitor); | 330 WillBeHeapSupplementable<WorkerGlobalScope>::trace(visitor); |
330 ExecutionContext::trace(visitor); | 331 ExecutionContext::trace(visitor); |
331 EventTargetWithInlineData::trace(visitor); | 332 EventTargetWithInlineData::trace(visitor); |
332 } | 333 } |
333 | 334 |
334 } // namespace WebCore | 335 } // namespace WebCore |
OLD | NEW |