[Chromium] Web Inspector: terminated workers are not removed from dedicated worker...
authoryurys@chromium.org <yurys@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 20 Feb 2012 07:51:27 +0000 (07:51 +0000)
committeryurys@chromium.org <yurys@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 20 Feb 2012 07:51:27 +0000 (07:51 +0000)
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
Source/WebCore/workers/Worker.cpp
Source/WebCore/workers/WorkerMessagingProxy.cpp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/WebWorkerClientImpl.cpp

index d6ea03c..6df82b7 100644 (file)
@@ -1,3 +1,17 @@
+2012-02-17  Yury Semikhatsky  <yurys@chromium.org>
+
+        [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  <keishi@webkit.org>
 
         Use shadowRootList for ColorInputType
index 2f5e4f6..ec965a4 100644 (file)
@@ -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;
index 6cbdbe9..8c446cd 100644 (file)
@@ -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<SerializedScriptValue> message, PassOwnPtr<MessagePortChannelArray> channels)
index cccbfce..a2606cb 100644 (file)
@@ -1,3 +1,17 @@
+2012-02-17  Yury Semikhatsky  <yurys@chromium.org>
+
+        [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  <rtenneti@chromium.org>
 
         Track the NPN protocol version negotiated with the server
index 796ab16..1db2d1d 100644 (file)
@@ -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()