https://bugs.webkit.org/show_bug.cgi?id=83896
Reviewed by Yury Semikhatsky.
Source/WebCore:
When we stop in the inline script on reload, we should only show concatenated script content.
When we resume, we should replace UI source code with the actual HTML content. We should not attempt to
fetch resource content until request finished loading. I regressed it in the Request extraction
and now am bringing it back.
* inspector/front-end/RawSourceCode.js:
(WebInspector.RawSourceCode):
(WebInspector.RawSourceCode.prototype._finishedLoading):
* inspector/front-end/ResourceScriptMapping.js:
(WebInspector.ResourceScriptMapping.prototype.addScript):
LayoutTests:
* inspector/debugger/raw-source-code.html:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114135
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-04-13 Pavel Feldman <pfeldman@chromium.org>
+
+ Web Inspector: do not attempt to load content from resource until request finished loading.
+ https://bugs.webkit.org/show_bug.cgi?id=83896
+
+ Reviewed by Yury Semikhatsky.
+
+ * inspector/debugger/raw-source-code.html:
+
2012-04-13 Philippe Normand <pnormand@igalia.com>
Unreviewed, GTK test_expectations update.
return request;
}
- function finishRequest(request) { WebInspector.networkManager._dispatcher._finishNetworkRequest(request); }
+ function finishRequest(request) { WebInspector.networkManager._dispatcher._updateNetworkRequest(request); WebInspector.networkManager._dispatcher._finishNetworkRequest(request); }
function createPendingRequestMock(type, content) { return createRequestMock(type, false, content); }
function createFinishedRequestMock(type, content) { return createRequestMock(type, true, content); }
2012-04-13 Pavel Feldman <pfeldman@chromium.org>
+ Web Inspector: do not attempt to load content from resource until request finished loading.
+ https://bugs.webkit.org/show_bug.cgi?id=83896
+
+ Reviewed by Yury Semikhatsky.
+
+ When we stop in the inline script on reload, we should only show concatenated script content.
+ When we resume, we should replace UI source code with the actual HTML content. We should not attempt to
+ fetch resource content until request finished loading. I regressed it in the Request extraction
+ and now am bringing it back.
+
+ * inspector/front-end/RawSourceCode.js:
+ (WebInspector.RawSourceCode):
+ (WebInspector.RawSourceCode.prototype._finishedLoading):
+ * inspector/front-end/ResourceScriptMapping.js:
+ (WebInspector.ResourceScriptMapping.prototype.addScript):
+
+2012-04-13 Pavel Feldman <pfeldman@chromium.org>
+
Web Inspector: follow up to r114116 - fixing QT test
https://bugs.webkit.org/show_bug.cgi?id=83892
this._hasNewScripts = true;
if (this._pendingRequest)
- WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.ResourceAdded, this._resourceAdded, this);
+ this._pendingRequest.addEventListener(WebInspector.NetworkRequest.Events.FinishedLoading, this._finishedLoading, this);
else
this._updateSourceMapping();
}
this._updateSourceMapping();
},
- _resourceAdded: function(event)
+ _finishedLoading: function(event)
{
- var resource = /** @type {WebInspector.Resource} */ event.data;
- if (resource.request !== this._pendingRequest)
- return;
-
- this._resource = resource;
+ this._resource = WebInspector.resourceForURL(this._pendingRequest.url);
delete this._pendingRequest;
this._updateSourceMapping();
},
resource = WebInspector.resourceForURL(script.sourceURL);
if (resource && resource.type !== WebInspector.resourceTypes.Document)
resource = null;
+ // Ignore resource in case it has not yet finished loading.
+ if (resource && resource.request && !resource.request.finished)
+ resource = null;
if (!resource) {
// When there is no resource, lookup in-flight requests of type Document.
request = WebInspector.networkManager.inflightRequestForURL(script.sourceURL);