Backed out 3 changesets (bug 1724509) for causing marionette failures. CLOSED TREE

Backed out changeset d47ffc49daff (bug 1724509)
Backed out changeset b267592b49db (bug 1724509)
Backed out changeset b34151a18850 (bug 1724509)
This commit is contained in:
Iulian Moraru 2021-10-06 03:57:57 +03:00
Родитель fb82cd4173
Коммит 64193785d4
6 изменённых файлов: 12 добавлений и 37 удалений

Просмотреть файл

@ -26,7 +26,6 @@
#include "mozilla/dom/ContentChild.h" #include "mozilla/dom/ContentChild.h"
#include "mozilla/dom/ContentParent.h" #include "mozilla/dom/ContentParent.h"
#include "mozilla/dom/Document.h" #include "mozilla/dom/Document.h"
#include "mozilla/scache/StartupCache.h"
#include "js/CompileOptions.h" // JS::ReadOnlyCompileOptions #include "js/CompileOptions.h" // JS::ReadOnlyCompileOptions
#include "js/experimental/JSStencil.h" #include "js/experimental/JSStencil.h"
@ -66,9 +65,6 @@ using mozilla::dom::AutoJSAPI;
using mozilla::dom::ContentChild; using mozilla::dom::ContentChild;
using mozilla::dom::ContentParent; using mozilla::dom::ContentParent;
using namespace mozilla::loader; using namespace mozilla::loader;
using mozilla::scache::StartupCache;
using namespace JS;
ProcessType ScriptPreloader::sProcessType; ProcessType ScriptPreloader::sProcessType;
@ -396,10 +392,6 @@ Result<nsCOMPtr<nsIFile>, nsresult> ScriptPreloader::GetCacheFile(
static const uint8_t MAGIC[] = "mozXDRcachev002"; static const uint8_t MAGIC[] = "mozXDRcachev002";
Result<Ok, nsresult> ScriptPreloader::OpenCache() { Result<Ok, nsresult> ScriptPreloader::OpenCache() {
if (StartupCache::GetIgnoreDiskCache()) {
return Err(NS_ERROR_ABORT);
}
MOZ_TRY(NS_GetSpecialDirectory("ProfLDS", getter_AddRefs(mProfD))); MOZ_TRY(NS_GetSpecialDirectory("ProfLDS", getter_AddRefs(mProfD)));
nsCOMPtr<nsIFile> cacheFile; nsCOMPtr<nsIFile> cacheFile;

Просмотреть файл

@ -17,7 +17,6 @@
#include "mozilla/Services.h" #include "mozilla/Services.h"
#include "mozilla/Unused.h" #include "mozilla/Unused.h"
#include "mozilla/Vector.h" #include "mozilla/Vector.h"
#include "mozilla/scache/StartupCache.h"
#include "MainThreadUtils.h" #include "MainThreadUtils.h"
#include "nsPrintfCString.h" #include "nsPrintfCString.h"
@ -45,7 +44,6 @@ bool StartsWith(const T& haystack, const T& needle) {
} // anonymous namespace } // anonymous namespace
using namespace mozilla::loader; using namespace mozilla::loader;
using mozilla::scache::StartupCache;
nsresult URLPreloader::CollectReports(nsIHandleReportCallback* aHandleReport, nsresult URLPreloader::CollectReports(nsIHandleReportCallback* aHandleReport,
nsISupports* aData, bool aAnonymize) { nsISupports* aData, bool aAnonymize) {
@ -170,10 +168,6 @@ Result<nsCOMPtr<nsIFile>, nsresult> URLPreloader::GetCacheFile(
static const uint8_t URL_MAGIC[] = "mozURLcachev002"; static const uint8_t URL_MAGIC[] = "mozURLcachev002";
Result<nsCOMPtr<nsIFile>, nsresult> URLPreloader::FindCacheFile() { Result<nsCOMPtr<nsIFile>, nsresult> URLPreloader::FindCacheFile() {
if (StartupCache::GetIgnoreDiskCache()) {
return Err(NS_ERROR_ABORT);
}
nsCOMPtr<nsIFile> cacheFile; nsCOMPtr<nsIFile> cacheFile;
MOZ_TRY_VAR(cacheFile, GetCacheFile(u".bin"_ns)); MOZ_TRY_VAR(cacheFile, GetCacheFile(u".bin"_ns));

Просмотреть файл

@ -695,10 +695,6 @@ void StartupCache::IgnoreDiskCache() {
if (gStartupCache) gStartupCache->InvalidateCache(); if (gStartupCache) gStartupCache->InvalidateCache();
} }
bool StartupCache::GetIgnoreDiskCache() {
return gIgnoreDiskCache;
}
void StartupCache::WaitOnPrefetchThread() { void StartupCache::WaitOnPrefetchThread() {
if (!mPrefetchThread || mPrefetchThread == PR_GetCurrentThread()) return; if (!mPrefetchThread || mPrefetchThread == PR_GetCurrentThread()) return;

Просмотреть файл

@ -165,8 +165,6 @@ class StartupCache : public nsIMemoryReporter {
// Signal that data should not be loaded from the cache file // Signal that data should not be loaded from the cache file
static void IgnoreDiskCache(); static void IgnoreDiskCache();
static bool GetIgnoreDiskCache();
// In DEBUG builds, returns a stream that will attempt to check for // In DEBUG builds, returns a stream that will attempt to check for
// and disallow multiple writes of the same object. // and disallow multiple writes of the same object.
nsresult GetDebugObjectOutputStream(nsIObjectOutputStream* aStream, nsresult GetDebugObjectOutputStream(nsIObjectOutputStream* aStream,

Просмотреть файл

@ -553,11 +553,6 @@ LastInteractionDuration:
type: integer type: integer
ping: true ping: true
LastStartupWasCrash:
description: >
True if the last startup was detected to have been a crash.
type: boolean
MacMemoryPressure: MacMemoryPressure:
description: > description: >
The current memory pressure state as provided by the macOS memory pressure The current memory pressure state as provided by the macOS memory pressure
@ -786,12 +781,6 @@ ShutdownProgress:
type: string type: string
ping: true ping: true
StartupCacheValid:
description: >
True if the startup cache was deemed valid and usable. Will be false if the
last session used a different browser version or had a startup cache.
type: boolean
StartupCrash: StartupCrash:
description: > description: >
If set to 1 then this crash occurred during startup. If set to 1 then this crash occurred during startup.

Просмотреть файл

@ -3282,6 +3282,18 @@ static bool RemoveComponentRegistries(nsIFile* aProfileDir,
aLocalProfileDir->Clone(getter_AddRefs(file)); aLocalProfileDir->Clone(getter_AddRefs(file));
if (!file) return false; if (!file) return false;
#if defined(XP_UNIX) || defined(XP_BEOS)
# define PLATFORM_FASL_SUFFIX ".mfasl"
#elif defined(XP_WIN)
# define PLATFORM_FASL_SUFFIX ".mfl"
#endif
file->AppendNative(nsLiteralCString("XUL" PLATFORM_FASL_SUFFIX));
file->Remove(false);
file->SetNativeLeafName(nsLiteralCString("XPC" PLATFORM_FASL_SUFFIX));
file->Remove(false);
file->SetNativeLeafName("startupCache"_ns); file->SetNativeLeafName("startupCache"_ns);
nsresult rv = file->Remove(true); nsresult rv = file->Remove(true);
return NS_SUCCEEDED(rv) || rv == NS_ERROR_FILE_TARGET_DOES_NOT_EXIST || return NS_SUCCEEDED(rv) || rv == NS_ERROR_FILE_TARGET_DOES_NOT_EXIST ||
@ -4742,17 +4754,11 @@ int XREMain::XRE_mainStartup(bool* aExitFlag) {
bool lastStartupWasCrash = CheckLastStartupWasCrash().unwrapOr(false); bool lastStartupWasCrash = CheckLastStartupWasCrash().unwrapOr(false);
CrashReporter::AnnotateCrashReport(
CrashReporter::Annotation::LastStartupWasCrash, lastStartupWasCrash);
if (CheckArg("purgecaches") || PR_GetEnv("MOZ_PURGE_CACHES") || if (CheckArg("purgecaches") || PR_GetEnv("MOZ_PURGE_CACHES") ||
lastStartupWasCrash || gSafeMode) { lastStartupWasCrash || gSafeMode) {
cachesOK = false; cachesOK = false;
} }
CrashReporter::AnnotateCrashReport(
CrashReporter::Annotation::StartupCacheValid, cachesOK && versionOK);
// Every time a profile is loaded by a build with a different version, // Every time a profile is loaded by a build with a different version,
// it updates the compatibility.ini file saying what version last wrote // it updates the compatibility.ini file saying what version last wrote
// the fastload caches. On subsequent launches if the version matches, // the fastload caches. On subsequent launches if the version matches,