Bug 1548253 - Port pref cache variables of nsContentUtils to StaticPrefs - dom.script_loader.bytecode_cache.enabled, r=Ehsan

Differential Revision: https://phabricator.services.mozilla.com/D29523
This commit is contained in:
Andrea Marchesini
2019-05-01 21:11:17 +00:00
parent 1b1a53edae
commit 02dd724e4f
6 changed files with 13 additions and 18 deletions

View File

@@ -14,6 +14,7 @@
#include "nsMimeTypes.h"
#include "mozilla/Telemetry.h"
#include "mozilla/StaticPrefs.h"
namespace mozilla {
namespace dom {
@@ -407,7 +408,7 @@ ScriptLoadHandler::OnStreamComplete(nsIIncrementalStreamLoader* aLoader,
// Everything went well, keep the CacheInfoChannel alive such that we can
// later save the bytecode on the cache entry.
if (NS_SUCCEEDED(rv) && mRequest->IsSource() &&
nsContentUtils::IsBytecodeCacheEnabled()) {
StaticPrefs::dom_script_loader_bytecode_cache_enabled()) {
mRequest->mCacheInfo = do_QueryInterface(channelRequest);
LOG(("ScriptLoadRequest (%p): nsICacheInfoChannel = %p", mRequest.get(),
mRequest->mCacheInfo.get()));