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

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

Issue 102353004: Allow resource loads inside page unload events (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years 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/xmlhttprequest-unload-sync-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fetch/ResourceFetcher.cpp
diff --git a/Source/core/fetch/ResourceFetcher.cpp b/Source/core/fetch/ResourceFetcher.cpp
index 4cb4aa5b3785eaf2b2fc695d92e79c2881f20c7d..fc8247657c6c6fc211634fef9ca435f221a6f5a8 100644
--- a/Source/core/fetch/ResourceFetcher.cpp
+++ b/Source/core/fetch/ResourceFetcher.cpp
@@ -555,7 +555,9 @@ bool ResourceFetcher::shouldLoadNewResource() const
return false;
if (!m_documentLoader)
return true;
- return m_documentLoader == frame()->loader().activeDocumentLoader();
+ if (m_documentLoader == frame()->loader().activeDocumentLoader())
+ return true;
+ return document() && document()->pageDismissalEventBeingDispatched() != Document::NoDismissal;
}
bool ResourceFetcher::resourceNeedsLoad(Resource* resource, const FetchRequest& request, RevalidationPolicy policy)
« no previous file with comments | « LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-unload-sync-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698