From 1f3cc2bcc581af8b334a05c69b8aff6a78b83d5b Mon Sep 17 00:00:00 2001 From: "yurys@chromium.org" Date: Mon, 20 Feb 2012 07:51:27 +0000 Subject: [PATCH] [Chromium] Web Inspector: terminated workers are not removed from dedicated worker list https://bugs.webkit.org/show_bug.cgi?id=78899 Source/WebCore: Notify inspector about starting context from WorkerContextProxy not from Worker. Reviewed by Pavel Feldman. * workers/Worker.cpp: (WebCore::Worker::notifyFinished): * workers/WorkerMessagingProxy.cpp: (WebCore::WorkerMessagingProxy::startWorkerContext): Source/WebKit/chromium: Pass original WorkerContextProxy object to the inspector instrumentation instead of Chromium-specific one for consistency with WorkerMessagingProxy implementation in WebCore. Reviewed by Pavel Feldman. * src/WebWorkerClientImpl.cpp: (WebKit::WebWorkerClientImpl::startWorkerContext): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108212 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- Source/WebCore/ChangeLog | 14 ++++++++++++++ Source/WebCore/workers/Worker.cpp | 1 - Source/WebCore/workers/WorkerMessagingProxy.cpp | 1 + Source/WebKit/chromium/ChangeLog | 14 ++++++++++++++ Source/WebKit/chromium/src/WebWorkerClientImpl.cpp | 2 ++ 5 files changed, 31 insertions(+), 1 deletion(-) diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index d6ea03c..6df82b7 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,17 @@ +2012-02-17 Yury Semikhatsky + + [Chromium] Web Inspector: terminated workers are not removed from dedicated worker list + https://bugs.webkit.org/show_bug.cgi?id=78899 + + Notify inspector about starting context from WorkerContextProxy not from Worker. + + Reviewed by Pavel Feldman. + + * workers/Worker.cpp: + (WebCore::Worker::notifyFinished): + * workers/WorkerMessagingProxy.cpp: + (WebCore::WorkerMessagingProxy::startWorkerContext): + 2012-02-19 Keishi Hattori Use shadowRootList for ColorInputType diff --git a/Source/WebCore/workers/Worker.cpp b/Source/WebCore/workers/Worker.cpp index 2f5e4f6..ec965a4 100644 --- a/Source/WebCore/workers/Worker.cpp +++ b/Source/WebCore/workers/Worker.cpp @@ -150,7 +150,6 @@ void Worker::notifyFinished() if (InspectorInstrumentation::shouldPauseDedicatedWorkerOnStart(scriptExecutionContext())) startMode = PauseWorkerContextOnStart; m_contextProxy->startWorkerContext(m_scriptLoader->url(), scriptExecutionContext()->userAgent(m_scriptLoader->url()), m_scriptLoader->script(), startMode); - InspectorInstrumentation::didStartWorkerContext(scriptExecutionContext(), m_contextProxy, m_scriptLoader->url()); InspectorInstrumentation::scriptImported(scriptExecutionContext(), m_scriptLoader->identifier(), m_scriptLoader->script()); } m_scriptLoader = nullptr; diff --git a/Source/WebCore/workers/WorkerMessagingProxy.cpp b/Source/WebCore/workers/WorkerMessagingProxy.cpp index 6cbdbe9..8c446cd 100644 --- a/Source/WebCore/workers/WorkerMessagingProxy.cpp +++ b/Source/WebCore/workers/WorkerMessagingProxy.cpp @@ -276,6 +276,7 @@ void WorkerMessagingProxy::startWorkerContext(const KURL& scriptURL, const Strin m_scriptExecutionContext->contentSecurityPolicy()->headerType()); workerThreadCreated(thread); thread->start(); + InspectorInstrumentation::didStartWorkerContext(m_scriptExecutionContext.get(), this, scriptURL); } void WorkerMessagingProxy::postMessageToWorkerObject(PassRefPtr message, PassOwnPtr channels) diff --git a/Source/WebKit/chromium/ChangeLog b/Source/WebKit/chromium/ChangeLog index cccbfce..a2606cb 100644 --- a/Source/WebKit/chromium/ChangeLog +++ b/Source/WebKit/chromium/ChangeLog @@ -1,3 +1,17 @@ +2012-02-17 Yury Semikhatsky + + [Chromium] Web Inspector: terminated workers are not removed from dedicated worker list + https://bugs.webkit.org/show_bug.cgi?id=78899 + + Pass original WorkerContextProxy object to the inspector instrumentation instead + of Chromium-specific one for consistency with WorkerMessagingProxy implementation + in WebCore. + + Reviewed by Pavel Feldman. + + * src/WebWorkerClientImpl.cpp: + (WebKit::WebWorkerClientImpl::startWorkerContext): + 2012-02-18 raman Tenneti Track the NPN protocol version negotiated with the server diff --git a/Source/WebKit/chromium/src/WebWorkerClientImpl.cpp b/Source/WebKit/chromium/src/WebWorkerClientImpl.cpp index 796ab16..1db2d1d 100644 --- a/Source/WebKit/chromium/src/WebWorkerClientImpl.cpp +++ b/Source/WebKit/chromium/src/WebWorkerClientImpl.cpp @@ -39,6 +39,7 @@ #include "ErrorEvent.h" #include "Frame.h" #include "FrameLoaderClient.h" +#include "InspectorInstrumentation.h" #include "MessageEvent.h" #include "MessagePort.h" #include "MessagePortChannel.h" @@ -90,6 +91,7 @@ void WebWorkerClientImpl::startWorkerContext(const KURL& scriptURL, const String m_scriptExecutionContext->contentSecurityPolicy()->headerType()); m_proxy->workerThreadCreated(thread); thread->start(); + InspectorInstrumentation::didStartWorkerContext(m_scriptExecutionContext.get(), m_proxy, scriptURL); } void WebWorkerClientImpl::terminateWorkerContext() -- 2.7.4