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

Unified Diff: Source/core/fetch/RawResource.cpp

Issue 1307743009: Protect RawResource from deletion in RawResource::didSendData() and didDownloadData() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fetch/RawResource.cpp
diff --git a/Source/core/fetch/RawResource.cpp b/Source/core/fetch/RawResource.cpp
index ece0478f99e5bb321d49d1299293b87df9191c60..c7c460a43e5c5c202826eec68cbc74461dabe0d2 100644
--- a/Source/core/fetch/RawResource.cpp
+++ b/Source/core/fetch/RawResource.cpp
@@ -166,6 +166,7 @@ void RawResource::setSerializedCachedMetadata(const char* data, size_t size)
void RawResource::didSendData(unsigned long long bytesSent, unsigned long long totalBytesToBeSent)
{
+ ResourcePtr<RawResource> protect(this);
ResourceClientWalker<RawResourceClient> w(m_clients);
while (RawResourceClient* c = w.next())
c->dataSent(this, bytesSent, totalBytesToBeSent);
@@ -173,6 +174,7 @@ void RawResource::didSendData(unsigned long long bytesSent, unsigned long long t
void RawResource::didDownloadData(int dataLength)
{
+ ResourcePtr<RawResource> protect(this);
ResourceClientWalker<RawResourceClient> w(m_clients);
while (RawResourceClient* c = w.next())
c->dataDownloaded(this, dataLength);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698