Changeset 53292 in webkit
- Timestamp:
- Jan 14, 2010 3:05:38 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r53291 r53292 1 2010-01-14 Adam Roben <aroben@apple.com> 2 3 Add a test that shows onload still fires if a load of a <script src> 4 is cancelled by the resource load delegate 5 6 Tests for <http://webkit.org/b/33687> window.onload never fires if 7 page contains a <script src=foo> whose load is cancelled by resource 8 load delegate returning null from willSendRequest 9 10 Reviewed by Dave Hyatt. 11 12 * fast/loader/onload-willSendRequest-null-for-script-expected.txt: Added. 13 * fast/loader/onload-willSendRequest-null-for-script.html: Added. 14 15 * platform/qt/Skipped: Added the new test since Qt doesn't have 16 layoutTestController.setWillSendRequestReturnsNull. 17 1 18 2010-01-14 Stephen White <senorblanco@chromium.org> 2 19 -
trunk/LayoutTests/platform/qt/Skipped
r53289 r53292 198 198 # Missing layoutTestController.setWillSendRequestReturnsNull() 199 199 fast/loader/onload-willSendRequest-null-for-frame.html 200 fast/loader/onload-willSendRequest-null-for-script.html 200 201 201 202 # Missing layoutTestController.setWillSendRequestReturnsNullOnRedirect() -
trunk/WebCore/ChangeLog
r53291 r53292 1 2010-01-14 Adam Roben <aroben@apple.com> 2 3 Make Cache::requestResource return 0 if the resource's load fails 4 immediately 5 6 Fixes <http://webkit.org/b/33687> window.onload never fires if page 7 contains a <script src=foo> whose load is cancelled by resource load 8 delegate returning null from willSendRequest 9 10 Test: fast/loader/onload-willSendRequest-null-for-script.html 11 12 Reviewed by Dave Hyatt. 13 14 * loader/Cache.cpp: 15 (WebCore::Cache::requestResource): Moved code to handle immediate load 16 failure out of the "cache is disabled" block so that it will run even 17 when the cache is enabled. 18 1 19 2010-01-14 Stephen White <senorblanco@chromium.org> 2 20 -
trunk/WebCore/loader/Cache.cpp
r53151 r53292 125 125 resource->load(docLoader); 126 126 127 if (resource->errorOccurred()) { 128 // We don't support immediate loads, but we do support immediate failure. 129 // In that case we should to delete the resource now and return 0 because otherwise 130 // it would leak if no ref/deref was ever done on it. 131 resource->setInCache(false); 132 delete resource; 133 return 0; 134 } 135 127 136 if (!disabled()) 128 137 m_resources.set(url.string(), resource); // The size will be added in later once the resource is loaded and calls back to us with the new size. … … 131 140 resource->setInCache(false); 132 141 resource->setDocLoader(docLoader); 133 if (resource->errorOccurred()) {134 // We don't support immediate loads, but we do support immediate failure.135 // In that case we should to delete the resource now and return 0 because otherwise136 // it would leak if no ref/deref was ever done on it.137 delete resource;138 return 0;139 }140 142 } 141 143 }
Note: See TracChangeset
for help on using the changeset viewer.