Skip to content
Permalink
Browse files
2011-04-12 Vsevolod Vlasov <vsevik@chromium.org>
        Reviewed by Pavel Feldman.

        Web Inspector: Failed/canceled resource requests kept showing as Pending in network panel.
        https://bugs.webkit.org/show_bug.cgi?id=58135

        Added statuses for failed/canceled resource loading.

        * English.lproj/localizedStrings.js:
        * inspector/Inspector.json:
        * inspector/InspectorResourceAgent.cpp:
        (WebCore::InspectorResourceAgent::didFailLoading):
        * inspector/front-end/NetworkManager.js:
        * inspector/front-end/NetworkPanel.js:
        * inspector/front-end/Resource.js:

Canonical link: https://commits.webkit.org/73324@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@83564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
webkit-commit-queue committed Apr 12, 2011
1 parent def35e9 commit a5cb1a1049c1b350eb50089869b95ba794a92743
Showing 7 changed files with 41 additions and 3 deletions.
@@ -1,3 +1,20 @@
2011-04-12 Vsevolod Vlasov <vsevik@chromium.org>

Reviewed by Pavel Feldman.

Web Inspector: Failed/canceled resource requests kept showing as Pending in network panel.
https://bugs.webkit.org/show_bug.cgi?id=58135

Added statuses for failed/canceled resource loading.

* English.lproj/localizedStrings.js:
* inspector/Inspector.json:
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::didFailLoading):
* inspector/front-end/NetworkManager.js:
* inspector/front-end/NetworkPanel.js:
* inspector/front-end/Resource.js:

2011-04-12 Steve Block <steveblock@google.com>

Reviewed by Oliver Hunt.
Binary file not shown.
@@ -432,7 +432,8 @@
"parameters": [
{ "name": "identifier", "type": "integer", "description": "Request identifier." },
{ "name": "time", "type": "number", "description": "Timestamp." },
{ "name": "errorText", "type": "string", "description": "User friendly error message." }
{ "name": "errorText", "type": "string", "description": "User friendly error message." },
{ "name": "canceled", "type": "boolean", "description": "True if loading was canceled." }
]
},
{
@@ -353,7 +353,7 @@ void InspectorResourceAgent::didFinishLoading(unsigned long identifier, double f

void InspectorResourceAgent::didFailLoading(unsigned long identifier, const ResourceError& error)
{
m_frontend->loadingFailed(static_cast<int>(identifier), currentTime(), error.localizedDescription());
m_frontend->loadingFailed(static_cast<int>(identifier), currentTime(), error.localizedDescription(), error.isCancellation());
}

void InspectorResourceAgent::didLoadResourceFromMemoryCache(DocumentLoader* loader, const CachedResource* resource)
@@ -173,13 +173,14 @@ WebInspector.NetworkDispatcher.prototype = {
this._finishResource(resource, finishTime);
},

loadingFailed: function(identifier, time, localizedDescription)
loadingFailed: function(identifier, time, localizedDescription, canceled)
{
var resource = this._inflightResourcesById[identifier];
if (!resource)
return;

resource.failed = true;
resource.canceled = canceled;
resource.localizedFailDescription = localizedDescription;
this._finishResource(resource, time);
},
@@ -1506,6 +1506,15 @@ WebInspector.NetworkDataGridNode.prototype = {
{
this._statusCell.removeChildren();

if (this._resource.failed) {
if (this._resource.canceled)
this._statusCell.textContent = WebInspector.UIString("(canceled)");
else
this._statusCell.textContent = WebInspector.UIString("(failed)");
this._statusCell.addStyleClass("network-dim-cell");
return;
}

var fromCache = this._resource.cached;
if (fromCache) {
this._statusCell.textContent = WebInspector.UIString("(from cache)");
@@ -292,6 +292,16 @@ WebInspector.Resource.prototype = {
this._failed = x;
},

get canceled()
{
return this._canceled;
},

set canceled(x)
{
this._canceled = x;
},

get category()
{
return this._category;

0 comments on commit a5cb1a1

Please sign in to comment.