Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(121)

Unified Diff: Source/WebCore/loader/cache/CachedRawResource.cpp

Issue 10271004: Merge 115236 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1084/
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/http/tests/xmlhttprequest/access-control-repeated-failed-preflight-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/loader/cache/CachedRawResource.cpp
===================================================================
--- Source/WebCore/loader/cache/CachedRawResource.cpp (revision 115607)
+++ Source/WebCore/loader/cache/CachedRawResource.cpp (working copy)
@@ -72,6 +72,10 @@
{
if (m_response.isNull() || !hasClient(c))
return;
+ // The calls to the client can result in events running, potentially causing
+ // this resource to be evicted from the cache and all clients to be removed,
+ // so a protector is necessary.
+ CachedResourceHandle<CachedRawResource> protect(this);
CachedRawResourceClient* client = static_cast<CachedRawResourceClient*>(c);
client->responseReceived(this, m_response);
if (!hasClient(c))
« no previous file with comments | « LayoutTests/http/tests/xmlhttprequest/access-control-repeated-failed-preflight-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698