Bug 1548253 - Port pref cache variables of nsContentUtils to StaticPrefs - network.http.tailing.enabled, r=Ehsan

Differential Revision: https://phabricator.services.mozilla.com/D29520
This commit is contained in:
Andrea Marchesini
2019-05-01 21:10:31 +00:00
parent dbec9c190a
commit 365d1f89e5
10 changed files with 22 additions and 23 deletions

View File

@@ -29,6 +29,7 @@
#include "mozilla/dom/ScriptSettings.h"
#include "mozilla/dom/SRILogHelper.h"
#include "mozilla/net/UrlClassifierFeatureFactory.h"
#include "mozilla/StaticPrefs.h"
#include "nsGkAtoms.h"
#include "nsNetUtil.h"
#include "nsGlobalWindowInner.h"
@@ -1316,11 +1317,11 @@ nsresult ScriptLoader::StartLoad(ScriptLoadRequest* aRequest) {
// content such as images, Leader implicitely disallows tailing
cos->AddClassFlags(nsIClassOfService::Leader);
} else if (aRequest->IsDeferredScript() &&
!nsContentUtils::IsTailingEnabled()) {
// Bug 1395525 and the !nsContentUtils::IsTailingEnabled() bit:
// We want to make sure that turing tailing off by the pref makes
// the browser behave exactly the same way as before landing
// the tailing patch.
!StaticPrefs::network_http_tailing_enabled()) {
// Bug 1395525 and the !StaticPrefs::network_http_tailing_enabled() bit:
// We want to make sure that turing tailing off by the pref makes the
// browser behave exactly the same way as before landing the tailing
// patch.
// head/body deferred scripts are blocked by leaders but are not
// allowed tailing because they block DOMContentLoaded