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

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

Issue 2054703003: Worker: Remove unnecessary indirection on WorkerThread::postTask() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@avoid_debugger_task
Patch Set: Created 4 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/workers/WorkerThread.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 // use this mode, because after the synchronous termination any V8 APIs 150 // use this mode, because after the synchronous termination any V8 APIs
151 // may suddenly start to return empty handles and it may cause crashes. 151 // may suddenly start to return empty handles and it may cause crashes.
152 Forcible, 152 Forcible,
153 153
154 // Don't synchronously terminate the worker execution. Instead, schedule 154 // Don't synchronously terminate the worker execution. Instead, schedule
155 // a task to terminate it in case that the shutdown sequence does not 155 // a task to terminate it in case that the shutdown sequence does not
156 // start on the worker thread in a certain time period. 156 // start on the worker thread in a certain time period.
157 Graceful, 157 Graceful,
158 }; 158 };
159 159
160 std::unique_ptr<CrossThreadClosure> createWorkerThreadTask(std::unique_ptr<E xecutionContextTask>, bool isInstrumented);
161
162 void terminateInternal(TerminationMode); 160 void terminateInternal(TerminationMode);
163 void forciblyTerminateExecution(); 161 void forciblyTerminateExecution();
164 162
165 void initializeOnWorkerThread(PassOwnPtr<WorkerThreadStartupData>); 163 void initializeOnWorkerThread(PassOwnPtr<WorkerThreadStartupData>);
166 void prepareForShutdownOnWorkerThread(); 164 void prepareForShutdownOnWorkerThread();
167 void performShutdownOnWorkerThread(); 165 void performShutdownOnWorkerThread();
168 void performTaskOnWorkerThread(std::unique_ptr<ExecutionContextTask>, bool i sInstrumented); 166 void performTaskOnWorkerThread(std::unique_ptr<ExecutionContextTask>, bool i sInstrumented);
169 void performDebuggerTaskOnWorkerThread(std::unique_ptr<CrossThreadClosure>); 167 void performDebuggerTaskOnWorkerThread(std::unique_ptr<CrossThreadClosure>);
170 void performDebuggerTaskDontWaitOnWorkerThread(); 168 void performDebuggerTaskDontWaitOnWorkerThread();
171 169
(...skipping 28 matching lines...) Expand all
200 OwnPtr<WaitableEvent> m_shutdownEvent; 198 OwnPtr<WaitableEvent> m_shutdownEvent;
201 199
202 // Scheduled when termination starts with TerminationMode::Force, and 200 // Scheduled when termination starts with TerminationMode::Force, and
203 // cancelled when the worker thread is gracefully shut down. 201 // cancelled when the worker thread is gracefully shut down.
204 OwnPtr<ForceTerminationTask> m_scheduledForceTerminationTask; 202 OwnPtr<ForceTerminationTask> m_scheduledForceTerminationTask;
205 }; 203 };
206 204
207 } // namespace blink 205 } // namespace blink
208 206
209 #endif // WorkerThread_h 207 #endif // WorkerThread_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/workers/WorkerThread.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698