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

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

Issue 307943002: Oilpan: Prepare moving InspectorController and InspectorAgents to oilpan. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 12 matching lines...) Expand all
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 * 24 *
25 */ 25 */
26 26
27 #include "config.h" 27 #include "config.h"
28 28
29 #include "core/workers/WorkerThread.h" 29 #include "core/workers/WorkerThread.h"
30 30
31 #include "bindings/core/v8/ScriptSourceCode.h" 31 #include "bindings/core/v8/ScriptSourceCode.h"
32 #include "core/inspector/InspectorInstrumentation.h" 32 #include "core/inspector/InspectorInstrumentation.h"
33 #include "core/inspector/WorkerInspectorController.h"
33 #include "core/workers/DedicatedWorkerGlobalScope.h" 34 #include "core/workers/DedicatedWorkerGlobalScope.h"
34 #include "core/workers/WorkerClients.h" 35 #include "core/workers/WorkerClients.h"
35 #include "core/workers/WorkerReportingProxy.h" 36 #include "core/workers/WorkerReportingProxy.h"
36 #include "core/workers/WorkerThreadStartupData.h" 37 #include "core/workers/WorkerThreadStartupData.h"
37 #include "platform/PlatformThreadData.h" 38 #include "platform/PlatformThreadData.h"
38 #include "platform/heap/ThreadState.h" 39 #include "platform/heap/ThreadState.h"
39 #include "platform/weborigin/KURL.h" 40 #include "platform/weborigin/KURL.h"
40 #include "public/platform/Platform.h" 41 #include "public/platform/Platform.h"
41 #include "public/platform/WebWaitableEvent.h" 42 #include "public/platform/WebWaitableEvent.h"
42 #include "public/platform/WebWorkerRunLoop.h" 43 #include "public/platform/WebWorkerRunLoop.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 m_threadID = createThread(WorkerThread::workerThreadStart, this, "WebCore: W orker"); 95 m_threadID = createThread(WorkerThread::workerThreadStart, this, "WebCore: W orker");
95 96
96 return m_threadID; 97 return m_threadID;
97 } 98 }
98 99
99 void WorkerThread::workerThreadStart(void* thread) 100 void WorkerThread::workerThreadStart(void* thread)
100 { 101 {
101 static_cast<WorkerThread*>(thread)->workerThread(); 102 static_cast<WorkerThread*>(thread)->workerThread();
102 } 103 }
103 104
105 void WorkerThread::interruptAndDispatchInspectorCommands()
106 {
107 MutexLocker locker(m_workerInspectorControllerMutex);
108 if (m_workerInspectorController)
109 m_workerInspectorController->interruptAndDispatchInspectorCommands();
110 }
111
104 void WorkerThread::workerThread() 112 void WorkerThread::workerThread()
105 { 113 {
106 KURL scriptURL = m_startupData->m_scriptURL; 114 KURL scriptURL = m_startupData->m_scriptURL;
107 String sourceCode = m_startupData->m_sourceCode; 115 String sourceCode = m_startupData->m_sourceCode;
108 WorkerThreadStartMode startMode = m_startupData->m_startMode; 116 WorkerThreadStartMode startMode = m_startupData->m_startMode;
109 117
110 { 118 {
111 MutexLocker lock(m_threadCreationMutex); 119 MutexLocker lock(m_threadCreationMutex);
112 ThreadState::attach(); 120 ThreadState::attach();
113 m_workerGlobalScope = createWorkerGlobalScope(m_startupData.release()); 121 m_workerGlobalScope = createWorkerGlobalScope(m_startupData.release());
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 void WorkerThread::postDebuggerTask(PassOwnPtr<ExecutionContextTask> task) 261 void WorkerThread::postDebuggerTask(PassOwnPtr<ExecutionContextTask> task)
254 { 262 {
255 m_runLoop.postDebuggerTask(task); 263 m_runLoop.postDebuggerTask(task);
256 } 264 }
257 265
258 MessageQueueWaitResult WorkerThread::runDebuggerTask(WorkerRunLoop::WaitMode wai tMode) 266 MessageQueueWaitResult WorkerThread::runDebuggerTask(WorkerRunLoop::WaitMode wai tMode)
259 { 267 {
260 return m_runLoop.runDebuggerTask(waitMode); 268 return m_runLoop.runDebuggerTask(waitMode);
261 } 269 }
262 270
271 void WorkerThread::setWorkerInspectorController(WorkerInspectorController* worke rInspectorController)
272 {
273 MutexLocker locker(m_workerInspectorControllerMutex);
274 m_workerInspectorController = workerInspectorController;
275 }
276
263 } // namespace blink 277 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/workers/WorkerThread.h ('k') | Source/modules/device_orientation/DeviceOrientationInspectorAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698