Bug 1496159 - Don't try to load modules from the bytecode cache. r=nbp, a=abillings
authorBoris Zbarsky <bzbarsky@mit.edu>
Fri, 05 Oct 2018 11:30:22 -0400
changeset 490202 503d94e63a248b88c412bc596247c8999a8aaaba
parent 490201 b80fb23f66ea441b92d925bc878e07b56fba33cf
child 490203 8027fae752ae41cf20c33607c0af3e02de03ae75
push id9945
push userryanvm@gmail.com
push dateSat, 06 Oct 2018 12:35:23 +0000
treeherdermozilla-beta@503d94e63a24 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnbp, abillings
bugs1496159
milestone63.0
Bug 1496159 - Don't try to load modules from the bytecode cache. r=nbp, a=abillings
dom/script/ScriptLoader.cpp
--- a/dom/script/ScriptLoader.cpp
+++ b/dom/script/ScriptLoader.cpp
@@ -1109,17 +1109,19 @@ ScriptLoader::StartLoad(ScriptLoadReques
       nsIChannel::LOAD_CLASSIFY_URI);
 
   NS_ENSURE_SUCCESS(rv, rv);
 
   // To avoid decoding issues, the build-id is part of the JSBytecodeMimeType
   // constant.
   aRequest->mCacheInfo = nullptr;
   nsCOMPtr<nsICacheInfoChannel> cic(do_QueryInterface(channel));
-  if (cic && nsContentUtils::IsBytecodeCacheEnabled()) {
+  if (cic && nsContentUtils::IsBytecodeCacheEnabled() &&
+      // Bug 1436400: no bytecode cache support for modules yet.
+      !aRequest->IsModuleRequest()) {
     if (!aRequest->IsLoadingSource()) {
       // Inform the HTTP cache that we prefer to have information coming from the
       // bytecode cache instead of the sources, if such entry is already registered.
       LOG(("ScriptLoadRequest (%p): Maybe request bytecode", aRequest));
       cic->PreferAlternativeDataType(nsContentUtils::JSBytecodeMimeType());
     } else {
       // If we are explicitly loading from the sources, such as after a
       // restarted request, we might still want to save the bytecode after.