Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(191)

Side by Side Diff: Source/core/workers/WorkerGlobalScope.cpp

Issue 304353004: Oilpan: Reduce RefPtr to WorkerGlobalScope. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698