Issue #1877 - Resolve RELEASE_OR_BETA conditionals.

This commit is contained in:
Moonchild 2022-02-04 01:44:41 +00:00 • committed by roytam1
commit d4eac725fd
30 changed files with 75 additions and 144 deletions

View file

@ -98,11 +98,7 @@ pref("devtools.debugger.auto-pretty-print", false);
pref("devtools.debugger.auto-black-box", true); pref("devtools.debugger.auto-black-box", true);
pref("devtools.debugger.workers", false); pref("devtools.debugger.workers", false);
#ifdef RELEASE_OR_BETA
pref("devtools.debugger.new-debugger-frontend", false); pref("devtools.debugger.new-debugger-frontend", false);
#else
pref("devtools.debugger.new-debugger-frontend", true);
#endif
// The default Debugger UI settings // The default Debugger UI settings
pref("devtools.debugger.ui.panes-workers-and-sources-width", 200); pref("devtools.debugger.ui.panes-workers-and-sources-width", 200);

View file

@ -1702,9 +1702,7 @@ nsWindowSH::NameStructEnabled(JSContext* aCx, nsGlobalWindow *aWin,
OldBindingConstructorEnabled(nameStruct, aWin, aCx); OldBindingConstructorEnabled(nameStruct, aWin, aCx);
} }
#ifdef RELEASE_OR_BETA
#define USE_CONTROLLERS_SHIM #define USE_CONTROLLERS_SHIM
#endif
#ifdef USE_CONTROLLERS_SHIM #ifdef USE_CONTROLLERS_SHIM
static const JSClass ControllersShimClass = { static const JSClass ControllersShimClass = {

View file

@ -1118,9 +1118,6 @@ nsOuterWindowProxy::getOwnPropertyDescriptor(JSContext* cx,
} }
// else fall through to js::Wrapper // else fall through to js::Wrapper
// When we change this to always claim the property is configurable (bug
// 1178639), update the comments in nsOuterWindowProxy::defineProperty
// accordingly.
return js::Wrapper::getOwnPropertyDescriptor(cx, proxy, id, desc); return js::Wrapper::getOwnPropertyDescriptor(cx, proxy, id, desc);
} }
@ -1138,29 +1135,6 @@ nsOuterWindowProxy::defineProperty(JSContext* cx,
return result.failCantDefineWindowElement(); return result.failCantDefineWindowElement();
} }
#ifndef RELEASE_OR_BETA // To be turned on in bug 1178638.
// For now, allow chrome code to define non-configurable properties
// on windows, until we sort out what exactly the addon SDK is
// doing. In the meantime, this still allows us to test web compat
// behavior.
if (desc.hasConfigurable() && !desc.configurable() &&
!nsContentUtils::IsCallerChrome()) {
return ThrowErrorMessage(cx, MSG_DEFINE_NON_CONFIGURABLE_PROP_ON_WINDOW);
}
// Note that if hasConfigurable() is false we do NOT want to
// setConfigurable(true). That would make this code:
//
// var x;
// window.x = 5;
//
// fail, because the JS engine ends up converting the assignment into a define
// with !hasConfigurable(), but the var actually declared a non-configurable
// property on our underlying Window object, so the set would fail if we
// forced setConfigurable(true) here. What we want to do instead is change
// getOwnPropertyDescriptor to always claim configurable. See bug 1178639.
#endif
return js::Wrapper::defineProperty(cx, proxy, id, desc, result); return js::Wrapper::defineProperty(cx, proxy, id, desc, result);
} }

View file

@ -54,11 +54,7 @@ CacheWorkerHolder::RemoveActor(ActorChild* aActor)
NS_ASSERT_OWNINGTHREAD(CacheWorkerHolder); NS_ASSERT_OWNINGTHREAD(CacheWorkerHolder);
MOZ_DIAGNOSTIC_ASSERT(aActor); MOZ_DIAGNOSTIC_ASSERT(aActor);
#if defined(RELEASE_OR_BETA)
mActorList.RemoveElement(aActor); mActorList.RemoveElement(aActor);
#else
MOZ_DIAGNOSTIC_ASSERT(mActorList.RemoveElement(aActor));
#endif
MOZ_ASSERT(!mActorList.Contains(aActor)); MOZ_ASSERT(!mActorList.Contains(aActor));
} }

View file

@ -2550,12 +2550,14 @@ Migrate(mozIStorageConnection* aConn)
} }
} }
#if defined(DEBUG) || !defined(RELEASE_OR_BETA) #if defined(DEBUG)
int32_t lastVersion = currentVersion; int32_t lastVersion = currentVersion;
#endif #endif
rv = aConn->GetSchemaVersion(&currentVersion); rv = aConn->GetSchemaVersion(&currentVersion);
if (NS_WARN_IF(NS_FAILED(rv))) { return rv; } if (NS_WARN_IF(NS_FAILED(rv))) { return rv; }
#if defined(DEBUG)
MOZ_DIAGNOSTIC_ASSERT(currentVersion > lastVersion); MOZ_DIAGNOSTIC_ASSERT(currentVersion > lastVersion);
#endif
} }
MOZ_DIAGNOSTIC_ASSERT(currentVersion == kLatestSchemaVersion); MOZ_DIAGNOSTIC_ASSERT(currentVersion == kLatestSchemaVersion);

View file

@ -1525,11 +1525,13 @@ Manager::ReleaseCacheId(CacheId aCacheId)
NS_ASSERT_OWNINGTHREAD(Manager); NS_ASSERT_OWNINGTHREAD(Manager);
for (uint32_t i = 0; i < mCacheIdRefs.Length(); ++i) { for (uint32_t i = 0; i < mCacheIdRefs.Length(); ++i) {
if (mCacheIdRefs[i].mCacheId == aCacheId) { if (mCacheIdRefs[i].mCacheId == aCacheId) {
#if defined(DEBUG) || !defined(RELEASE_OR_BETA) #if defined(DEBUG)
uint32_t oldRef = mCacheIdRefs[i].mCount; uint32_t oldRef = mCacheIdRefs[i].mCount;
#endif #endif
mCacheIdRefs[i].mCount -= 1; mCacheIdRefs[i].mCount -= 1;
#if defined(DEBUG)
MOZ_DIAGNOSTIC_ASSERT(mCacheIdRefs[i].mCount < oldRef); MOZ_DIAGNOSTIC_ASSERT(mCacheIdRefs[i].mCount < oldRef);
#endif
if (mCacheIdRefs[i].mCount == 0) { if (mCacheIdRefs[i].mCount == 0) {
bool orphaned = mCacheIdRefs[i].mOrphaned; bool orphaned = mCacheIdRefs[i].mOrphaned;
mCacheIdRefs.RemoveElementAt(i); mCacheIdRefs.RemoveElementAt(i);
@ -1576,11 +1578,13 @@ Manager::ReleaseBodyId(const nsID& aBodyId)
NS_ASSERT_OWNINGTHREAD(Manager); NS_ASSERT_OWNINGTHREAD(Manager);
for (uint32_t i = 0; i < mBodyIdRefs.Length(); ++i) { for (uint32_t i = 0; i < mBodyIdRefs.Length(); ++i) {
if (mBodyIdRefs[i].mBodyId == aBodyId) { if (mBodyIdRefs[i].mBodyId == aBodyId) {
#if defined(DEBUG) || !defined(RELEASE_OR_BETA) #if defined(DEBUG)
uint32_t oldRef = mBodyIdRefs[i].mCount; uint32_t oldRef = mBodyIdRefs[i].mCount;
#endif #endif
mBodyIdRefs[i].mCount -= 1; mBodyIdRefs[i].mCount -= 1;
#if defined(DEBUG)
MOZ_DIAGNOSTIC_ASSERT(mBodyIdRefs[i].mCount < oldRef); MOZ_DIAGNOSTIC_ASSERT(mBodyIdRefs[i].mCount < oldRef);
#endif
if (mBodyIdRefs[i].mCount < 1) { if (mBodyIdRefs[i].mCount < 1) {
bool orphaned = mBodyIdRefs[i].mOrphaned; bool orphaned = mBodyIdRefs[i].mOrphaned;
mBodyIdRefs.RemoveElementAt(i); mBodyIdRefs.RemoveElementAt(i);

View file

@ -489,12 +489,6 @@ ReadStream::Create(const CacheReadStream& aReadStream)
nsCOMPtr<nsIInputStream> stream = DeserializeIPCStream(aReadStream.stream()); nsCOMPtr<nsIInputStream> stream = DeserializeIPCStream(aReadStream.stream());
MOZ_DIAGNOSTIC_ASSERT(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<Inner> inner = new Inner(control, aReadStream.id(), stream);
RefPtr<ReadStream> ref = new ReadStream(inner); RefPtr<ReadStream> ref = new ReadStream(inner);
return ref.forget(); return ref.forget();

View file

@ -44,7 +44,7 @@ void
StreamControl::CloseReadStreams(const nsID& aId) StreamControl::CloseReadStreams(const nsID& aId)
{ {
AssertOwningThread(); AssertOwningThread();
#if defined(DEBUG) || !defined(RELEASE_OR_BETA) #if defined(DEBUG)
uint32_t closedCount = 0; uint32_t closedCount = 0;
#endif #endif
@ -53,13 +53,15 @@ StreamControl::CloseReadStreams(const nsID& aId)
RefPtr<ReadStream::Controllable> stream = iter.GetNext(); RefPtr<ReadStream::Controllable> stream = iter.GetNext();
if (stream->MatchId(aId)) { if (stream->MatchId(aId)) {
stream->CloseStream(); stream->CloseStream();
#if defined(DEBUG) || !defined(RELEASE_OR_BETA) #if defined(DEBUG)
closedCount += 1; closedCount += 1;
#endif #endif
} }
} }
#if defined(DEBUG)
MOZ_DIAGNOSTIC_ASSERT(closedCount > 0); MOZ_DIAGNOSTIC_ASSERT(closedCount > 0);
#endif
} }
void void

View file

@ -375,10 +375,10 @@ void nsPluginTag::InitMime(const char* const* aMimeTypes,
break; break;
case nsPluginHost::eSpecialType_None: case nsPluginHost::eSpecialType_None:
default: default:
#ifndef RELEASE_OR_BETA // XXXMC: Async init for all plugins is experimental, but was historically
// Allow async init for all plugins on Nightly and Aurora // default-enabled here on Nightly and Aurora but not release.
mSupportsAsyncInit = true; // Likely not a big concern. We can wait for plugins to be ready.
#endif mSupportsAsyncInit = false;
break; break;
} }

View file

@ -328,9 +328,8 @@ Worklet::Worklet(nsPIDOMWindowInner* aWindow, nsIPrincipal* aPrincipal)
MOZ_ASSERT(aWindow); MOZ_ASSERT(aWindow);
MOZ_ASSERT(aPrincipal); 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!"); MOZ_CRASH("This code should not go to release/beta yet!");
#endif
} }
Worklet::~Worklet() Worklet::~Worklet()

View file

@ -50,20 +50,9 @@ gfxFont::GetShapedWord(DrawTarget *aDrawTarget,
if (sw) { if (sw) {
sw->ResetAge(); sw->ResetAge();
#ifndef RELEASE_OR_BETA
if (aTextPerf) {
aTextPerf->current.wordCacheHit++;
}
#endif
return sw; return sw;
} }
#ifndef RELEASE_OR_BETA
if (aTextPerf) {
aTextPerf->current.wordCacheMiss++;
}
#endif
sw = gfxShapedWord::Create(aText, aLength, aRunScript, aAppUnitsPerDevUnit, sw = gfxShapedWord::Create(aText, aLength, aRunScript, aAppUnitsPerDevUnit,
aFlags); aFlags);
entry->mShapedWord.reset(sw); entry->mShapedWord.reset(sw);

View file

@ -180,7 +180,7 @@ gfxFontCache::gfxFontCache()
obs->AddObserver(new Observer, "memory-pressure", false); obs->AddObserver(new Observer, "memory-pressure", false);
} }
#ifndef RELEASE_OR_BETA #if 0
// Currently disabled for release builds, due to unexplained crashes // Currently disabled for release builds, due to unexplained crashes
// during expiration; see bug 717175 & 894798. // during expiration; see bug 717175 & 894798.
mWordCacheExpirationTimer = do_CreateInstance("@mozilla.org/timer;1"); mWordCacheExpirationTimer = do_CreateInstance("@mozilla.org/timer;1");
@ -2786,7 +2786,7 @@ gfxFont::ShapeTextWithoutWordCache(DrawTarget *aDrawTarget,
return ok; return ok;
} }
#ifndef RELEASE_OR_BETA #ifdef DEBUG
#define TEXT_PERF_INCR(tp, m) (tp ? (tp)->current.m++ : 0) #define TEXT_PERF_INCR(tp, m) (tp ? (tp)->current.m++ : 0)
#else #else
#define TEXT_PERF_INCR(tp, m) #define TEXT_PERF_INCR(tp, m)
@ -2826,7 +2826,7 @@ gfxFont::SplitAndInitTextRun(DrawTarget *aDrawTarget,
gfxTextPerfMetrics *tp = nullptr; gfxTextPerfMetrics *tp = nullptr;
#ifndef RELEASE_OR_BETA #ifdef DEBUG
tp = aTextRun->GetFontGroup()->GetTextPerfMetrics(); tp = aTextRun->GetFontGroup()->GetTextPerfMetrics();
if (tp) { if (tp) {
if (mStyle.systemFont) { if (mStyle.systemFont) {

View file

@ -352,12 +352,9 @@ private:
#if defined(ANDROID) #if defined(ANDROID)
DECL_GFX_PREF(Once, "gfx.apitrace.enabled", UseApitrace, bool, false); DECL_GFX_PREF(Once, "gfx.apitrace.enabled", UseApitrace, bool, false);
#endif #endif
#if defined(RELEASE_OR_BETA) // Tweaking/debug pref: -1 = ignore active blocklist entry, 0 = normal, 1 = block all features
// "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
DECL_GFX_PREF(Once, "gfx.blocklist.all", BlocklistAll, int32_t, 0); 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_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_frames", CanvasAutoAccelerateMinFrames, int32_t, 30);
DECL_GFX_PREF(Live, "gfx.canvas.auto_accelerate.min_seconds", CanvasAutoAccelerateMinSeconds, float, 5.0f); DECL_GFX_PREF(Live, "gfx.canvas.auto_accelerate.min_seconds", CanvasAutoAccelerateMinSeconds, float, 5.0f);

View file

@ -158,7 +158,7 @@ gfxTextRun::gfxTextRun(const gfxTextRunFactory::Parameters *aParams,
MOZ_COUNT_CTOR(gfxTextRun); MOZ_COUNT_CTOR(gfxTextRun);
NS_ADDREF(mFontGroup); NS_ADDREF(mFontGroup);
#ifndef RELEASE_OR_BETA #ifdef DEBUG
gfxTextPerfMetrics *tp = aFontGroup->GetTextPerfMetrics(); gfxTextPerfMetrics *tp = aFontGroup->GetTextPerfMetrics();
if (tp) { if (tp) {
tp->current.textrunConst++; tp->current.textrunConst++;
@ -192,7 +192,7 @@ gfxTextRun::~gfxTextRun()
// been told to release its reference to the group, so we mustn't do that // been told to release its reference to the group, so we mustn't do that
// again here. // again here.
if (!mReleasedFontGroup) { if (!mReleasedFontGroup) {
#ifndef RELEASE_OR_BETA #ifdef DEBUG
gfxTextPerfMetrics *tp = mFontGroup->GetTextPerfMetrics(); gfxTextPerfMetrics *tp = mFontGroup->GetTextPerfMetrics();
if (tp) { if (tp) {
tp->current.textrunDestr++; tp->current.textrunDestr++;
@ -2931,7 +2931,7 @@ void gfxFontGroup::ComputeRanges(nsTArray<gfxTextRange>& aRanges,
FindFontForChar(ch, prevCh, nextCh, aRunScript, prevFont, FindFontForChar(ch, prevCh, nextCh, aRunScript, prevFont,
&matchType); &matchType);
#ifndef RELEASE_OR_BETA #ifdef DEBUG
if (MOZ_UNLIKELY(mTextPerf)) { if (MOZ_UNLIKELY(mTextPerf)) {
if (matchType == gfxTextRange::kPrefsFallback) { if (matchType == gfxTextRange::kPrefsFallback) {
mTextPerf->current.fallbackPrefs++; mTextPerf->current.fallbackPrefs++;
@ -2990,7 +2990,7 @@ void gfxFontGroup::ComputeRanges(nsTArray<gfxTextRange>& aRanges,
aRanges[lastRangeIndex].end = aLength; aRanges[lastRangeIndex].end = aLength;
#ifndef RELEASE_OR_BETA #ifdef DEBUG
LogModule* log = mStyle.systemFont LogModule* log = mStyle.systemFont
? gfxPlatform::GetLog(eGfxLog_textrunui) ? gfxPlatform::GetLog(eGfxLog_textrunui)
: gfxPlatform::GetLog(eGfxLog_textrun); : gfxPlatform::GetLog(eGfxLog_textrun);

View file

@ -21,7 +21,7 @@
#include "mozilla/ipc/Faulty.h" #include "mozilla/ipc/Faulty.h"
#endif #endif
#if !defined(RELEASE_OR_BETA) || defined(DEBUG) #if defined(DEBUG)
#define MOZ_PICKLE_SENTINEL_CHECKING #define MOZ_PICKLE_SENTINEL_CHECKING
#endif #endif

View file

@ -45,11 +45,7 @@
#include "nsXPCOMPrivate.h" #include "nsXPCOMPrivate.h"
#include "prthread.h" #include "prthread.h"
#ifdef RELEASE_OR_BETA
#define THREADSAFETY_ASSERT MOZ_ASSERT #define THREADSAFETY_ASSERT MOZ_ASSERT
#else
#define THREADSAFETY_ASSERT MOZ_RELEASE_ASSERT
#endif
#define CRASH_IN_CHILD_PROCESS(_msg) \ #define CRASH_IN_CHILD_PROCESS(_msg) \
do { \ do { \
@ -331,7 +327,7 @@ class ChildImpl final : public BackgroundChildImpl
// create the background thread after application shutdown has started. // create the background thread after application shutdown has started.
static bool sShutdownHasStarted; static bool sShutdownHasStarted;
#if defined(DEBUG) || !defined(RELEASE_OR_BETA) #if defined(DEBUG)
nsIThread* mBoundThread; nsIThread* mBoundThread;
#endif #endif
@ -351,11 +347,7 @@ public:
{ {
THREADSAFETY_ASSERT(mBoundThread); THREADSAFETY_ASSERT(mBoundThread);
#ifdef RELEASE_OR_BETA
DebugOnly<bool> current; DebugOnly<bool> current;
#else
bool current;
#endif
THREADSAFETY_ASSERT( THREADSAFETY_ASSERT(
NS_SUCCEEDED(mBoundThread->IsOnCurrentThread(&current))); NS_SUCCEEDED(mBoundThread->IsOnCurrentThread(&current)));
THREADSAFETY_ASSERT(current); THREADSAFETY_ASSERT(current);
@ -368,7 +360,7 @@ public:
} }
ChildImpl() ChildImpl()
#if defined(DEBUG) || !defined(RELEASE_OR_BETA) #if defined(DEBUG)
: mBoundThread(nullptr) : mBoundThread(nullptr)
#endif #endif
#ifdef DEBUG #ifdef DEBUG
@ -449,7 +441,7 @@ private:
{ {
THREADSAFETY_ASSERT(!mBoundThread); THREADSAFETY_ASSERT(!mBoundThread);
#if defined(DEBUG) || !defined(RELEASE_OR_BETA) #if defined(DEBUG)
mBoundThread = NS_GetCurrentThread(); mBoundThread = NS_GetCurrentThread();
#endif #endif

View file

@ -131,16 +131,24 @@ class ObjectOpResult
Uninitialized = uintptr_t(-1) Uninitialized = uintptr_t(-1)
}; };
static const uintptr_t SoftFailBit = uintptr_t(1) << (sizeof(uintptr_t) * 8 - 1);
ObjectOpResult() : code_(Uninitialized) {} ObjectOpResult() : code_(Uninitialized) {}
/* Return true if succeed() was called. */ /* Return true if succeed() or failSoft() was called. */
bool ok() const { bool ok() const {
MOZ_ASSERT(code_ != Uninitialized); MOZ_ASSERT(code_ != Uninitialized);
return code_ == OkCode; return code_ == OkCode || (code_ & SoftFailBit);
} }
explicit operator bool() const { return ok(); } 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. */ /* Set this ObjectOpResult to true and return true. */
bool succeed() { bool succeed() {
code_ = OkCode; code_ = OkCode;
@ -160,10 +168,26 @@ class ObjectOpResult
*/ */
bool fail(uint32_t msg) { bool fail(uint32_t msg) {
MOZ_ASSERT(msg != OkCode); MOZ_ASSERT(msg != OkCode);
MOZ_ASSERT((msg & SoftFailBit) == 0);
code_ = msg; code_ = msg;
return true; 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) failCantRedefineProp();
JS_PUBLIC_API(bool) failReadOnly(); JS_PUBLIC_API(bool) failReadOnly();
JS_PUBLIC_API(bool) failGetterOnly(); JS_PUBLIC_API(bool) failGetterOnly();

View file

@ -44,7 +44,7 @@ Reflect_defineProperty(JSContext* cx, unsigned argc, Value* vp)
ObjectOpResult result; ObjectOpResult result;
if (!DefineProperty(cx, obj, key, desc, result)) if (!DefineProperty(cx, obj, key, desc, result))
return false; return false;
args.rval().setBoolean(bool(result)); args.rval().setBoolean(result.confirmOk());
return true; return true;
} }
@ -69,7 +69,7 @@ Reflect_deleteProperty(JSContext* cx, unsigned argc, Value* vp)
ObjectOpResult result; ObjectOpResult result;
if (!DeleteProperty(cx, target, key, result)) if (!DeleteProperty(cx, target, key, result))
return false; return false;
args.rval().setBoolean(bool(result)); args.rval().setBoolean(result.confirmOk());
return true; return true;
} }
@ -178,7 +178,7 @@ Reflect_preventExtensions(JSContext* cx, unsigned argc, Value* vp)
ObjectOpResult result; ObjectOpResult result;
if (!PreventExtensions(cx, target, result)) if (!PreventExtensions(cx, target, result))
return false; return false;
args.rval().setBoolean(bool(result)); args.rval().setBoolean(result.confirmOk());
return true; return true;
} }
@ -207,7 +207,7 @@ Reflect_set(JSContext* cx, unsigned argc, Value* vp)
RootedValue value(cx, args.get(2)); RootedValue value(cx, args.get(2));
if (!SetProperty(cx, target, key, value, receiver, result)) if (!SetProperty(cx, target, key, value, receiver, result))
return false; return false;
args.rval().setBoolean(bool(result)); args.rval().setBoolean(result.confirmOk());
return true; return true;
} }
@ -240,7 +240,7 @@ Reflect_setPrototypeOf(JSContext* cx, unsigned argc, Value* vp)
ObjectOpResult result; ObjectOpResult result;
if (!SetPrototype(cx, obj, proto, result)) if (!SetPrototype(cx, obj, proto, result))
return false; return false;
args.rval().setBoolean(bool(result)); args.rval().setBoolean(result.confirmOk());
return true; return true;
} }

View file

@ -123,11 +123,7 @@ GetBuildConfiguration(JSContext* cx, unsigned argc, Value* vp)
if (!JS_SetProperty(cx, info, "debug", value)) if (!JS_SetProperty(cx, info, "debug", value))
return false; return false;
#ifdef RELEASE_OR_BETA
value = BooleanValue(true); value = BooleanValue(true);
#else
value = BooleanValue(false);
#endif
if (!JS_SetProperty(cx, info, "release_or_beta", value)) if (!JS_SetProperty(cx, info, "release_or_beta", value))
return false; return false;

View file

@ -10190,7 +10190,9 @@ Parser<ParseHandler>::exprInParens(InHandling inHandling, YieldHandling yieldHan
bool bool
ParserBase::warnOnceAboutExprClosure() ParserBase::warnOnceAboutExprClosure()
{ {
#ifndef RELEASE_OR_BETA // We extensively use expression closures.
// Disabling spew; see Issue #3061
#if 0
JSContext* cx = context->maybeJSContext(); JSContext* cx = context->maybeJSContext();
if (!cx) if (!cx)
return true; return true;

View file

@ -145,13 +145,9 @@ static const size_t gMaxStackSize = 128 * sizeof(size_t) * 1024;
*/ */
static const double MAX_TIMEOUT_SECONDS = 1800.0; 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}. // with --shared-memory={on,off}.
#ifndef RELEASE_OR_BETA
# define SHARED_MEMORY_DEFAULT 1 # define SHARED_MEMORY_DEFAULT 1
#else
# define SHARED_MEMORY_DEFAULT 0
#endif
using JobQueue = GCVector<JSObject*, 0, SystemAllocPolicy>; using JobQueue = GCVector<JSObject*, 0, SystemAllocPolicy>;

View file

@ -97,9 +97,6 @@ DEFINES['HAVE_AV_CONFIG_H'] = True
if CONFIG['MOZ_DEBUG']: if CONFIG['MOZ_DEBUG']:
# Enable all assertions in debug builds. # Enable all assertions in debug builds.
DEFINES['ASSERT_LEVEL'] = 2 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: # clang-cl's <intrin.h> doesn't work the same as MSVC's. For details, see:
# #

View file

@ -68,8 +68,5 @@ ALLOW_COMPILER_WARNINGS = True
if CONFIG['MOZ_DEBUG']: if CONFIG['MOZ_DEBUG']:
# Enable all assertions in debug builds. # Enable all assertions in debug builds.
DEFINES['ASSERT_LEVEL'] = 2 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") include("libavcommon.mozbuild")

View file

@ -440,11 +440,7 @@ struct AssertionConditionType
# define MOZ_ASSERT(...) do { } while (0) # define MOZ_ASSERT(...) do { } while (0)
#endif /* DEBUG */ #endif /* DEBUG */
#ifdef RELEASE_OR_BETA #define MOZ_DIAGNOSTIC_ASSERT MOZ_ASSERT
# define MOZ_DIAGNOSTIC_ASSERT MOZ_ASSERT
#else
# define MOZ_DIAGNOSTIC_ASSERT MOZ_RELEASE_ASSERT
#endif
/* /*
* MOZ_ASSERT_IF(cond1, cond2) is equivalent to MOZ_ASSERT(cond2) if cond1 is * MOZ_ASSERT_IF(cond1, cond2) is equivalent to MOZ_ASSERT(cond2) if cond1 is

View file

@ -90,11 +90,7 @@ pref("security.pki.sha1_enforcement_level", 3);
// 2: fall back to the subject common name for certificates valid before 23 // 2: fall back to the subject common name for certificates valid before 23
// August 2015 if necessary // August 2015 if necessary
// 3: only use name information from the subject alternative name extension // 3: only use name information from the subject alternative name extension
#ifdef RELEASE_OR_BETA
pref("security.pki.name_matching_mode", 1); 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 // security.pki.netscape_step_up_policy controls how the platform handles the
// id-Netscape-stepUp OID in extended key usage extensions of CA certificates. // id-Netscape-stepUp OID in extended key usage extensions of CA certificates.
@ -102,11 +98,7 @@ pref("security.pki.name_matching_mode", 2);
// 1: it is considered equivalent when the notBefore is before 23 August 2016 // 1: it is considered equivalent when the notBefore is before 23 August 2016
// 2: similarly, but for 23 August 2015 // 2: similarly, but for 23 August 2015
// 3: it is never considered equivalent // 3: it is never considered equivalent
#ifdef RELEASE_OR_BETA
pref("security.pki.netscape_step_up_policy", 1); pref("security.pki.netscape_step_up_policy", 1);
#else
pref("security.pki.netscape_step_up_policy", 2);
#endif
// Configures Certificate Transparency support mode: // Configures Certificate Transparency support mode:
// 0: Fully disabled. // 0: Fully disabled.
@ -123,11 +115,5 @@ pref("security.ssl.enable_ocsp_must_staple", true);
// If a request is mixed-content, send an HSTS priming request to attempt to // If a request is mixed-content, send an HSTS priming request to attempt to
// see if it is available over HTTPS. // see if it is available over HTTPS.
pref("security.mixed_content.send_hsts_priming", true); pref("security.mixed_content.send_hsts_priming", true);
#ifdef RELEASE_OR_BETA
// Don't change the order of evaluation of mixed-content and HSTS upgrades // Don't change the order of evaluation of mixed-content and HSTS upgrades
pref("security.mixed_content.use_hsts", 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.use_hsts", true);
#endif

View file

@ -1,5 +1,4 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@ -146,11 +145,11 @@ GetRequestingPrincipal(const FTPChannelCreationArgs& aArgs)
// Bug 1289001 - If GetValidatedOriginAttributes returns an error string, that // Bug 1289001 - If GetValidatedOriginAttributes returns an error string, that
// usually leads to a content crash with very little info about the cause. // 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 static MOZ_COLD
void CrashWithReason(const char * reason) void CrashWithReason(const char * reason)
{ {
#ifndef RELEASE_OR_BETA #ifdef DEBUG
MOZ_CRASH_UNSAFE_OOL(reason); MOZ_CRASH_UNSAFE_OOL(reason);
#endif #endif
} }

View file

@ -843,10 +843,7 @@ HttpObserverManager = {
var onBeforeRequest = { var onBeforeRequest = {
get allowedOptions() { get allowedOptions() {
delete this.allowedOptions; delete this.allowedOptions;
this.allowedOptions = ["blocking"]; this.allowedOptions = ["blocking", "requestBody"];
#ifndef RELEASE_OR_BETA
this.allowedOptions.push("requestBody");
#endif
return this.allowedOptions; return this.allowedOptions;
}, },
addListener(callback, filter = null, opt_extraInfoSpec = null) { addListener(callback, filter = null, opt_extraInfoSpec = null) {

View file

@ -950,11 +950,8 @@ nsXULAppInfo::GetLastRunCrashID(nsAString &aLastRunCrashID)
NS_IMETHODIMP NS_IMETHODIMP
nsXULAppInfo::GetIsReleaseOrBeta(bool* aResult) nsXULAppInfo::GetIsReleaseOrBeta(bool* aResult)
{ {
#ifdef RELEASE_OR_BETA // Unused; always returns true.
*aResult = true; *aResult = true;
#else
*aResult = false;
#endif
return NS_OK; return NS_OK;
} }

View file

@ -259,14 +259,14 @@ class IOInterposerInit
public: public:
IOInterposerInit() IOInterposerInit()
{ {
#if !defined(RELEASE_OR_BETA) #ifdef DEBUG
IOInterposer::Init(); IOInterposer::Init();
#endif #endif
} }
~IOInterposerInit() ~IOInterposerInit()
{ {
#if !defined(RELEASE_OR_BETA) #ifdef DEBUG
IOInterposer::Clear(); IOInterposer::Clear();
#endif #endif
} }

View file

@ -144,7 +144,8 @@ interface nsIXULRuntime : nsISupports
readonly attribute DOMString lastRunCrashID; 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; readonly attribute boolean isReleaseOrBeta;