mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 11:55:49 +00:00
Bug 1425296 - Don't let RequestContext's load state be reset to 'before-DOMContentLoaded' by any sub-requested document within the load group to prevent long delays of tailed (tracking) requests. r=bz
This commit is contained in:
parent
1153291ad5
commit
9264c9f395
@ -2417,15 +2417,17 @@ nsDocument::ResetToURI(nsIURI *aURI, nsILoadGroup *aLoadGroup,
|
||||
// XXXbz what does "just fine" mean exactly? And given that there
|
||||
// is no nsDocShell::SetDocument, what is this talking about?
|
||||
|
||||
// Inform the associated request context about this load start so
|
||||
// any of its internal load progress flags gets reset.
|
||||
nsCOMPtr<nsIRequestContextService> rcsvc =
|
||||
do_GetService("@mozilla.org/network/request-context-service;1");
|
||||
if (rcsvc) {
|
||||
nsCOMPtr<nsIRequestContext> rc;
|
||||
rcsvc->GetRequestContextFromLoadGroup(aLoadGroup, getter_AddRefs(rc));
|
||||
if (rc) {
|
||||
rc->BeginLoad();
|
||||
if (IsContentDocument()) {
|
||||
// Inform the associated request context about this load start so
|
||||
// any of its internal load progress flags gets reset.
|
||||
nsCOMPtr<nsIRequestContextService> rcsvc =
|
||||
do_GetService("@mozilla.org/network/request-context-service;1");
|
||||
if (rcsvc) {
|
||||
nsCOMPtr<nsIRequestContext> rc;
|
||||
rcsvc->GetRequestContextFromLoadGroup(aLoadGroup, getter_AddRefs(rc));
|
||||
if (rc) {
|
||||
rc->BeginLoad();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user