Changeset 127902 in webkit
- Timestamp:
- Sep 7, 2012 11:51:37 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r127900 r127902 1 2012-09-06 Vsevolod Vlasov <vsevik@chromium.org> 2 3 Web Inspector: [REGRESSION] Content is not available for dynamically loaded script sometimes. 4 https://bugs.webkit.org/show_bug.cgi?id=95954 5 6 Reviewed by Yury Semikhatsky. 7 8 * http/tests/inspector/resource-tree/resource-request-content-after-loading-and-clearing-cache-expected.txt: Added. 9 * http/tests/inspector/resource-tree/resource-request-content-after-loading-and-clearing-cache.html: Added. 10 * http/tests/inspector/resource-tree/resources/dynamic-script.js: Added. 11 (foo): 12 * http/tests/inspector/resources-test.js: 13 1 14 2012-09-07 Dominic Mazzoni <dmazzoni@google.com> 2 15 -
trunk/LayoutTests/http/tests/inspector/resources-test.js
r121746 r127902 83 83 } 84 84 85 InspectorTest.resourceMatchingURL = function(resourceURL , callback)85 InspectorTest.resourceMatchingURL = function(resourceURL) 86 86 { 87 87 var result = null; -
trunk/Source/WebCore/ChangeLog
r127899 r127902 1 2012-09-06 Vsevolod Vlasov <vsevik@chromium.org> 2 3 Web Inspector: [REGRESSION] Content is not available for dynamically loaded script sometimes. 4 https://bugs.webkit.org/show_bug.cgi?id=95954 5 6 Reviewed by Yury Semikhatsky. 7 8 Resource now loads content from request when it is available. 9 Content was loaded from PageAgent before where it might be not available if the resource was already GCed. 10 11 Test: http/tests/inspector/resource-tree/resource-request-content-after-loading-and-clearing-cache.html 12 13 * inspector/front-end/Resource.js: 14 (WebInspector.Resource.prototype._innerRequestContent.contentLoaded): 15 (WebInspector.Resource.prototype._innerRequestContent.resourceContentLoaded): 16 (WebInspector.Resource.prototype._innerRequestContent): 17 1 18 2012-09-07 Adam Barth <abarth@webkit.org> 2 19 -
trunk/Source/WebCore/inspector/front-end/Resource.js
r122603 r127902 312 312 313 313 /** 314 * @param {?Protocol.Error} error315 314 * @param {string} content 316 315 * @param {boolean} contentEncoded 317 316 */ 318 function c allback(error,content, contentEncoded)317 function contentLoaded(content, contentEncoded) 319 318 { 320 this._content = error ? null :content;319 this._content = content; 321 320 this._contentEncoded = contentEncoded; 322 321 var callbacks = this._pendingContentCallbacks.slice(); … … 326 325 delete this._contentRequested; 327 326 } 328 PageAgent.getResourceContent(this.frameId, this.url, callback.bind(this)); 327 328 /** 329 * @param {?Protocol.Error} error 330 * @param {string} content 331 * @param {boolean} contentEncoded 332 */ 333 function resourceContentLoaded(error, content, contentEncoded) 334 { 335 if (error) 336 console.error("Resource content request failed: " + error); 337 contentLoaded.call(this, error ? null : content, contentEncoded); 338 } 339 340 if (this.request) { 341 /** 342 * @param {string} content 343 * @param {boolean} contentEncoded 344 * @param {string} mimeType 345 */ 346 function requestContentLoaded(content, contentEncoded, mimeType) 347 { 348 contentLoaded.call(this, content, contentEncoded); 349 } 350 351 this.request.requestContent(requestContentLoaded.bind(this)); 352 return; 353 } 354 PageAgent.getResourceContent(this.frameId, this.url, resourceContentLoaded.bind(this)); 329 355 }, 330 356
Note: See TracChangeset
for help on using the changeset viewer.