Backed out 6 changesets (bug 1627075) for causing failures regarding startupcache.

CLOSED TREE

Backed out changeset cf23b456ba12 (bug 1627075)
Backed out changeset b07887474f51 (bug 1627075)
Backed out changeset 65c0e6790a33 (bug 1627075)
Backed out changeset 6cd31f17a931 (bug 1627075)
Backed out changeset 0f0d1bd2a8ac (bug 1627075)
Backed out changeset 763a5a7b43a0 (bug 1627075)
This commit is contained in:
Mihai Alexandru Michis
2020-07-01 22:16:28 +03:00
parent 3239a10737
commit 7bf8703134
41 changed files with 432 additions and 2255 deletions

View File

@@ -24,7 +24,6 @@
#include "mozilla/ContentPrincipal.h"
#include "mozilla/dom/ScriptLoader.h"
#include "mozilla/Omnijar.h"
#include "mozilla/ScriptPreloader.h"
#include "mozilla/SystemPrincipal.h"
#include "mozilla/scache/StartupCache.h"
@@ -249,10 +248,6 @@ bool mozJSSubScriptLoader::ReadScript(JS::MutableHandle<JSScript*> script,
const char* uriStr, nsIIOService* serv,
bool wantReturnValue,
bool useCompilationScope) {
// We're going to cache the XDR encoded script data - suspend writes via the
// CacheAwareZipReader, otherwise we'll end up redundantly caching scripts.
AutoSuspendStartupCacheWrites suspendScache;
// We create a channel and call SetContentType, to avoid expensive MIME type
// lookups (bug 632490).
nsCOMPtr<nsIChannel> chan;
@@ -455,15 +450,7 @@ nsresult mozJSSubScriptLoader::DoLoadSubScriptWithOptions(
bool ignoreCache =
options.ignoreCache || !isSystem || scheme.EqualsLiteral("blob");
// Since we are intending to cache these buffers in the script preloader
// already, caching them in the StartupCache tends to be redundant. This
// ought to be addressed, but as in bug 1627075 we extended the
// StartupCache to be multi-process, we just didn't want to propagate
// this problem into yet more processes, so we pretend the StartupCache
// doesn't exist if we're not the parent process.
StartupCache* cache = (ignoreCache || !XRE_IsParentProcess())
? nullptr
: StartupCache::GetSingleton();
StartupCache* cache = ignoreCache ? nullptr : StartupCache::GetSingleton();
nsAutoCString cachePath;
SubscriptCachePath(cx, uri, targetObj, cachePath);