-
yurys@chromium.org authored
https://bugs.webkit.org/show_bug.cgi?id=69635 Source/WebCore: Allow to pause WorkerContext on start. Reviewed by Pavel Feldman. * bindings/v8/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::setPauseOnNextStatement): * bindings/v8/WorkerScriptDebugServer.cpp: (WebCore::WorkerScriptDebugServer::runMessageLoopOnPause): * bindings/v8/WorkerScriptDebugServer.h: * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::willEvaluateWorkerScript): * inspector/InspectorInstrumentation.h: * inspector/InspectorRuntimeAgent.cpp: (WebCore::InspectorRuntimeAgent::InspectorRuntimeAgent): (WebCore::InspectorRuntimeAgent::~InspectorRuntimeAgent): (WebCore::InspectorRuntimeAgent::pauseWorkerContext): this method will start running worker message loop in "debug" mode, i.e. it will process only inspector tasks until method InspectorRuntimeAgent::resume is called. (WebCore::InspectorRuntimeAgent::resume): * inspector/InspectorRuntimeAgent.h: * inspector/WorkerDebuggerAgent.cpp: * inspector/WorkerDebuggerAgent.h: * inspector/WorkerInspectorController.cpp: (WebCore::WorkerInspectorController::WorkerInspectorController): (WebCore::WorkerInspectorController::resume): method which is called from WebKit layer when it is known that inspector state was restored and it is OK to resume worker execution. * inspector/WorkerInspectorController.h: * workers/DedicatedWorkerThread.cpp: (WebCore::DedicatedWorkerThread::create): (WebCore::DedicatedWorkerThread::DedicatedWorkerThread): * workers/DedicatedWorkerThread.h: * workers/SharedWorkerThread.cpp: (WebCore::SharedWorkerThread::create): (WebCore::SharedWorkerThread::SharedWorkerThread): * workers/SharedWorkerThread.h: * workers/WorkerMessagingProxy.cpp: (WebCore::WorkerMessagingProxy::startWorkerContext): (WebCore::WorkerMessagingProxy::disconnectFromInspector): (WebCore::WorkerMessagingProxy::sendMessageToInspector): * workers/WorkerThread.cpp: (WebCore::WorkerThreadStartupData::create): (WebCore::WorkerThreadStartupData::WorkerThreadStartupData): (WebCore::WorkerThread::WorkerThread): WorkerThread is passed a booleand flag indicating whether the context should be paused and wait for explicit resume command before it starts running its script. (WebCore::WorkerThread::workerThread): * workers/WorkerThread.h: Source/WebKit/chromium: Expose methods for pausing shared worker on start. Reviewed by Pavel Feldman. * public/WebSharedWorker.h: (WebKit::WebSharedWorker::pauseWorkerContextOnStart): specifies that the worker context should be paused and weit for explicit call to resumeWorkerContext before running its script. (WebKit::WebSharedWorker::resumeWorkerContext): * src/WebSharedWorkerImpl.cpp: (WebKit::WebSharedWorkerImpl::WebSharedWorkerImpl): (WebKit::WebSharedWorkerImpl::startWorkerContext): (WebKit::WebSharedWorkerImpl::pauseWorkerContextOnStart): (WebKit::resumeWorkerContextTask): (WebKit::WebSharedWorkerImpl::resumeWorkerContext): (WebKit::WebSharedWorkerImpl::attachDevTools): (WebKit::reconnectToWorkerContextInspectorTask): (WebKit::WebSharedWorkerImpl::reattachDevTools): (WebKit::WebSharedWorkerImpl::detachDevTools): (WebKit::WebSharedWorkerImpl::dispatchDevToolsMessage): * src/WebSharedWorkerImpl.h: * src/WebWorkerClientImpl.cpp: (WebKit::WebWorkerClientImpl::startWorkerContext): (WebKit::WebWorkerClientImpl::updateInspectorStateCookie): * src/WebWorkerClientImpl.h: * src/WebWorkerImpl.cpp: (WebKit::WebWorkerImpl::startWorkerContext): (WebKit::WebWorkerImpl::detachDevTools): (WebKit::WebWorkerImpl::dispatchDevToolsMessage): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@97049 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2c79e13b