зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1348044 - Mark the channel as UrgentStart for top level document loading. r=smaug
The urgent-start classification will tell the network requests scheduler to perform it with the highest priority and also ignoring any parallelism or overall connection limits. Doing this for top level document load could increase the responsiveness to users.
This commit is contained in:
Родитель
5a2544848e
Коммит
8bd7c966ab
|
@ -199,6 +199,7 @@
|
|||
#include "nsDocShellTransferableHooks.h"
|
||||
#include "nsICommandManager.h"
|
||||
#include "nsIDOMNode.h"
|
||||
#include "nsIClassOfService.h"
|
||||
#include "nsIDocShellTreeOwner.h"
|
||||
#include "nsIHttpChannel.h"
|
||||
#include "nsIIDNService.h"
|
||||
|
@ -11345,6 +11346,17 @@ nsDocShell::DoURILoad(nsIURI* aURI,
|
|||
}
|
||||
}
|
||||
|
||||
// Mark the http channel as UrgentStart for top level document loading
|
||||
// in active tab.
|
||||
if (mIsActive || (mLoadType & (LOAD_CMD_NORMAL | LOAD_CMD_HISTORY))) {
|
||||
if (httpChannel && isTopLevelDoc) {
|
||||
nsCOMPtr<nsIClassOfService> cos(do_QueryInterface(channel));
|
||||
if (cos) {
|
||||
cos->AddClassFlags(nsIClassOfService::UrgentStart);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rv = DoChannelLoad(channel, uriLoader, aBypassClassifier);
|
||||
|
||||
//
|
||||
|
|
Загрузка…
Ссылка в новой задаче