mirror of
https://github.com/roytam1/basilisk55.git
synced 2026-05-26 15:02:46 +00:00
ported from UXP: Issue #1877 - Resolve RELEASE_OR_BETA conditionals. (d4eac725)
this change also brings `ObjectOpResult.failSoft()` into js tree.
This commit is contained in:
@@ -108,11 +108,7 @@ pref("devtools.debugger.auto-pretty-print", false);
|
||||
pref("devtools.debugger.auto-black-box", true);
|
||||
pref("devtools.debugger.workers", false);
|
||||
|
||||
#ifdef RELEASE_OR_BETA
|
||||
pref("devtools.debugger.new-debugger-frontend", false);
|
||||
#else
|
||||
pref("devtools.debugger.new-debugger-frontend", true);
|
||||
#endif
|
||||
|
||||
// The default Debugger UI settings
|
||||
pref("devtools.debugger.ui.panes-workers-and-sources-width", 200);
|
||||
|
||||
@@ -1607,9 +1607,7 @@ nsWindowSH::NameStructEnabled(JSContext* aCx, nsGlobalWindow *aWin,
|
||||
OldBindingConstructorEnabled(nameStruct, aWin, aCx);
|
||||
}
|
||||
|
||||
#ifdef RELEASE_OR_BETA
|
||||
#define USE_CONTROLLERS_SHIM
|
||||
#endif
|
||||
|
||||
#ifdef USE_CONTROLLERS_SHIM
|
||||
static const JSClass ControllersShimClass = {
|
||||
|
||||
Vendored
-4
@@ -55,11 +55,7 @@ CacheWorkerHolder::RemoveActor(ActorChild* aActor)
|
||||
NS_ASSERT_OWNINGTHREAD(CacheWorkerHolder);
|
||||
MOZ_DIAGNOSTIC_ASSERT(aActor);
|
||||
|
||||
#if defined(RELEASE_OR_BETA)
|
||||
mActorList.RemoveElement(aActor);
|
||||
#else
|
||||
MOZ_DIAGNOSTIC_ASSERT(mActorList.RemoveElement(aActor));
|
||||
#endif
|
||||
|
||||
MOZ_ASSERT(!mActorList.Contains(aActor));
|
||||
}
|
||||
|
||||
Vendored
+3
-1
@@ -2554,12 +2554,14 @@ Migrate(mozIStorageConnection* aConn)
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(DEBUG) || !defined(RELEASE_OR_BETA)
|
||||
#if defined(DEBUG)
|
||||
int32_t lastVersion = currentVersion;
|
||||
#endif
|
||||
rv = aConn->GetSchemaVersion(¤tVersion);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) { return rv; }
|
||||
#if defined(DEBUG)
|
||||
MOZ_DIAGNOSTIC_ASSERT(currentVersion > lastVersion);
|
||||
#endif
|
||||
}
|
||||
|
||||
// Don't release assert this since people do sometimes share profiles
|
||||
|
||||
Vendored
+6
-2
@@ -1531,11 +1531,13 @@ Manager::ReleaseCacheId(CacheId aCacheId)
|
||||
NS_ASSERT_OWNINGTHREAD(Manager);
|
||||
for (uint32_t i = 0; i < mCacheIdRefs.Length(); ++i) {
|
||||
if (mCacheIdRefs[i].mCacheId == aCacheId) {
|
||||
#if defined(DEBUG) || !defined(RELEASE_OR_BETA)
|
||||
#if defined(DEBUG)
|
||||
uint32_t oldRef = mCacheIdRefs[i].mCount;
|
||||
#endif
|
||||
mCacheIdRefs[i].mCount -= 1;
|
||||
#if defined(DEBUG)
|
||||
MOZ_DIAGNOSTIC_ASSERT(mCacheIdRefs[i].mCount < oldRef);
|
||||
#endif
|
||||
if (mCacheIdRefs[i].mCount == 0) {
|
||||
bool orphaned = mCacheIdRefs[i].mOrphaned;
|
||||
mCacheIdRefs.RemoveElementAt(i);
|
||||
@@ -1582,11 +1584,13 @@ Manager::ReleaseBodyId(const nsID& aBodyId)
|
||||
NS_ASSERT_OWNINGTHREAD(Manager);
|
||||
for (uint32_t i = 0; i < mBodyIdRefs.Length(); ++i) {
|
||||
if (mBodyIdRefs[i].mBodyId == aBodyId) {
|
||||
#if defined(DEBUG) || !defined(RELEASE_OR_BETA)
|
||||
#if defined(DEBUG)
|
||||
uint32_t oldRef = mBodyIdRefs[i].mCount;
|
||||
#endif
|
||||
mBodyIdRefs[i].mCount -= 1;
|
||||
#if defined(DEBUG)
|
||||
MOZ_DIAGNOSTIC_ASSERT(mBodyIdRefs[i].mCount < oldRef);
|
||||
#endif
|
||||
if (mBodyIdRefs[i].mCount < 1) {
|
||||
bool orphaned = mBodyIdRefs[i].mOrphaned;
|
||||
mBodyIdRefs.RemoveElementAt(i);
|
||||
|
||||
Vendored
-6
@@ -490,12 +490,6 @@ ReadStream::Create(const CacheReadStream& aReadStream)
|
||||
nsCOMPtr<nsIInputStream> stream = DeserializeIPCStream(aReadStream.stream());
|
||||
MOZ_DIAGNOSTIC_ASSERT(stream);
|
||||
|
||||
// Currently we expect all cache read streams to be blocking file streams.
|
||||
#if !defined(RELEASE_OR_BETA)
|
||||
nsCOMPtr<nsIAsyncInputStream> asyncStream = do_QueryInterface(stream);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!asyncStream);
|
||||
#endif
|
||||
|
||||
RefPtr<Inner> inner = new Inner(control, aReadStream.id(), stream);
|
||||
RefPtr<ReadStream> ref = new ReadStream(inner);
|
||||
return ref.forget();
|
||||
|
||||
Vendored
+4
-2
@@ -45,7 +45,7 @@ void
|
||||
StreamControl::CloseReadStreams(const nsID& aId)
|
||||
{
|
||||
AssertOwningThread();
|
||||
#if defined(DEBUG) || !defined(RELEASE_OR_BETA)
|
||||
#if defined(DEBUG)
|
||||
uint32_t closedCount = 0;
|
||||
#endif
|
||||
|
||||
@@ -54,13 +54,15 @@ StreamControl::CloseReadStreams(const nsID& aId)
|
||||
RefPtr<ReadStream::Controllable> stream = iter.GetNext();
|
||||
if (stream->MatchId(aId)) {
|
||||
stream->CloseStream();
|
||||
#if defined(DEBUG) || !defined(RELEASE_OR_BETA)
|
||||
#if defined(DEBUG)
|
||||
closedCount += 1;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(DEBUG)
|
||||
MOZ_DIAGNOSTIC_ASSERT(closedCount > 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -375,10 +375,10 @@ void nsPluginTag::InitMime(const char* const* aMimeTypes,
|
||||
break;
|
||||
case nsPluginHost::eSpecialType_None:
|
||||
default:
|
||||
#ifndef RELEASE_OR_BETA
|
||||
// Allow async init for all plugins on Nightly and Aurora
|
||||
mSupportsAsyncInit = true;
|
||||
#endif
|
||||
// XXXMC: Async init for all plugins is experimental, but was historically
|
||||
// default-enabled here on Nightly and Aurora but not release.
|
||||
// Likely not a big concern. We can wait for plugins to be ready.
|
||||
mSupportsAsyncInit = false;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -333,9 +333,8 @@ Worklet::Worklet(nsPIDOMWindowInner* aWindow, nsIPrincipal* aPrincipal,
|
||||
MOZ_ASSERT(aWindow);
|
||||
MOZ_ASSERT(aPrincipal);
|
||||
|
||||
#ifdef RELEASE_OR_BETA
|
||||
// XXXMC: Do we want this worklet code in the future?
|
||||
MOZ_CRASH("This code should not go to release/beta yet!");
|
||||
#endif
|
||||
}
|
||||
|
||||
Worklet::~Worklet()
|
||||
|
||||
+3
-13
@@ -175,7 +175,7 @@ gfxFontCache::gfxFontCache()
|
||||
obs->AddObserver(new Observer, "memory-pressure", false);
|
||||
}
|
||||
|
||||
#ifndef RELEASE_OR_BETA
|
||||
#if 0
|
||||
// Currently disabled for release builds, due to unexplained crashes
|
||||
// during expiration; see bug 717175 & 894798.
|
||||
mWordCacheExpirationTimer = do_CreateInstance("@mozilla.org/timer;1");
|
||||
@@ -2579,22 +2579,12 @@ gfxFont::GetShapedWord(DrawTarget *aDrawTarget,
|
||||
Telemetry::Accumulate((isContent ? Telemetry::WORD_CACHE_HITS_CONTENT :
|
||||
Telemetry::WORD_CACHE_HITS_CHROME),
|
||||
aLength);
|
||||
#ifndef RELEASE_OR_BETA
|
||||
if (aTextPerf) {
|
||||
aTextPerf->current.wordCacheHit++;
|
||||
}
|
||||
#endif
|
||||
return sw;
|
||||
}
|
||||
|
||||
Telemetry::Accumulate((isContent ? Telemetry::WORD_CACHE_MISSES_CONTENT :
|
||||
Telemetry::WORD_CACHE_MISSES_CHROME),
|
||||
aLength);
|
||||
#ifndef RELEASE_OR_BETA
|
||||
if (aTextPerf) {
|
||||
aTextPerf->current.wordCacheMiss++;
|
||||
}
|
||||
#endif
|
||||
|
||||
sw = gfxShapedWord::Create(aText, aLength, aRunScript, aAppUnitsPerDevUnit,
|
||||
aFlags);
|
||||
@@ -2856,7 +2846,7 @@ gfxFont::ShapeTextWithoutWordCache(DrawTarget *aDrawTarget,
|
||||
return ok;
|
||||
}
|
||||
|
||||
#ifndef RELEASE_OR_BETA
|
||||
#ifdef DEBUG
|
||||
#define TEXT_PERF_INCR(tp, m) (tp ? (tp)->current.m++ : 0)
|
||||
#else
|
||||
#define TEXT_PERF_INCR(tp, m)
|
||||
@@ -2896,7 +2886,7 @@ gfxFont::SplitAndInitTextRun(DrawTarget *aDrawTarget,
|
||||
|
||||
gfxTextPerfMetrics *tp = nullptr;
|
||||
|
||||
#ifndef RELEASE_OR_BETA
|
||||
#ifdef DEBUG
|
||||
tp = aTextRun->GetFontGroup()->GetTextPerfMetrics();
|
||||
if (tp) {
|
||||
if (mStyle.systemFont) {
|
||||
|
||||
@@ -355,12 +355,9 @@ private:
|
||||
#if defined(ANDROID)
|
||||
DECL_GFX_PREF(Once, "gfx.apitrace.enabled", UseApitrace, bool, false);
|
||||
#endif
|
||||
#if defined(RELEASE_OR_BETA)
|
||||
// "Skip" means this is locked to the default value in beta and release.
|
||||
DECL_GFX_PREF(Skip, "gfx.blocklist.all", BlocklistAll, int32_t, 0);
|
||||
#else
|
||||
// Tweaking/debug pref: -1 = ignore active blocklist entry, 0 = normal, 1 = block all features
|
||||
DECL_GFX_PREF(Once, "gfx.blocklist.all", BlocklistAll, int32_t, 0);
|
||||
#endif
|
||||
|
||||
DECL_GFX_PREF(Live, "gfx.canvas.auto_accelerate.min_calls", CanvasAutoAccelerateMinCalls, int32_t, 4);
|
||||
DECL_GFX_PREF(Live, "gfx.canvas.auto_accelerate.min_frames", CanvasAutoAccelerateMinFrames, int32_t, 30);
|
||||
DECL_GFX_PREF(Live, "gfx.canvas.auto_accelerate.min_seconds", CanvasAutoAccelerateMinSeconds, float, 5.0f);
|
||||
|
||||
@@ -152,7 +152,7 @@ gfxTextRun::gfxTextRun(const gfxTextRunFactory::Parameters *aParams,
|
||||
NS_ASSERTION(mAppUnitsPerDevUnit > 0, "Invalid app unit scale");
|
||||
NS_ADDREF(mFontGroup);
|
||||
|
||||
#ifndef RELEASE_OR_BETA
|
||||
#ifdef DEBUG
|
||||
gfxTextPerfMetrics *tp = aFontGroup->GetTextPerfMetrics();
|
||||
if (tp) {
|
||||
tp->current.textrunConst++;
|
||||
@@ -186,7 +186,7 @@ gfxTextRun::~gfxTextRun()
|
||||
// been told to release its reference to the group, so we mustn't do that
|
||||
// again here.
|
||||
if (!mReleasedFontGroup) {
|
||||
#ifndef RELEASE_OR_BETA
|
||||
#ifdef DEBUG
|
||||
gfxTextPerfMetrics *tp = mFontGroup->GetTextPerfMetrics();
|
||||
if (tp) {
|
||||
tp->current.textrunDestr++;
|
||||
@@ -2939,7 +2939,7 @@ void gfxFontGroup::ComputeRanges(nsTArray<gfxTextRange>& aRanges,
|
||||
FindFontForChar(ch, prevCh, nextCh, aRunScript, prevFont,
|
||||
&matchType);
|
||||
|
||||
#ifndef RELEASE_OR_BETA
|
||||
#ifdef DEBUG
|
||||
if (MOZ_UNLIKELY(mTextPerf)) {
|
||||
if (matchType == gfxTextRange::kPrefsFallback) {
|
||||
mTextPerf->current.fallbackPrefs++;
|
||||
@@ -2998,7 +2998,7 @@ void gfxFontGroup::ComputeRanges(nsTArray<gfxTextRange>& aRanges,
|
||||
|
||||
aRanges[lastRangeIndex].end = aLength;
|
||||
|
||||
#ifndef RELEASE_OR_BETA
|
||||
#ifdef DEBUG
|
||||
LogModule* log = mStyle.systemFont
|
||||
? gfxPlatform::GetLog(eGfxLog_textrunui)
|
||||
: gfxPlatform::GetLog(eGfxLog_textrun);
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "mozilla/ipc/Faulty.h"
|
||||
#endif
|
||||
|
||||
#if !defined(RELEASE_OR_BETA) || defined(DEBUG)
|
||||
#if defined(DEBUG)
|
||||
#define MOZ_PICKLE_SENTINEL_CHECKING
|
||||
#endif
|
||||
|
||||
|
||||
@@ -46,11 +46,7 @@
|
||||
#include "nsXPCOMPrivate.h"
|
||||
#include "prthread.h"
|
||||
|
||||
#ifdef RELEASE_OR_BETA
|
||||
#define THREADSAFETY_ASSERT MOZ_ASSERT
|
||||
#else
|
||||
#define THREADSAFETY_ASSERT MOZ_RELEASE_ASSERT
|
||||
#endif
|
||||
|
||||
#define CRASH_IN_CHILD_PROCESS(_msg) \
|
||||
do { \
|
||||
@@ -332,7 +328,7 @@ class ChildImpl final : public BackgroundChildImpl
|
||||
// create the background thread after application shutdown has started.
|
||||
static bool sShutdownHasStarted;
|
||||
|
||||
#if defined(DEBUG) || !defined(RELEASE_OR_BETA)
|
||||
#if defined(DEBUG)
|
||||
nsIThread* mBoundThread;
|
||||
#endif
|
||||
|
||||
@@ -352,11 +348,7 @@ public:
|
||||
{
|
||||
THREADSAFETY_ASSERT(mBoundThread);
|
||||
|
||||
#ifdef RELEASE_OR_BETA
|
||||
DebugOnly<bool> current;
|
||||
#else
|
||||
bool current;
|
||||
#endif
|
||||
THREADSAFETY_ASSERT(
|
||||
NS_SUCCEEDED(mBoundThread->IsOnCurrentThread(¤t)));
|
||||
THREADSAFETY_ASSERT(current);
|
||||
@@ -369,7 +361,7 @@ public:
|
||||
}
|
||||
|
||||
ChildImpl()
|
||||
#if defined(DEBUG) || !defined(RELEASE_OR_BETA)
|
||||
#if defined(DEBUG)
|
||||
: mBoundThread(nullptr)
|
||||
#endif
|
||||
#ifdef DEBUG
|
||||
@@ -450,7 +442,7 @@ private:
|
||||
{
|
||||
THREADSAFETY_ASSERT(!mBoundThread);
|
||||
|
||||
#if defined(DEBUG) || !defined(RELEASE_OR_BETA)
|
||||
#if defined(DEBUG)
|
||||
mBoundThread = NS_GetCurrentThread();
|
||||
#endif
|
||||
|
||||
|
||||
+26
-2
@@ -132,16 +132,24 @@ class ObjectOpResult
|
||||
Uninitialized = uintptr_t(-1)
|
||||
};
|
||||
|
||||
static const uintptr_t SoftFailBit = uintptr_t(1) << (sizeof(uintptr_t) * 8 - 1);
|
||||
|
||||
ObjectOpResult() : code_(Uninitialized) {}
|
||||
|
||||
/* Return true if succeed() was called. */
|
||||
/* Return true if succeed() or failSoft() was called. */
|
||||
bool ok() const {
|
||||
MOZ_ASSERT(code_ != Uninitialized);
|
||||
return code_ == OkCode;
|
||||
return code_ == OkCode || (code_ & SoftFailBit);
|
||||
}
|
||||
|
||||
explicit operator bool() const { return ok(); }
|
||||
|
||||
/* Return true if succeed() was called. */
|
||||
bool confirmOk() const {
|
||||
MOZ_ASSERT(code_ != Uninitialized);
|
||||
return code_ == OkCode;
|
||||
}
|
||||
|
||||
/* Set this ObjectOpResult to true and return true. */
|
||||
bool succeed() {
|
||||
code_ = OkCode;
|
||||
@@ -161,10 +169,26 @@ class ObjectOpResult
|
||||
*/
|
||||
bool fail(uint32_t msg) {
|
||||
MOZ_ASSERT(msg != OkCode);
|
||||
MOZ_ASSERT((msg & SoftFailBit) == 0);
|
||||
code_ = msg;
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
* DEPRECATED: This is a non-standard compatibility hack.
|
||||
*
|
||||
* Set this ObjectOpResult to true, but remembers an error code.
|
||||
* This is used for situations where we really want to fail,
|
||||
* but can't for legacy reasons.
|
||||
*
|
||||
* Always returns true, as a convenience.
|
||||
*/
|
||||
bool failSoft(uint32_t msg) {
|
||||
// The msg code is currently never extracted again.
|
||||
code_ = msg | SoftFailBit;
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(bool) failCantRedefineProp();
|
||||
JS_PUBLIC_API(bool) failReadOnly();
|
||||
JS_PUBLIC_API(bool) failGetterOnly();
|
||||
|
||||
@@ -44,7 +44,7 @@ Reflect_defineProperty(JSContext* cx, unsigned argc, Value* vp)
|
||||
ObjectOpResult result;
|
||||
if (!DefineProperty(cx, obj, key, desc, result))
|
||||
return false;
|
||||
args.rval().setBoolean(bool(result));
|
||||
args.rval().setBoolean(result.confirmOk());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ Reflect_deleteProperty(JSContext* cx, unsigned argc, Value* vp)
|
||||
ObjectOpResult result;
|
||||
if (!DeleteProperty(cx, target, key, result))
|
||||
return false;
|
||||
args.rval().setBoolean(bool(result));
|
||||
args.rval().setBoolean(result.confirmOk());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ Reflect_preventExtensions(JSContext* cx, unsigned argc, Value* vp)
|
||||
ObjectOpResult result;
|
||||
if (!PreventExtensions(cx, target, result))
|
||||
return false;
|
||||
args.rval().setBoolean(bool(result));
|
||||
args.rval().setBoolean(result.confirmOk());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -207,7 +207,7 @@ Reflect_set(JSContext* cx, unsigned argc, Value* vp)
|
||||
RootedValue value(cx, args.get(2));
|
||||
if (!SetProperty(cx, target, key, value, receiver, result))
|
||||
return false;
|
||||
args.rval().setBoolean(bool(result));
|
||||
args.rval().setBoolean(result.confirmOk());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -240,7 +240,7 @@ Reflect_setPrototypeOf(JSContext* cx, unsigned argc, Value* vp)
|
||||
ObjectOpResult result;
|
||||
if (!SetPrototype(cx, obj, proto, result))
|
||||
return false;
|
||||
args.rval().setBoolean(bool(result));
|
||||
args.rval().setBoolean(result.confirmOk());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -123,11 +123,7 @@ GetBuildConfiguration(JSContext* cx, unsigned argc, Value* vp)
|
||||
if (!JS_SetProperty(cx, info, "debug", value))
|
||||
return false;
|
||||
|
||||
#ifdef RELEASE_OR_BETA
|
||||
value = BooleanValue(true);
|
||||
#else
|
||||
value = BooleanValue(false);
|
||||
#endif
|
||||
if (!JS_SetProperty(cx, info, "release_or_beta", value))
|
||||
return false;
|
||||
|
||||
|
||||
+1
-5
@@ -147,13 +147,9 @@ static const size_t gMaxStackSize = 128 * sizeof(size_t) * 1024;
|
||||
*/
|
||||
static const double MAX_TIMEOUT_SECONDS = 1800.0;
|
||||
|
||||
// SharedArrayBuffer and Atomics settings track Firefox. Choose a custom setting
|
||||
// SharedArrayBuffer and Atomics settings track browser. Choose a custom setting
|
||||
// with --shared-memory={on,off}.
|
||||
#ifndef RELEASE_OR_BETA
|
||||
# define SHARED_MEMORY_DEFAULT 1
|
||||
#else
|
||||
# define SHARED_MEMORY_DEFAULT 0
|
||||
#endif
|
||||
|
||||
using JobQueue = GCVector<JSObject*, 0, SystemAllocPolicy>;
|
||||
|
||||
|
||||
@@ -98,9 +98,6 @@ DEFINES['HAVE_AV_CONFIG_H'] = True
|
||||
if CONFIG['MOZ_DEBUG']:
|
||||
# Enable all assertions in debug builds.
|
||||
DEFINES['ASSERT_LEVEL'] = 2
|
||||
elif not CONFIG['RELEASE_OR_BETA']:
|
||||
# Enable fast assertions in opt builds of Nightly and Aurora.
|
||||
DEFINES['ASSERT_LEVEL'] = 1
|
||||
|
||||
# clang-cl's <intrin.h> doesn't work the same as MSVC's. For details, see:
|
||||
#
|
||||
|
||||
@@ -69,8 +69,5 @@ ALLOW_COMPILER_WARNINGS = True
|
||||
if CONFIG['MOZ_DEBUG']:
|
||||
# Enable all assertions in debug builds.
|
||||
DEFINES['ASSERT_LEVEL'] = 2
|
||||
elif not CONFIG['RELEASE_OR_BETA']:
|
||||
# Enable fast assertions in opt builds of Nightly and Aurora.
|
||||
DEFINES['ASSERT_LEVEL'] = 1
|
||||
|
||||
include("libavcommon.mozbuild")
|
||||
|
||||
+1
-5
@@ -444,11 +444,7 @@ struct AssertionConditionType
|
||||
# define MOZ_ASSERT(...) do { } while (0)
|
||||
#endif /* DEBUG */
|
||||
|
||||
#ifdef RELEASE_OR_BETA
|
||||
# define MOZ_DIAGNOSTIC_ASSERT MOZ_ASSERT
|
||||
#else
|
||||
# define MOZ_DIAGNOSTIC_ASSERT MOZ_RELEASE_ASSERT
|
||||
#endif
|
||||
#define MOZ_DIAGNOSTIC_ASSERT MOZ_ASSERT
|
||||
|
||||
/*
|
||||
* MOZ_ASSERT_IF(cond1, cond2) is equivalent to MOZ_ASSERT(cond2) if cond1 is
|
||||
|
||||
@@ -94,11 +94,7 @@ pref("security.pki.sha1_enforcement_level", 3);
|
||||
// 2: fall back to the subject common name for certificates valid before 23
|
||||
// August 2015 if necessary
|
||||
// 3: only use name information from the subject alternative name extension
|
||||
#ifdef RELEASE_OR_BETA
|
||||
pref("security.pki.name_matching_mode", 1);
|
||||
#else
|
||||
pref("security.pki.name_matching_mode", 2);
|
||||
#endif
|
||||
|
||||
// security.pki.netscape_step_up_policy controls how the platform handles the
|
||||
// id-Netscape-stepUp OID in extended key usage extensions of CA certificates.
|
||||
@@ -106,11 +102,7 @@ pref("security.pki.name_matching_mode", 2);
|
||||
// 1: it is considered equivalent when the notBefore is before 23 August 2016
|
||||
// 2: similarly, but for 23 August 2015
|
||||
// 3: it is never considered equivalent
|
||||
#ifdef RELEASE_OR_BETA
|
||||
pref("security.pki.netscape_step_up_policy", 1);
|
||||
#else
|
||||
pref("security.pki.netscape_step_up_policy", 2);
|
||||
#endif
|
||||
|
||||
// Configures Certificate Transparency support mode:
|
||||
// 0: Fully disabled.
|
||||
@@ -152,17 +144,10 @@ pref("security.tls.hello_downgrade_check", true);
|
||||
// HSTS Priming
|
||||
// If a request is mixed-content, send an HSTS priming request to attempt to
|
||||
// see if it is available over HTTPS.
|
||||
#ifdef RELEASE_OR_BETA
|
||||
// Don't change the order of evaluation of mixed-content and HSTS upgrades in
|
||||
// order to be most compatible with current standards
|
||||
pref("security.mixed_content.send_hsts_priming", false);
|
||||
pref("security.mixed_content.use_hsts", false);
|
||||
#else
|
||||
// Change the order of evaluation so HSTS upgrades happen before
|
||||
// mixed-content blocking
|
||||
pref("security.mixed_content.send_hsts_priming", true);
|
||||
pref("security.mixed_content.use_hsts", true);
|
||||
#endif
|
||||
// Approximately 1 week default cache for HSTS priming failures, in seconds
|
||||
pref ("security.mixed_content.hsts_priming_cache_timeout", 10080);
|
||||
// Force the channel to timeout in 3 seconds if we have not received
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set sw=2 ts=8 et tw=80 : */
|
||||
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
@@ -143,11 +141,11 @@ GetRequestingPrincipal(const FTPChannelCreationArgs& aArgs)
|
||||
|
||||
// Bug 1289001 - If GetValidatedOriginAttributes returns an error string, that
|
||||
// usually leads to a content crash with very little info about the cause.
|
||||
// We prefer to crash on the parent, so we get the reason in the crash report.
|
||||
// We prefer to crash on the parent.
|
||||
static MOZ_COLD
|
||||
void CrashWithReason(const char * reason)
|
||||
{
|
||||
#ifndef RELEASE_OR_BETA
|
||||
#ifdef DEBUG
|
||||
MOZ_CRASH_UNSAFE_OOL(reason);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1003,11 +1003,8 @@ nsXULAppInfo::GetLastRunCrashID(nsAString &aLastRunCrashID)
|
||||
NS_IMETHODIMP
|
||||
nsXULAppInfo::GetIsReleaseOrBeta(bool* aResult)
|
||||
{
|
||||
#ifdef RELEASE_OR_BETA
|
||||
// Unused; always returns true.
|
||||
*aResult = true;
|
||||
#else
|
||||
*aResult = false;
|
||||
#endif
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -260,14 +260,14 @@ class IOInterposerInit
|
||||
public:
|
||||
IOInterposerInit()
|
||||
{
|
||||
#if !defined(RELEASE_OR_BETA)
|
||||
#ifdef DEBUG
|
||||
IOInterposer::Init();
|
||||
#endif
|
||||
}
|
||||
|
||||
~IOInterposerInit()
|
||||
{
|
||||
#if !defined(RELEASE_OR_BETA)
|
||||
#ifdef DEBUG
|
||||
IOInterposer::Clear();
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -150,7 +150,8 @@ interface nsIXULRuntime : nsISupports
|
||||
readonly attribute DOMString lastRunCrashID;
|
||||
|
||||
/**
|
||||
* True if this is RELEASE_OR_BETA.
|
||||
* True if this is explicitly flagged as release or beta at build time.
|
||||
* Currently unused.
|
||||
*/
|
||||
readonly attribute boolean isReleaseOrBeta;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user