зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
fb82cd4173
Коммит
64193785d4
|
@ -26,7 +26,6 @@
|
|||
#include "mozilla/dom/ContentChild.h"
|
||||
#include "mozilla/dom/ContentParent.h"
|
||||
#include "mozilla/dom/Document.h"
|
||||
#include "mozilla/scache/StartupCache.h"
|
||||
|
||||
#include "js/CompileOptions.h" // JS::ReadOnlyCompileOptions
|
||||
#include "js/experimental/JSStencil.h"
|
||||
|
@ -66,9 +65,6 @@ using mozilla::dom::AutoJSAPI;
|
|||
using mozilla::dom::ContentChild;
|
||||
using mozilla::dom::ContentParent;
|
||||
using namespace mozilla::loader;
|
||||
using mozilla::scache::StartupCache;
|
||||
|
||||
using namespace JS;
|
||||
|
||||
ProcessType ScriptPreloader::sProcessType;
|
||||
|
||||
|
@ -396,10 +392,6 @@ Result<nsCOMPtr<nsIFile>, nsresult> ScriptPreloader::GetCacheFile(
|
|||
static const uint8_t MAGIC[] = "mozXDRcachev002";
|
||||
|
||||
Result<Ok, nsresult> ScriptPreloader::OpenCache() {
|
||||
if (StartupCache::GetIgnoreDiskCache()) {
|
||||
return Err(NS_ERROR_ABORT);
|
||||
}
|
||||
|
||||
MOZ_TRY(NS_GetSpecialDirectory("ProfLDS", getter_AddRefs(mProfD)));
|
||||
|
||||
nsCOMPtr<nsIFile> cacheFile;
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
#include "mozilla/Services.h"
|
||||
#include "mozilla/Unused.h"
|
||||
#include "mozilla/Vector.h"
|
||||
#include "mozilla/scache/StartupCache.h"
|
||||
|
||||
#include "MainThreadUtils.h"
|
||||
#include "nsPrintfCString.h"
|
||||
|
@ -45,7 +44,6 @@ bool StartsWith(const T& haystack, const T& needle) {
|
|||
} // anonymous namespace
|
||||
|
||||
using namespace mozilla::loader;
|
||||
using mozilla::scache::StartupCache;
|
||||
|
||||
nsresult URLPreloader::CollectReports(nsIHandleReportCallback* aHandleReport,
|
||||
nsISupports* aData, bool aAnonymize) {
|
||||
|
@ -170,10 +168,6 @@ Result<nsCOMPtr<nsIFile>, nsresult> URLPreloader::GetCacheFile(
|
|||
static const uint8_t URL_MAGIC[] = "mozURLcachev002";
|
||||
|
||||
Result<nsCOMPtr<nsIFile>, nsresult> URLPreloader::FindCacheFile() {
|
||||
if (StartupCache::GetIgnoreDiskCache()) {
|
||||
return Err(NS_ERROR_ABORT);
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIFile> cacheFile;
|
||||
MOZ_TRY_VAR(cacheFile, GetCacheFile(u".bin"_ns));
|
||||
|
||||
|
|
|
@ -695,10 +695,6 @@ void StartupCache::IgnoreDiskCache() {
|
|||
if (gStartupCache) gStartupCache->InvalidateCache();
|
||||
}
|
||||
|
||||
bool StartupCache::GetIgnoreDiskCache() {
|
||||
return gIgnoreDiskCache;
|
||||
}
|
||||
|
||||
void StartupCache::WaitOnPrefetchThread() {
|
||||
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
|
||||
static void IgnoreDiskCache();
|
||||
|
||||
static bool GetIgnoreDiskCache();
|
||||
|
||||
// In DEBUG builds, returns a stream that will attempt to check for
|
||||
// and disallow multiple writes of the same object.
|
||||
nsresult GetDebugObjectOutputStream(nsIObjectOutputStream* aStream,
|
||||
|
|
|
@ -553,11 +553,6 @@ LastInteractionDuration:
|
|||
type: integer
|
||||
ping: true
|
||||
|
||||
LastStartupWasCrash:
|
||||
description: >
|
||||
True if the last startup was detected to have been a crash.
|
||||
type: boolean
|
||||
|
||||
MacMemoryPressure:
|
||||
description: >
|
||||
The current memory pressure state as provided by the macOS memory pressure
|
||||
|
@ -786,12 +781,6 @@ ShutdownProgress:
|
|||
type: string
|
||||
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:
|
||||
description: >
|
||||
If set to 1 then this crash occurred during startup.
|
||||
|
|
|
@ -3282,6 +3282,18 @@ static bool RemoveComponentRegistries(nsIFile* aProfileDir,
|
|||
aLocalProfileDir->Clone(getter_AddRefs(file));
|
||||
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);
|
||||
nsresult rv = file->Remove(true);
|
||||
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);
|
||||
|
||||
CrashReporter::AnnotateCrashReport(
|
||||
CrashReporter::Annotation::LastStartupWasCrash, lastStartupWasCrash);
|
||||
|
||||
if (CheckArg("purgecaches") || PR_GetEnv("MOZ_PURGE_CACHES") ||
|
||||
lastStartupWasCrash || gSafeMode) {
|
||||
cachesOK = false;
|
||||
}
|
||||
|
||||
CrashReporter::AnnotateCrashReport(
|
||||
CrashReporter::Annotation::StartupCacheValid, cachesOK && versionOK);
|
||||
|
||||
// Every time a profile is loaded by a build with a different version,
|
||||
// it updates the compatibility.ini file saying what version last wrote
|
||||
// the fastload caches. On subsequent launches if the version matches,
|
||||
|
|
Загрузка…
Ссылка в новой задаче