Source/WebCore: Web Inspector: Incorrect XHR responses when two async xhrs are sent...
authorvsevik@chromium.org <vsevik@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 15 Aug 2012 16:50:13 +0000 (16:50 +0000)
committervsevik@chromium.org <vsevik@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 15 Aug 2012 16:50:13 +0000 (16:50 +0000)
commita4d832244db5c3a8fd34edebbb21cdf9c40fd26a
tree5520754621818a75bb258020754f094ca93c5968
parent79632f119768a714ddc22689a1415ba7067db3c9
Source/WebCore: Web Inspector: Incorrect XHR responses when two async xhrs are sent synchronously
https://bugs.webkit.org/show_bug.cgi?id=91630

Patch by Pavel Chadnov <chadnov@google.com> on 2012-08-15
Reviewed by Vsevolod Vlasov.

CachedResource object for XHR response is now taken from ResourceLoader (if it's possible).

Test: http/tests/inspector/network/network-xhr-async-double.html

* inspector/InspectorInstrumentation.cpp:
(WebCore):
(WebCore::InspectorInstrumentation::didReceiveResourceResponseImpl):
(WebCore::InspectorInstrumentation::didReceiveResourceResponseButCanceledImpl):
* inspector/InspectorInstrumentation.h:
(InspectorInstrumentation):
(WebCore::InspectorInstrumentation::didReceiveResourceResponse):
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::willSendRequest):
(WebCore::InspectorResourceAgent::didReceiveResponse):
* inspector/InspectorResourceAgent.h:
(WebCore):
(InspectorResourceAgent):
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::didReceiveResponse):
* loader/ResourceLoadNotifier.cpp:
(WebCore::ResourceLoadNotifier::didReceiveResponse):
(WebCore::ResourceLoadNotifier::dispatchDidReceiveResponse):
* loader/ResourceLoadNotifier.h:
(ResourceLoadNotifier):
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::isSubresourceLoader):
(WebCore):
* loader/ResourceLoader.h:
(ResourceLoader):
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::cachedResource):
(WebCore):
(WebCore::SubresourceLoader::isSubresourceLoader):
* loader/SubresourceLoader.h:
(SubresourceLoader):
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::didReceiveResponse):

LayoutTests: Web Inspector: Incorrect XHR responses when two async xhrs are sent synchronously
https://bugs.webkit.org/show_bug.cgi?id=91630

Patch by Pavel Chadnov <chadnov@google.com> on 2012-08-15
Reviewed by Vsevolod Vlasov.

New test for two async XHRs sent synchronously.

* http/tests/inspector/network-test.js:
(doXHR):
(doXHRWithPayload.xhr.onreadystatechange):
(doXHRWithPayload):
* http/tests/inspector/network/network-xhr-async-double-expected.txt: Added.
* http/tests/inspector/network/network-xhr-async-double.html: Added.
* http/tests/inspector/network/resources/echo-payload.php: Added.
* platform/chromium/http/tests/inspector/console-xhr-logging-async-expected.txt:
* platform/chromium/http/tests/inspector/console-xhr-logging-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@125681 268f45cc-cd09-0410-ab3c-d52691b4dbfc
20 files changed:
LayoutTests/ChangeLog
LayoutTests/http/tests/inspector/network-test.js
LayoutTests/http/tests/inspector/network/network-xhr-async-double-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/inspector/network/network-xhr-async-double.html [new file with mode: 0644]
LayoutTests/http/tests/inspector/network/resources/echo-payload.php [new file with mode: 0644]
LayoutTests/platform/chromium/http/tests/inspector/console-xhr-logging-async-expected.txt
LayoutTests/platform/chromium/http/tests/inspector/console-xhr-logging-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/inspector/InspectorInstrumentation.cpp
Source/WebCore/inspector/InspectorInstrumentation.h
Source/WebCore/inspector/InspectorResourceAgent.cpp
Source/WebCore/inspector/InspectorResourceAgent.h
Source/WebCore/loader/DocumentThreadableLoader.cpp
Source/WebCore/loader/ResourceLoadNotifier.cpp
Source/WebCore/loader/ResourceLoadNotifier.h
Source/WebCore/loader/ResourceLoader.cpp
Source/WebCore/loader/ResourceLoader.h
Source/WebCore/loader/SubresourceLoader.cpp
Source/WebCore/loader/SubresourceLoader.h
Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp