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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user