Changeset 118618 in webkit
- Timestamp:
- May 26, 2012 5:46:11 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r118617 r118618 1 2012-05-26 Nate Chapin <japhet@chromium.org> 2 3 Test for https://bugs.webkit.org/show_bug.cgi?id=35377. 4 5 Reviewed by Darin Adler. 6 7 * http/tests/cache/cancel-in-progress-load-expected.txt: Added. 8 * http/tests/cache/cancel-in-progress-load.html: Added. 9 * http/tests/misc/write-while-waiting.html: Add waitUntilDone()/notifyDone(). 10 The slow script will now be cancelled when the script element is removed from the document. 11 Without waitUntilDone(), LayoutTestController will immediately end the test upon cancellation 12 of the last resource. 13 1 14 2012-05-26 Simon Fraser <simon.fraser@apple.com> 2 15 -
trunk/LayoutTests/http/tests/misc/write-while-waiting.html
r63998 r118618 3 3 FAIL 4 4 <script> 5 if (window.layoutTestController) 5 if (window.layoutTestController) { 6 6 layoutTestController.dumpAsText(); 7 layoutTestController.waitUntilDone(); 8 } 7 9 8 setTimeout("document.write('PASS');document.close(); ", 100);10 setTimeout("document.write('PASS');document.close(); if (window.layoutTestController) layoutTestController.notifyDone();", 100); 9 11 </script> 10 12 <script src="resources/script-slow1.pl"></script> -
trunk/Source/WebCore/ChangeLog
r118617 r118618 1 2012-05-26 Nate Chapin <japhet@chromium.org> 2 3 Cancel CachedResource loads when the last client is removed. 4 https://bugs.webkit.org/show_bug.cgi?id=35377 5 6 Reviewed by Darin Adler. 7 8 Test: http/tests/cache/cancel-in-progress-load.html 9 10 * loader/SubresourceLoader.cpp: 11 (WebCore::SubresourceLoader::errorLoadingResource): 12 * loader/cache/CachedCSSStyleSheet.cpp: 13 (WebCore::CachedCSSStyleSheet::allClientsRemoved): 14 * loader/cache/CachedFont.cpp: 15 (WebCore::CachedFont::allClientsRemoved): 16 * loader/cache/CachedImage.cpp: 17 (WebCore::CachedImage::allClientsRemoved): 18 * loader/cache/CachedRawResource.cpp: 19 (WebCore): 20 * loader/cache/CachedRawResource.h: 21 (WebCore::CachedRawResource::shouldIgnoreHTTPStatusCodeErrors): 22 * loader/cache/CachedResource.cpp: 23 (WebCore::CachedResource::allClientsRemoved): 24 (WebCore): 25 * loader/cache/CachedResource.h: 26 (CachedResource): 27 * loader/cache/CachedScript.cpp: 28 (WebCore::CachedScript::allClientsRemoved): 29 1 30 2012-05-26 Simon Fraser <simon.fraser@apple.com> 2 31 -
trunk/Source/WebCore/loader/SubresourceLoader.cpp
r114976 r118618 233 233 return false; 234 234 235 m_state = Finishing; 235 236 m_resource->error(CachedResource::LoadError); 236 m_state = Finishing;237 237 cancel(); 238 238 return true; -
trunk/Source/WebCore/loader/cache/CachedCSSStyleSheet.cpp
r118336 r118618 67 67 if (!MemoryCache::shouldMakeResourcePurgeableOnEviction() && isSafeToMakePurgeable()) 68 68 makePurgeable(true); 69 CachedResource::allClientsRemoved(); 69 70 } 70 71 -
trunk/Source/WebCore/loader/cache/CachedFont.cpp
r114523 r118618 186 186 } 187 187 #endif 188 CachedResource::allClientsRemoved(); 188 189 } 189 190 -
trunk/Source/WebCore/loader/cache/CachedImage.cpp
r117376 r118618 125 125 if (double interval = memoryCache()->deadDecodedDataDeletionInterval()) 126 126 m_decodedDataDeletionTimer.startOneShot(interval); 127 CachedResource::allClientsRemoved(); 127 128 } 128 129 -
trunk/Source/WebCore/loader/cache/CachedRawResource.cpp
r115236 r118618 88 88 } 89 89 90 void CachedRawResource::allClientsRemoved()91 {92 if (m_loader)93 m_loader->cancelIfNotFinishing();94 }95 96 90 void CachedRawResource::willSendRequest(ResourceRequest& request, const ResourceResponse& response) 97 91 { -
trunk/Source/WebCore/loader/cache/CachedRawResource.h
r110608 r118618 50 50 51 51 virtual bool shouldIgnoreHTTPStatusCodeErrors() const { return true; } 52 virtual void allClientsRemoved();53 52 54 53 virtual void willSendRequest(ResourceRequest&, const ResourceResponse&); -
trunk/Source/WebCore/loader/cache/CachedResource.cpp
r117029 r118618 388 388 } 389 389 390 void CachedResource::allClientsRemoved() 391 { 392 if (m_loader) 393 m_loader->cancelIfNotFinishing(); 394 } 395 390 396 bool CachedResource::addClientToSet(CachedResourceClient* client) 391 397 { -
trunk/Source/WebCore/loader/cache/CachedResource.h
r118301 r118618 127 127 128 128 virtual void didAddClient(CachedResourceClient*); 129 virtual void allClientsRemoved() { }129 virtual void allClientsRemoved(); 130 130 131 131 unsigned count() const { return m_clients.size(); } -
trunk/Source/WebCore/loader/cache/CachedScript.cpp
r112245 r118618 68 68 if (double interval = memoryCache()->deadDecodedDataDeletionInterval()) 69 69 m_decodedDataDeletionTimer.startOneShot(interval); 70 CachedResource::allClientsRemoved(); 70 71 } 71 72
Note: See TracChangeset
for help on using the changeset viewer.