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

Unified Diff: third_party/WebKit/Source/core/fetch/Resource.cpp

Issue 1770013004: Remove Resource::assertIsAlive(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 | « third_party/WebKit/Source/core/fetch/Resource.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/fetch/Resource.cpp
diff --git a/third_party/WebKit/Source/core/fetch/Resource.cpp b/third_party/WebKit/Source/core/fetch/Resource.cpp
index 2bf5f86a8a0dd27c57b9ab16dd06ce8c0a754510..3ea9d36acbe45d7257be13eef693887a3d63d69a 100644
--- a/third_party/WebKit/Source/core/fetch/Resource.cpp
+++ b/third_party/WebKit/Source/core/fetch/Resource.cpp
@@ -164,9 +164,6 @@ Resource::Resource(const ResourceRequest& request, Type type)
, m_status(Pending)
, m_needsSynchronousCacheHit(false)
, m_linkPreload(false)
-#ifdef ENABLE_RESOURCE_IS_DELETED_CHECK
- , m_deleted(false)
-#endif
{
ASSERT(m_type == unsigned(type)); // m_type is a bitfield, so this tests careless updates of the enum.
InstanceCounters::incrementCounter(InstanceCounters::ResourceCounter);
@@ -186,12 +183,6 @@ Resource::Resource(const ResourceRequest& request, Type type)
Resource::~Resource()
{
- assertAlive();
-
-#ifdef ENABLE_RESOURCE_IS_DELETED_CHECK
- m_deleted = true;
-#endif
-
InstanceCounters::decrementCounter(InstanceCounters::ResourceCounter);
}
@@ -836,7 +827,6 @@ void Resource::revalidationSucceeded(const ResourceResponse& validatingResponse)
m_response.setHTTPHeaderField(header.key, header.value);
}
- assertAlive();
m_resourceRequest = m_revalidatingRequest;
m_revalidatingRequest = ResourceRequest();
}
@@ -963,13 +953,11 @@ void Resource::ResourceCallback::schedule(Resource* resource)
{
if (!m_callbackTaskFactory->isPending())
Platform::current()->currentThread()->scheduler()->loadingTaskRunner()->postTask(BLINK_FROM_HERE, m_callbackTaskFactory->cancelAndCreate());
- resource->assertAlive();
m_resourcesWithPendingClients.add(resource);
}
void Resource::ResourceCallback::cancel(Resource* resource)
{
- resource->assertAlive();
m_resourcesWithPendingClients.remove(resource);
if (m_callbackTaskFactory->isPending() && m_resourcesWithPendingClients.isEmpty())
m_callbackTaskFactory->cancel();
@@ -987,14 +975,8 @@ void Resource::ResourceCallback::runTask()
resources.append(resource.get());
m_resourcesWithPendingClients.clear();
- for (const auto& resource : resources) {
- resource->assertAlive();
- resource->finishPendingClients();
- resource->assertAlive();
- }
-
for (const auto& resource : resources)
- resource->assertAlive();
+ resource->finishPendingClients();
}
static const char* initatorTypeNameToString(const AtomicString& initiatorTypeName)
« no previous file with comments | « third_party/WebKit/Source/core/fetch/Resource.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698