Web Inspector: Remove Network.initialContentSet from protocol, store workers content...
authorvsevik@chromium.org <vsevik@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 10 Aug 2011 18:45:25 +0000 (18:45 +0000)
committervsevik@chromium.org <vsevik@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 10 Aug 2011 18:45:25 +0000 (18:45 +0000)
https://bugs.webkit.org/show_bug.cgi?id=65929

Reviewed by Pavel Feldman.

Source/WebCore:

Tests: http/tests/inspector/network/network-shared-worker.html
       http/tests/inspector/network/network-worker.html

* inspector/Inspector.json:
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didReceiveScriptResponseImpl):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::didReceiveScriptResponse):
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::didReceiveResponse):
(WebCore::InspectorResourceAgent::setInitialScriptContent):
(WebCore::InspectorResourceAgent::didReceiveScriptResponse):
* inspector/InspectorResourceAgent.h:
* inspector/front-end/NetworkManager.js:
* inspector/front-end/Resource.js:
* workers/DefaultSharedWorkerRepository.cpp:
(WebCore::SharedWorkerScriptLoader::didReceiveResponse):
* workers/Worker.cpp:
(WebCore::Worker::didReceiveResponse):
* workers/Worker.h:
* workers/WorkerScriptLoader.cpp:
(WebCore::WorkerScriptLoader::didReceiveResponse):
* workers/WorkerScriptLoaderClient.h:
(WebCore::WorkerScriptLoaderClient::didReceiveResponse):

Source/WebKit/chromium:

* src/SharedWorkerRepository.cpp:
(WebCore::SharedWorkerScriptLoader::didReceiveResponse):

LayoutTests:

* http/tests/inspector/network/network-shared-worker-expected.txt: Added.
* http/tests/inspector/network/network-shared-worker.html: Added.
* http/tests/inspector/network/network-worker-expected.txt: Added.
* http/tests/inspector/network/network-worker.html: Added.
* http/tests/inspector/network/resources/shared-worker.js: Added.
(onconnect):
* http/tests/inspector/network/resources/worker.js: Added.
* platform/chromium/test_expectations.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@92781 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 files changed:
LayoutTests/ChangeLog
LayoutTests/http/tests/inspector/network/network-shared-worker-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/inspector/network/network-shared-worker.html [new file with mode: 0644]
LayoutTests/http/tests/inspector/network/network-worker-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/inspector/network/network-worker.html [new file with mode: 0644]
LayoutTests/http/tests/inspector/network/resources/shared-worker.js [new file with mode: 0644]
LayoutTests/http/tests/inspector/network/resources/worker.js [new file with mode: 0644]
LayoutTests/platform/chromium/test_expectations.txt
Source/WebCore/ChangeLog
Source/WebCore/inspector/Inspector.json
Source/WebCore/inspector/InspectorInstrumentation.cpp
Source/WebCore/inspector/InspectorInstrumentation.h
Source/WebCore/inspector/InspectorResourceAgent.cpp
Source/WebCore/inspector/InspectorResourceAgent.h
Source/WebCore/inspector/front-end/NetworkManager.js
Source/WebCore/inspector/front-end/Resource.js
Source/WebCore/workers/DefaultSharedWorkerRepository.cpp
Source/WebCore/workers/Worker.cpp
Source/WebCore/workers/Worker.h
Source/WebCore/workers/WorkerScriptLoader.cpp
Source/WebCore/workers/WorkerScriptLoaderClient.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/SharedWorkerRepository.cpp

index df4a2cd..05fb01f 100644 (file)
@@ -1,5 +1,21 @@
 2011-08-10  Vsevolod Vlasov  <vsevik@chromium.org>
 
+        Web Inspector: Remove Network.initialContentSet from protocol, store workers content on backend.
+        https://bugs.webkit.org/show_bug.cgi?id=65929
+
+        Reviewed by Pavel Feldman.
+
+        * http/tests/inspector/network/network-shared-worker-expected.txt: Added.
+        * http/tests/inspector/network/network-shared-worker.html: Added.
+        * http/tests/inspector/network/network-worker-expected.txt: Added.
+        * http/tests/inspector/network/network-worker.html: Added.
+        * http/tests/inspector/network/resources/shared-worker.js: Added.
+        (onconnect):
+        * http/tests/inspector/network/resources/worker.js: Added.
+        * platform/chromium/test_expectations.txt:
+
+2011-08-10  Vsevolod Vlasov  <vsevik@chromium.org>
+
         Web Inspector: console messages markers are lost in Resources panel after page reload
         https://bugs.webkit.org/show_bug.cgi?id=60701
 
diff --git a/LayoutTests/http/tests/inspector/network/network-shared-worker-expected.txt b/LayoutTests/http/tests/inspector/network/network-shared-worker-expected.txt
new file mode 100644 (file)
index 0000000..db657b4
--- /dev/null
@@ -0,0 +1,15 @@
+CONSOLE MESSAGE: line 14: Done.
+Tests that shared worker content is available in network panel.
+
+Bug 65929
+http://127.0.0.1:8000/inspector/network/resources/shared-worker.js
+resource.type: 4
+resource.content before requesting content: undefined
+resource.content after requesting content: onconnect = function(event)
+{
+    var port = event.ports[0];
+    port.postMessage("Done.");
+}
+
+
+
diff --git a/LayoutTests/http/tests/inspector/network/network-shared-worker.html b/LayoutTests/http/tests/inspector/network/network-shared-worker.html
new file mode 100644 (file)
index 0000000..7687c30
--- /dev/null
@@ -0,0 +1,52 @@
+<html>
+<head>
+<script src="../inspector-test.js"></script>
+<script src="../network-test.js"></script>
+<script>
+function loadData()
+{
+    var worker = new SharedWorker("resources/shared-worker.js");
+    worker.port.onmessage = workerLoaded;
+}
+
+function workerLoaded(event)
+{
+    console.log(event.data);
+}
+
+function test()
+{
+    // Since this test could be run together with other inspector backend cache
+    // tests, we need to reset size limits to default ones.
+    InspectorTest.resetInspectorResourcesData(step1);
+
+    function step1()
+    {
+        InspectorTest.addSniffer(WebInspector.ConsoleView.prototype, "addMessage", step2);
+        InspectorTest.evaluateInPage("loadData()");
+    }
+
+    function step2()
+    {
+        var resource1 = WebInspector.panels.network.resources[WebInspector.panels.network.resources.length - 1];
+        InspectorTest.addResult(resource1.url);
+        InspectorTest.addResult("resource.type: " + resource1.type);
+        InspectorTest.addResult("resource.content before requesting content: " + resource1.content);
+        resource1.requestContent(step3);
+    }
+
+    function step3()
+    {
+        var resource1 = WebInspector.panels.network.resources[WebInspector.panels.network.resources.length - 1];
+        InspectorTest.addResult("resource.content after requesting content: " + resource1.content);
+
+        InspectorTest.completeTest();
+    }
+}
+</script>
+</head>
+<body onload="runTest()">
+<p>Tests that shared worker content is available in network panel.</p>
+<a href="https://bugs.webkit.org/show_bug.cgi?id=65929">Bug 65929</a>
+</body>
+</html>
diff --git a/LayoutTests/http/tests/inspector/network/network-worker-expected.txt b/LayoutTests/http/tests/inspector/network/network-worker-expected.txt
new file mode 100644 (file)
index 0000000..d3dc92d
--- /dev/null
@@ -0,0 +1,10 @@
+CONSOLE MESSAGE: line 14: Done.
+Tests that worker content is available in network panel.
+
+Bug 65929
+http://127.0.0.1:8000/inspector/network/resources/worker.js
+resource.type: 4
+resource.content before requesting content: undefined
+resource.content after requesting content: postMessage("Done.");
+
+
diff --git a/LayoutTests/http/tests/inspector/network/network-worker.html b/LayoutTests/http/tests/inspector/network/network-worker.html
new file mode 100644 (file)
index 0000000..cf4c175
--- /dev/null
@@ -0,0 +1,52 @@
+<html>
+<head>
+<script src="../inspector-test.js"></script>
+<script src="../network-test.js"></script>
+<script>
+function loadData()
+{
+    var worker = new Worker("resources/worker.js");
+    worker.onmessage = workerLoaded;
+}
+
+function workerLoaded(event)
+{
+    console.log(event.data);
+}
+
+function test()
+{
+    // Since this test could be run together with other inspector backend cache
+    // tests, we need to reset size limits to default ones.
+    InspectorTest.resetInspectorResourcesData(step1);
+
+    function step1()
+    {
+        InspectorTest.addSniffer(WebInspector.ConsoleView.prototype, "addMessage", step2);
+        InspectorTest.evaluateInPage("loadData()");
+    }
+
+    function step2()
+    {
+        var resource1 = WebInspector.panels.network.resources[WebInspector.panels.network.resources.length - 1];
+        InspectorTest.addResult(resource1.url);
+        InspectorTest.addResult("resource.type: " + resource1.type);
+        InspectorTest.addResult("resource.content before requesting content: " + resource1.content);
+        resource1.requestContent(step3);
+    }
+
+    function step3()
+    {
+        var resource1 = WebInspector.panels.network.resources[WebInspector.panels.network.resources.length - 1];
+        InspectorTest.addResult("resource.content after requesting content: " + resource1.content);
+
+        InspectorTest.completeTest();
+    }
+}
+</script>
+</head>
+<body onload="runTest()">
+<p>Tests that worker content is available in network panel.</p>
+<a href="https://bugs.webkit.org/show_bug.cgi?id=65929">Bug 65929</a>
+</body>
+</html>
diff --git a/LayoutTests/http/tests/inspector/network/resources/shared-worker.js b/LayoutTests/http/tests/inspector/network/resources/shared-worker.js
new file mode 100644 (file)
index 0000000..32d3e02
--- /dev/null
@@ -0,0 +1,6 @@
+onconnect = function(event)
+{
+    var port = event.ports[0];
+    port.postMessage("Done.");
+}
+
diff --git a/LayoutTests/http/tests/inspector/network/resources/worker.js b/LayoutTests/http/tests/inspector/network/resources/worker.js
new file mode 100644 (file)
index 0000000..8f61ca0
--- /dev/null
@@ -0,0 +1 @@
+postMessage("Done.");
index 9599506..4fd1ff2 100644 (file)
@@ -110,6 +110,8 @@ WONTFIX SKIP : http/tests/eventsource/workers = PASS TIMEOUT FAIL
 WONTFIX SKIP : http/tests/websocket/tests/hixie76/workers/ = PASS TIMEOUT FAIL
 WONTFIX SKIP : http/tests/websocket/tests/hybi/workers/ = PASS TIMEOUT FAIL
 WONTFIX SKIP : inspector/debugger/script-formatter.html = PASS TIMEOUT FAIL
+WONTFIX SKIP : http/tests/inspector/network/network-shared-worker.html = PASS TIMEOUT FAIL
+WONTFIX SKIP : http/tests/inspector/network/network-worker.html = PASS TIMEOUT FAIL
 
 // Page Cache - based tests. Chromium disables page cache because the WebKit page cache keeps previously
 // loaded pages alive in memory to be able to quickly substitute them when user clicks History buttons.
index 0a3387a..349ac42 100644 (file)
@@ -1,5 +1,37 @@
 2011-08-10  Vsevolod Vlasov  <vsevik@chromium.org>
 
+        Web Inspector: Remove Network.initialContentSet from protocol, store workers content on backend.
+        https://bugs.webkit.org/show_bug.cgi?id=65929
+
+        Reviewed by Pavel Feldman.
+
+        Tests: http/tests/inspector/network/network-shared-worker.html
+               http/tests/inspector/network/network-worker.html
+
+        * inspector/Inspector.json:
+        * inspector/InspectorInstrumentation.cpp:
+        (WebCore::InspectorInstrumentation::didReceiveScriptResponseImpl):
+        * inspector/InspectorInstrumentation.h:
+        (WebCore::InspectorInstrumentation::didReceiveScriptResponse):
+        * inspector/InspectorResourceAgent.cpp:
+        (WebCore::InspectorResourceAgent::didReceiveResponse):
+        (WebCore::InspectorResourceAgent::setInitialScriptContent):
+        (WebCore::InspectorResourceAgent::didReceiveScriptResponse):
+        * inspector/InspectorResourceAgent.h:
+        * inspector/front-end/NetworkManager.js:
+        * inspector/front-end/Resource.js:
+        * workers/DefaultSharedWorkerRepository.cpp:
+        (WebCore::SharedWorkerScriptLoader::didReceiveResponse):
+        * workers/Worker.cpp:
+        (WebCore::Worker::didReceiveResponse):
+        * workers/Worker.h:
+        * workers/WorkerScriptLoader.cpp:
+        (WebCore::WorkerScriptLoader::didReceiveResponse):
+        * workers/WorkerScriptLoaderClient.h:
+        (WebCore::WorkerScriptLoaderClient::didReceiveResponse):
+
+2011-08-10  Vsevolod Vlasov  <vsevik@chromium.org>
+
         Web Inspector: [Network] Filtering by stylesheet does not update the # reqs, filesizes.
         https://bugs.webkit.org/show_bug.cgi?id=65515
 
index 3d018b6..dacabca 100644 (file)
                 ]
             },
             {
-                "name": "initialContentSet",
-                "description": "Fired for worker scripts when their content becomes available.",
-                "parameters": [
-                    { "name": "identifier", "type": "string", "description": "Request identifier." },
-                    { "name": "content", "type": "string", "description": "Resource content." },
-                    { "name": "type", "$ref": "Page.ResourceType", "description": "Resource type." }
-                ]
-            },
-            {
                 "name": "webSocketWillSendHandshakeRequest",
                 "description": "Fired when WebSocket is about to initiate handshake.",
                 "parameters": [
index 8b18f0b..0e1a1f5 100644 (file)
@@ -557,6 +557,12 @@ void InspectorInstrumentation::scriptImportedImpl(InstrumentingAgents* instrumen
         resourceAgent->setInitialScriptContent(identifier, sourceString);
 }
 
+void InspectorInstrumentation::didReceiveScriptResponseImpl(InstrumentingAgents* instrumentingAgents, unsigned long identifier)
+{
+    if (InspectorResourceAgent* resourceAgent = instrumentingAgents->inspectorResourceAgent())
+        resourceAgent->didReceiveScriptResponse(identifier);
+}
+
 void InspectorInstrumentation::domContentLoadedEventFiredImpl(InstrumentingAgents* instrumentingAgents, Frame* frame, const KURL& url)
 {
     DocumentLoader* documentLoader = frame->loader()->documentLoader();
index 3ad187a..49a38fb 100644 (file)
@@ -134,6 +134,7 @@ public:
     static void willLoadXHRSynchronously(ScriptExecutionContext*);
     static void didLoadXHRSynchronously(ScriptExecutionContext*);
     static void scriptImported(ScriptExecutionContext*, unsigned long identifier, const String& sourceString);
+    static void didReceiveScriptResponse(ScriptExecutionContext*, unsigned long identifier);
     static void domContentLoadedEventFired(Frame*, const KURL&);
     static void loadEventFired(Frame*, const KURL&);
     static void frameDetachedFromParent(Frame*);
@@ -262,6 +263,7 @@ private:
     static void willLoadXHRSynchronouslyImpl(InstrumentingAgents*);
     static void didLoadXHRSynchronouslyImpl(InstrumentingAgents*);
     static void scriptImportedImpl(InstrumentingAgents*, unsigned long identifier, const String& sourceString);
+    static void didReceiveScriptResponseImpl(InstrumentingAgents*, unsigned long identifier);
     static void domContentLoadedEventFiredImpl(InstrumentingAgents*, Frame*, const KURL&);
     static void loadEventFiredImpl(InstrumentingAgents*, Frame*, const KURL&);
     static void frameDetachedFromParentImpl(InstrumentingAgents*, Frame*);
@@ -836,6 +838,14 @@ inline void InspectorInstrumentation::scriptImported(ScriptExecutionContext* con
 #endif
 }
 
+inline void InspectorInstrumentation::didReceiveScriptResponse(ScriptExecutionContext* context, unsigned long identifier)
+{
+#if ENABLE(INSPECTOR)
+    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(context))
+        didReceiveScriptResponseImpl(instrumentingAgents, identifier);
+#endif
+}
+
 inline void InspectorInstrumentation::domContentLoadedEventFired(Frame* frame, const KURL& url)
 {
 #if ENABLE(INSPECTOR)
index ea3cef9..1ae7ad4 100644 (file)
@@ -265,6 +265,8 @@ void InspectorResourceAgent::didReceiveResponse(unsigned long identifier, Docume
             type = InspectorPageAgent::DocumentResource;
         else if (m_loadingXHRSynchronously || m_resourcesData->resourceType(resourceId) == InspectorPageAgent::XHRResource)
             type = InspectorPageAgent::XHRResource;
+        else if (m_resourcesData->resourceType(resourceId) == InspectorPageAgent::ScriptResource)
+            type = InspectorPageAgent::ScriptResource;
 
         m_resourcesData->responseReceived(resourceId, m_pageAgent->frameId(loader->frame()), response);
     }
@@ -323,7 +325,12 @@ void InspectorResourceAgent::didLoadResourceFromMemoryCache(DocumentLoader* load
 
 void InspectorResourceAgent::setInitialScriptContent(unsigned long identifier, const String& sourceString)
 {
-    m_frontend->initialContentSet(IdentifiersFactory::resourceId(identifier), sourceString, InspectorPageAgent::resourceTypeString(InspectorPageAgent::ScriptResource));
+    m_resourcesData->setResourceContent(IdentifiersFactory::resourceId(identifier), sourceString);
+}
+
+void InspectorResourceAgent::didReceiveScriptResponse(unsigned long identifier)
+{
+    m_resourcesData->setResourceType(IdentifiersFactory::resourceId(identifier), InspectorPageAgent::ScriptResource);
 }
 
 void InspectorResourceAgent::setInitialXHRContent(unsigned long identifier, const String& sourceString)
index 12c5506..8c06ee0 100644 (file)
@@ -97,6 +97,7 @@ public:
     void didLoadResourceFromMemoryCache(DocumentLoader*, CachedResource*);
     void mainFrameNavigated(DocumentLoader*);
     void setInitialScriptContent(unsigned long identifier, const String& sourceString);
+    void didReceiveScriptResponse(unsigned long identifier);
     void setInitialXHRContent(unsigned long identifier, const String& sourceString);
     void didReceiveXHRResponse(unsigned long identifier);
     void willLoadXHRSynchronously();
index 4a889d3..f0aafcb 100644 (file)
@@ -223,17 +223,6 @@ WebInspector.NetworkDispatcher.prototype = {
         this._finishResource(resource, time);
     },
 
-    initialContentSet: function(identifier, sourceString, type)
-    {
-        var resource = WebInspector.networkResourceById(identifier);
-        if (!resource)
-            return;
-
-        resource.type = WebInspector.Resource.Type[type];
-        resource.setInitialContent(sourceString);
-        this._updateResource(resource);
-    },
-
     webSocketCreated: function(identifier, requestURL)
     {
         var resource = this._createResource(identifier, null, null, requestURL);
index 7913805..cf84396 100644 (file)
@@ -802,11 +802,6 @@ WebInspector.Resource.prototype = {
         return this._contentTimestamp;
     },
 
-    setInitialContent: function(content)
-    {
-        this._content = content;
-    },
-
     isEditable: function()
     {
         if (this._actualResource)
index 23da9ff..e5fd859 100644 (file)
@@ -265,7 +265,8 @@ public:
     void load(const KURL&);
 
 private:
-    // WorkerScriptLoaderClient callback
+    // WorkerScriptLoaderClient callbacks
+    virtual void didReceiveResponse(unsigned long identifier, const ResourceResponse&);
     virtual void notifyFinished();
 
     RefPtr<SharedWorker> m_worker;
@@ -295,6 +296,11 @@ void SharedWorkerScriptLoader::load(const KURL& url)
     m_scriptLoader->loadAsynchronously(m_worker->scriptExecutionContext(), url, DenyCrossOriginRequests, this);
 }
 
+void SharedWorkerScriptLoader::didReceiveResponse(unsigned long identifier, const ResourceResponse&)
+{
+    InspectorInstrumentation::didReceiveScriptResponse(m_worker->scriptExecutionContext(), identifier);
+}
+
 void SharedWorkerScriptLoader::notifyFinished()
 {
     // FIXME: This method is not guaranteed to be invoked if we are loading from WorkerContext (see comment for WorkerScriptLoaderClient::notifyFinished()).
index 237b610..6b759e0 100644 (file)
@@ -129,6 +129,11 @@ bool Worker::hasPendingActivity() const
     return m_contextProxy->hasPendingActivity() || ActiveDOMObject::hasPendingActivity();
 }
 
+void Worker::didReceiveResponse(unsigned long identifier, const ResourceResponse&)
+{
+    InspectorInstrumentation::didReceiveScriptResponse(scriptExecutionContext(), identifier);
+}
+
 void Worker::notifyFinished()
 {
     if (m_scriptLoader->failed())
index 8e4ec3a..a0c7010 100644 (file)
@@ -72,6 +72,8 @@ namespace WebCore {
     private:
         Worker(ScriptExecutionContext*);
 
+        // WorkerScriptLoaderClient callbacks
+        virtual void didReceiveResponse(unsigned long identifier, const ResourceResponse&);
         virtual void notifyFinished();
 
         virtual void refEventTarget() { ref(); }
index 0c3d4db..244c2f9 100644 (file)
@@ -115,7 +115,7 @@ PassOwnPtr<ResourceRequest> WorkerScriptLoader::createResourceRequest()
     return request.release();
 }
     
-void WorkerScriptLoader::didReceiveResponse(unsigned long /*identifier*/, const ResourceResponse& response)
+void WorkerScriptLoader::didReceiveResponse(unsigned long identifier, const ResourceResponse& response)
 {
     if (response.httpStatusCode() / 100 != 2 && response.httpStatusCode()) {
         m_failed = true;
@@ -124,7 +124,7 @@ void WorkerScriptLoader::didReceiveResponse(unsigned long /*identifier*/, const
     m_responseURL = response.url();
     m_responseEncoding = response.textEncodingName();
     if (m_client)
-        m_client->didReceiveResponse(response);
+        m_client->didReceiveResponse(identifier, response);
 }
 
 void WorkerScriptLoader::didReceiveData(const char* data, int len)
index 2f4569e..371f9b7 100644 (file)
@@ -36,7 +36,7 @@ namespace WebCore {
 
     class WorkerScriptLoaderClient {
     public:
-        virtual void didReceiveResponse(const ResourceResponse&) { }
+        virtual void didReceiveResponse(unsigned long /*identifier*/, const ResourceResponse&) { }
 
         // FIXME: notifyFinished() is not currently guaranteed to be invoked if used from worker context and the worker shuts down in the middle of an operation.
         // This will cause leaks when we support nested workers.
index 9272839..26dc15d 100644 (file)
@@ -1,3 +1,13 @@
+2011-08-10  Vsevolod Vlasov  <vsevik@chromium.org>
+
+        Web Inspector: Remove Network.initialContentSet from protocol, store workers content on backend.
+        https://bugs.webkit.org/show_bug.cgi?id=65929
+
+        Reviewed by Pavel Feldman.
+
+        * src/SharedWorkerRepository.cpp:
+        (WebCore::SharedWorkerScriptLoader::didReceiveResponse):
+
 2011-08-10  Andrey Kosyakov  <caseq@chromium.org>
 
         Unreviewed. Rolled DEPS 95813:96009 to pick data url timing fix.
index 52c22be..9eca152 100644 (file)
@@ -82,8 +82,8 @@ public:
     static void stopAllLoadersForContext(ScriptExecutionContext*);
 
 private:
-    // WorkerScriptLoaderClient callback
-    virtual void didReceiveResponse(const ResourceResponse&);
+    // WorkerScriptLoaderClient callbacks
+    virtual void didReceiveResponse(unsigned long identifier, const ResourceResponse&);
     virtual void notifyFinished();
 
     virtual void connected();
@@ -153,9 +153,10 @@ static WebMessagePortChannel* getWebPort(PassOwnPtr<MessagePortChannel> port)
     return webPort;
 }
 
-void SharedWorkerScriptLoader::didReceiveResponse(const ResourceResponse& response)
+void SharedWorkerScriptLoader::didReceiveResponse(unsigned long identifier, const ResourceResponse& response)
 {
     m_responseAppCacheID = response.appCacheID();
+    InspectorInstrumentation::didReceiveScriptResponse(m_worker->scriptExecutionContext(), identifier);
 }
 
 void SharedWorkerScriptLoader::notifyFinished()