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

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

Issue 728453002: Drop needless self protections from ResourceLoader. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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/ResourceLoader.cpp
diff --git a/Source/core/fetch/ResourceLoader.cpp b/Source/core/fetch/ResourceLoader.cpp
index 17e6bd09b0c5758e2510a6c378cf6c1af270f97c..a2218166422bdf3697e673d3271bb209b810dbaa 100644
--- a/Source/core/fetch/ResourceLoader.cpp
+++ b/Source/core/fetch/ResourceLoader.cpp
@@ -113,21 +113,13 @@ void ResourceLoader::releaseResources()
ASSERT(m_state != Terminated);
- // It's possible that when we release the loader, it will be
- // deallocated and release the last reference to this object.
- // We need to retain to avoid accessing the object after it
- // has been deallocated and also to avoid reentering this method.
- RefPtrWillBeRawPtr<ResourceLoader> protector(this);
-
- m_host.clear();
m_state = Terminated;
-
if (m_loader) {
m_loader->cancel();
m_loader.clear();
}
-
m_deferredRequest = ResourceRequest();
+ m_host.clear();
}
void ResourceLoader::init(const ResourceRequest& passedRequest)
@@ -336,7 +328,6 @@ void ResourceLoader::didReceiveCachedMetadata(blink::WebURLLoader*, const char*
void ResourceLoader::didSendData(blink::WebURLLoader*, unsigned long long bytesSent, unsigned long long totalBytesToBeSent)
{
ASSERT(m_state == Initialized);
- RefPtrWillBeRawPtr<ResourceLoader> protect(this);
m_resource->didSendData(bytesSent, totalBytesToBeSent);
}
« 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