2011-03-09 Andrey Kosyakov <caseq@chromium.org>
authorcaseq@chromium.org <caseq@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Mar 2011 14:49:49 +0000 (14:49 +0000)
committercaseq@chromium.org <caseq@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Mar 2011 14:49:49 +0000 (14:49 +0000)
        Unreviewed. Fixed a crash in InspectorInstrumentation::didReceiveResponse() when loader is null (broken in r80639)

        * inspector/InspectorInstrumentation.cpp:
        (WebCore::InspectorInstrumentation::didReceiveResourceResponseImpl):

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

Source/WebCore/ChangeLog
Source/WebCore/inspector/InspectorInstrumentation.cpp

index 70c4185..443807e 100644 (file)
@@ -1,3 +1,10 @@
+2011-03-09  Andrey Kosyakov  <caseq@chromium.org>
+
+        Unreviewed. Fixed a crash in InspectorInstrumentation::didReceiveResponse() when loader is null (broken in r80639)
+
+        * inspector/InspectorInstrumentation.cpp:
+        (WebCore::InspectorInstrumentation::didReceiveResourceResponseImpl):
+
 2011-03-09  Yury Semikhatsky  <yurys@chromium.org>
 
         Reviewed by Pavel Feldman.
index 3623268..09b71c9 100644 (file)
@@ -448,13 +448,15 @@ InspectorInstrumentationCookie InspectorInstrumentation::willReceiveResourceResp
 
 void InspectorInstrumentation::didReceiveResourceResponseImpl(const InspectorInstrumentationCookie& cookie, unsigned long identifier, DocumentLoader* loader, const ResourceResponse& response)
 {
+    if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie))
+        timelineAgent->didReceiveResourceResponse();
+    if (!loader)
+        return;
     if (InspectorAgent* inspectorAgent = inspectorAgentForFrame(loader->frame())) {
         if (InspectorResourceAgent* resourceAgent = retrieveResourceAgent(inspectorAgent))
             resourceAgent->didReceiveResponse(identifier, loader, response);
         inspectorAgent->consoleAgent()->didReceiveResponse(identifier, response);
     }
-    if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie))
-        timelineAgent->didReceiveResourceResponse();
 }
 
 void InspectorInstrumentation::didReceiveContentLengthImpl(InspectorAgent* inspectorAgent, unsigned long identifier, int lengthReceived)