Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(947)

Unified Diff: Source/core/inspector/InspectorResourceAgent.cpp

Issue 302093003: Show the correct resource type when XHR fails in the inspector. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/inspector/InspectorResourceAgent.cpp
diff --git a/Source/core/inspector/InspectorResourceAgent.cpp b/Source/core/inspector/InspectorResourceAgent.cpp
index d53640c8abffa34e8c78f0130c6e29ee9251fa6a..95f899919a573204fa6e46ebaf728a010bf4f5ef 100644
--- a/Source/core/inspector/InspectorResourceAgent.cpp
+++ b/Source/core/inspector/InspectorResourceAgent.cpp
@@ -432,7 +432,7 @@ void InspectorResourceAgent::didFailLoading(unsigned long identifier, const Reso
{
String requestId = IdentifiersFactory::requestId(identifier);
bool canceled = error.isCancellation();
- m_frontend->loadingFailed(requestId, currentTime(), error.localizedDescription(), canceled ? &canceled : 0);
+ m_frontend->loadingFailed(requestId, currentTime(), InspectorPageAgent::resourceTypeJson(m_resourcesData->resourceType(requestId)), error.localizedDescription(), canceled ? &canceled : 0);
}
void InspectorResourceAgent::scriptImported(unsigned long identifier, const String& sourceString)
@@ -454,6 +454,7 @@ void InspectorResourceAgent::documentThreadableLoaderStartedLoadingForClient(uns
if (it == m_pendingXHRReplayData.end())
return;
+ m_resourcesData->setResourceType(IdentifiersFactory::requestId(identifier), InspectorPageAgent::XHRResource);
XHRReplayData* xhrReplayData = it->value.get();
String requestId = IdentifiersFactory::requestId(identifier);
m_resourcesData->setXHRReplayData(requestId, xhrReplayData);

Powered by Google App Engine
This is Rietveld 408576698