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

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

Issue 1923003002: Clear Resource::m_loader in Resource::finish() and Resource::error() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase, comment in background.js Created 4 years, 7 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
Index: third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
diff --git a/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp b/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
index 7989e4075e9232c8b875e7a2932a71b645731d05..f45d60fa6b9124ba576dee8f3c23b9018fa59476 100644
--- a/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
+++ b/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
@@ -728,17 +728,7 @@ ResourceFetcher::RevalidationPolicy ResourceFetcher::determineRevalidationPolicy
if (type != Resource::Raw) {
if (!context().isLoadComplete() && m_validatedURLs.contains(existingResource->url()))
return Use;
- // TODO(japhet): existingResource->isLoading() and existingResource->loader() are not identical,
- // which is lame.
- // Being in the loading state and having a ResourceLoader* are subtly diffent cases, either of which
- // should indicate reuse. A resource can have isLoading() return true without a ResourceLoader* if
- // it is a font that defers actually loading until the font is required. On the other hand,
- // a Resource can have a non-null ResourceLoader* but have isLoading() return false in a narrow window
- // during completion, because we set loading to false before notifying ResourceClients, but don't
- // clear the ResourceLoader pointer until the stack unwinds. If, inside the ResourceClient callbacks,
- // an event fires synchronously and an event handler re-requests the resource, we can reach this point
- // while not loading but having a ResourceLoader.
- if (existingResource->isLoading() || existingResource->loader())
+ if (existingResource->isLoading())
return Use;
}

Powered by Google App Engine
This is Rietveld 408576698