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

Side by Side Diff: Source/core/workers/WorkerThread.h

Issue 1111693003: Remove the concept of a cleanup task (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Potential shutdown sequence with some debug logging. Created 5 years, 7 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 * 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 28 matching lines...) Expand all
39 #include "wtf/OwnPtr.h" 39 #include "wtf/OwnPtr.h"
40 #include "wtf/PassRefPtr.h" 40 #include "wtf/PassRefPtr.h"
41 #include "wtf/RefCounted.h" 41 #include "wtf/RefCounted.h"
42 #include <v8.h> 42 #include <v8.h>
43 43
44 namespace blink { 44 namespace blink {
45 45
46 class WebWaitableEvent; 46 class WebWaitableEvent;
47 class WorkerGlobalScope; 47 class WorkerGlobalScope;
48 class WorkerInspectorController; 48 class WorkerInspectorController;
49 class WorkerMicrotaskRunner;
49 class WorkerReportingProxy; 50 class WorkerReportingProxy;
50 class WorkerSharedTimer; 51 class WorkerSharedTimer;
51 class WorkerThreadShutdownFinishTask;
52 class WorkerThreadStartupData; 52 class WorkerThreadStartupData;
53 class WorkerThreadTask; 53 class WorkerThreadTask;
54 54
55 enum WorkerThreadStartMode { 55 enum WorkerThreadStartMode {
56 DontPauseWorkerGlobalScopeOnStart, 56 DontPauseWorkerGlobalScopeOnStart,
57 PauseWorkerGlobalScopeOnStart 57 PauseWorkerGlobalScopeOnStart
58 }; 58 };
59 59
60 // TODO(sadrul): Rename to WorkerScript. 60 // TODO(sadrul): Rename to WorkerScript.
61 class CORE_EXPORT WorkerThread : public RefCounted<WorkerThread> { 61 class CORE_EXPORT WorkerThread : public RefCounted<WorkerThread> {
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 123
124 virtual void postInitialize() { } 124 virtual void postInitialize() { }
125 125
126 virtual v8::Isolate* initializeIsolate(); 126 virtual v8::Isolate* initializeIsolate();
127 virtual void willDestroyIsolate(); 127 virtual void willDestroyIsolate();
128 virtual void destroyIsolate(); 128 virtual void destroyIsolate();
129 virtual void terminateV8Execution(); 129 virtual void terminateV8Execution();
130 130
131 private: 131 private:
132 friend class WorkerSharedTimer; 132 friend class WorkerSharedTimer;
133 friend class WorkerThreadShutdownFinishTask; 133 friend class WorkerMicrotaskRunner;
134 134
135 void stopInShutdownSequence(); 135 void stopInShutdownSequence();
136 void stopInternal(); 136 void stopInternal();
137 137
138 void initialize(); 138 void initialize();
139 void cleanup(); 139 void cleanup();
140 void idleHandler(); 140 void idleHandler();
141 void postDelayedTask(PassOwnPtr<ExecutionContextTask>, long long delayMs); 141 void postDelayedTask(PassOwnPtr<ExecutionContextTask>, long long delayMs);
142 void postDelayedTask(const WebTraceLocation&, PassOwnPtr<ExecutionContextTas k>, long long delayMs); 142 void postDelayedTask(const WebTraceLocation&, PassOwnPtr<ExecutionContextTas k>, long long delayMs);
143 143
(...skipping 18 matching lines...) Expand all
162 // Used to signal thread shutdown. 162 // Used to signal thread shutdown.
163 OwnPtr<WebWaitableEvent> m_shutdownEvent; 163 OwnPtr<WebWaitableEvent> m_shutdownEvent;
164 164
165 // Used to signal thread termination. 165 // Used to signal thread termination.
166 OwnPtr<WebWaitableEvent> m_terminationEvent; 166 OwnPtr<WebWaitableEvent> m_terminationEvent;
167 }; 167 };
168 168
169 } // namespace blink 169 } // namespace blink
170 170
171 #endif // WorkerThread_h 171 #endif // WorkerThread_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698