summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2022-02-04 01:44:41 +0000
committerMoonchild <moonchild@palemoon.org>2022-04-19 17:38:02 +0000
commit185a027640f9b18c97eda39a49bfa2dcce58fcdb (patch)
treed29b146d37f0f831ec981316da778c91fd77be8a
parent99ec088ecf1259643f6124206af024de3ebc49ad (diff)
downloaduxp-185a027640f9b18c97eda39a49bfa2dcce58fcdb.tar.gz
Issue #1877 - Resolve RELEASE_OR_BETA conditionals.
-rw-r--r--devtools/client/preferences/devtools.js4
-rw-r--r--dom/base/nsDOMClassInfo.cpp2
-rw-r--r--dom/base/nsGlobalWindow.cpp26
-rw-r--r--dom/cache/CacheWorkerHolder.cpp4
-rw-r--r--dom/cache/DBSchema.cpp4
-rw-r--r--dom/cache/Manager.cpp8
-rw-r--r--dom/cache/ReadStream.cpp6
-rw-r--r--dom/cache/StreamControl.cpp6
-rw-r--r--dom/plugins/base/nsPluginTags.cpp8
-rw-r--r--dom/worklet/Worklet.cpp3
-rw-r--r--gfx/thebes/gfxFont-Impl.h11
-rw-r--r--gfx/thebes/gfxFont.cpp6
-rw-r--r--gfx/thebes/gfxPrefs.h7
-rw-r--r--gfx/thebes/gfxTextRun.cpp8
-rw-r--r--ipc/chromium/src/base/pickle.h2
-rw-r--r--ipc/glue/BackgroundImpl.cpp14
-rw-r--r--js/public/Class.h28
-rw-r--r--js/src/builtin/Reflect.cpp10
-rw-r--r--js/src/builtin/TestingFunctions.cpp4
-rw-r--r--js/src/frontend/Parser.cpp4
-rw-r--r--js/src/shell/js.cpp6
-rw-r--r--media/ffvpx/ffvpxcommon.mozbuild3
-rw-r--r--media/libav/moz.build3
-rw-r--r--mfbt/Assertions.h6
-rw-r--r--netwerk/base/security-prefs.js14
-rw-r--r--netwerk/ipc/NeckoParent.cpp5
-rw-r--r--toolkit/modules/addons/WebRequest.jsm5
-rw-r--r--toolkit/xre/nsAppRunner.cpp5
-rw-r--r--xpcom/build/IOInterposer.h4
-rw-r--r--xpcom/system/nsIXULRuntime.idl3
30 files changed, 75 insertions, 144 deletions
diff --git a/devtools/client/preferences/devtools.js b/devtools/client/preferences/devtools.js
index e817b3a18b..2f31e18e30 100644
--- a/devtools/client/preferences/devtools.js
+++ b/devtools/client/preferences/devtools.js
@@ -98,11 +98,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);
diff --git a/dom/base/nsDOMClassInfo.cpp b/dom/base/nsDOMClassInfo.cpp
index 7cc92a1b74..805c6ccd9b 100644
--- a/dom/base/nsDOMClassInfo.cpp
+++ b/dom/base/nsDOMClassInfo.cpp
@@ -1688,9 +1688,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 = {
diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp
index 2b8ace3e0c..ccfbf488d3 100644
--- a/dom/base/nsGlobalWindow.cpp
+++ b/dom/base/nsGlobalWindow.cpp
@@ -1116,9 +1116,6 @@ nsOuterWindowProxy::getOwnPropertyDescriptor(JSContext* cx,
}
// 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);
}
@@ -1136,29 +1133,6 @@ nsOuterWindowProxy::defineProperty(JSContext* cx,
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);
}
diff --git a/dom/cache/CacheWorkerHolder.cpp b/dom/cache/CacheWorkerHolder.cpp
index afe6c8f1f7..4ac97cbcab 100644
--- a/dom/cache/CacheWorkerHolder.cpp
+++ b/dom/cache/CacheWorkerHolder.cpp
@@ -54,11 +54,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));
}
diff --git a/dom/cache/DBSchema.cpp b/dom/cache/DBSchema.cpp
index a1ba97ec73..2025150380 100644
--- a/dom/cache/DBSchema.cpp
+++ b/dom/cache/DBSchema.cpp
@@ -2550,12 +2550,14 @@ Migrate(mozIStorageConnection* aConn)
}
}
-#if defined(DEBUG) || !defined(RELEASE_OR_BETA)
+#if defined(DEBUG)
int32_t lastVersion = currentVersion;
#endif
rv = aConn->GetSchemaVersion(&currentVersion);
if (NS_WARN_IF(NS_FAILED(rv))) { return rv; }
+#if defined(DEBUG)
MOZ_DIAGNOSTIC_ASSERT(currentVersion > lastVersion);
+#endif
}
MOZ_DIAGNOSTIC_ASSERT(currentVersion == kLatestSchemaVersion);
diff --git a/dom/cache/Manager.cpp b/dom/cache/Manager.cpp
index 915d8607e0..f294beb544 100644
--- a/dom/cache/Manager.cpp
+++ b/dom/cache/Manager.cpp
@@ -1525,11 +1525,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);
@@ -1576,11 +1578,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);
diff --git a/dom/cache/ReadStream.cpp b/dom/cache/ReadStream.cpp
index 6bc9ced2ed..9c8d0874d7 100644
--- a/dom/cache/ReadStream.cpp
+++ b/dom/cache/ReadStream.cpp
@@ -489,12 +489,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();
diff --git a/dom/cache/StreamControl.cpp b/dom/cache/StreamControl.cpp
index c084081806..892070a6d0 100644
--- a/dom/cache/StreamControl.cpp
+++ b/dom/cache/StreamControl.cpp
@@ -44,7 +44,7 @@ void
StreamControl::CloseReadStreams(const nsID& aId)
{
AssertOwningThread();
-#if defined(DEBUG) || !defined(RELEASE_OR_BETA)
+#if defined(DEBUG)
uint32_t closedCount = 0;
#endif
@@ -53,13 +53,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
diff --git a/dom/plugins/base/nsPluginTags.cpp b/dom/plugins/base/nsPluginTags.cpp
index 3f845b5cd4..ae5ba87586 100644
--- a/dom/plugins/base/nsPluginTags.cpp
+++ b/dom/plugins/base/nsPluginTags.cpp
@@ -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;
}
diff --git a/dom/worklet/Worklet.cpp b/dom/worklet/Worklet.cpp
index 7a76fcd1c8..f6baabd935 100644
--- a/dom/worklet/Worklet.cpp
+++ b/dom/worklet/Worklet.cpp
@@ -328,9 +328,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()
diff --git a/gfx/thebes/gfxFont-Impl.h b/gfx/thebes/gfxFont-Impl.h
index 2661d1f40a..6b31cf29f8 100644
--- a/gfx/thebes/gfxFont-Impl.h
+++ b/gfx/thebes/gfxFont-Impl.h
@@ -50,20 +50,9 @@ gfxFont::GetShapedWord(DrawTarget *aDrawTarget,
if (sw) {
sw->ResetAge();
-#ifndef RELEASE_OR_BETA
- if (aTextPerf) {
- aTextPerf->current.wordCacheHit++;
- }
-#endif
return sw;
}
-#ifndef RELEASE_OR_BETA
- if (aTextPerf) {
- aTextPerf->current.wordCacheMiss++;
- }
-#endif
-
sw = gfxShapedWord::Create(aText, aLength, aRunScript, aAppUnitsPerDevUnit,
aFlags);
entry->mShapedWord.reset(sw);
diff --git a/gfx/thebes/gfxFont.cpp b/gfx/thebes/gfxFont.cpp
index dba322521f..9acfdeb95f 100644
--- a/gfx/thebes/gfxFont.cpp
+++ b/gfx/thebes/gfxFont.cpp
@@ -180,7 +180,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");
@@ -2786,7 +2786,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)
@@ -2826,7 +2826,7 @@ gfxFont::SplitAndInitTextRun(DrawTarget *aDrawTarget,
gfxTextPerfMetrics *tp = nullptr;
-#ifndef RELEASE_OR_BETA
+#ifdef DEBUG
tp = aTextRun->GetFontGroup()->GetTextPerfMetrics();
if (tp) {
if (mStyle.systemFont) {
diff --git a/gfx/thebes/gfxPrefs.h b/gfx/thebes/gfxPrefs.h
index 143d9199ca..b02638e5a6 100644
--- a/gfx/thebes/gfxPrefs.h
+++ b/gfx/thebes/gfxPrefs.h
@@ -352,12 +352,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);
diff --git a/gfx/thebes/gfxTextRun.cpp b/gfx/thebes/gfxTextRun.cpp
index 664514fdd3..ae746b8c5b 100644
--- a/gfx/thebes/gfxTextRun.cpp
+++ b/gfx/thebes/gfxTextRun.cpp
@@ -158,7 +158,7 @@ gfxTextRun::gfxTextRun(const gfxTextRunFactory::Parameters *aParams,
MOZ_COUNT_CTOR(gfxTextRun);
NS_ADDREF(mFontGroup);
-#ifndef RELEASE_OR_BETA
+#ifdef DEBUG
gfxTextPerfMetrics *tp = aFontGroup->GetTextPerfMetrics();
if (tp) {
tp->current.textrunConst++;
@@ -192,7 +192,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++;
@@ -2931,7 +2931,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++;
@@ -2990,7 +2990,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);
diff --git a/ipc/chromium/src/base/pickle.h b/ipc/chromium/src/base/pickle.h
index b0e607a558..3d197c1c6b 100644
--- a/ipc/chromium/src/base/pickle.h
+++ b/ipc/chromium/src/base/pickle.h
@@ -21,7 +21,7 @@
#include "mozilla/ipc/Faulty.h"
#endif
-#if !defined(RELEASE_OR_BETA) || defined(DEBUG)
+#if defined(DEBUG)
#define MOZ_PICKLE_SENTINEL_CHECKING
#endif
diff --git a/ipc/glue/BackgroundImpl.cpp b/ipc/glue/BackgroundImpl.cpp
index 4c65cc851d..34df00d94f 100644
--- a/ipc/glue/BackgroundImpl.cpp
+++ b/ipc/glue/BackgroundImpl.cpp
@@ -45,11 +45,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 { \
@@ -331,7 +327,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
@@ -351,11 +347,7 @@ public:
{
THREADSAFETY_ASSERT(mBoundThread);
-#ifdef RELEASE_OR_BETA
DebugOnly<bool> current;
-#else
- bool current;
-#endif
THREADSAFETY_ASSERT(
NS_SUCCEEDED(mBoundThread->IsOnCurrentThread(&current)));
THREADSAFETY_ASSERT(current);
@@ -368,7 +360,7 @@ public:
}
ChildImpl()
-#if defined(DEBUG) || !defined(RELEASE_OR_BETA)
+#if defined(DEBUG)
: mBoundThread(nullptr)
#endif
#ifdef DEBUG
@@ -449,7 +441,7 @@ private:
{
THREADSAFETY_ASSERT(!mBoundThread);
-#if defined(DEBUG) || !defined(RELEASE_OR_BETA)
+#if defined(DEBUG)
mBoundThread = NS_GetCurrentThread();
#endif
diff --git a/js/public/Class.h b/js/public/Class.h
index 094e4a7ed7..6f1960a308 100644
--- a/js/public/Class.h
+++ b/js/public/Class.h
@@ -131,16 +131,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;
@@ -160,10 +168,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();
diff --git a/js/src/builtin/Reflect.cpp b/js/src/builtin/Reflect.cpp
index ab7cca174d..a902c90d8b 100644
--- a/js/src/builtin/Reflect.cpp
+++ b/js/src/builtin/Reflect.cpp
@@ -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;
}
diff --git a/js/src/builtin/TestingFunctions.cpp b/js/src/builtin/TestingFunctions.cpp
index c9dcadaddf..f91a53eae2 100644
--- a/js/src/builtin/TestingFunctions.cpp
+++ b/js/src/builtin/TestingFunctions.cpp
@@ -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;
diff --git a/js/src/frontend/Parser.cpp b/js/src/frontend/Parser.cpp
index c51545f1b9..38bd77ead3 100644
--- a/js/src/frontend/Parser.cpp
+++ b/js/src/frontend/Parser.cpp
@@ -10190,7 +10190,9 @@ Parser<ParseHandler>::exprInParens(InHandling inHandling, YieldHandling yieldHan
bool
ParserBase::warnOnceAboutExprClosure()
{
-#ifndef RELEASE_OR_BETA
+ // We extensively use expression closures.
+ // Disabling spew; see Issue #3061
+#if 0
JSContext* cx = context->maybeJSContext();
if (!cx)
return true;
diff --git a/js/src/shell/js.cpp b/js/src/shell/js.cpp
index 6e155d3ff6..755fb73f1a 100644
--- a/js/src/shell/js.cpp
+++ b/js/src/shell/js.cpp
@@ -145,13 +145,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>;
diff --git a/media/ffvpx/ffvpxcommon.mozbuild b/media/ffvpx/ffvpxcommon.mozbuild
index 2481dc84ee..eab3b24c2b 100644
--- a/media/ffvpx/ffvpxcommon.mozbuild
+++ b/media/ffvpx/ffvpxcommon.mozbuild
@@ -97,9 +97,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:
#
diff --git a/media/libav/moz.build b/media/libav/moz.build
index e6daba42af..29252d2df8 100644
--- a/media/libav/moz.build
+++ b/media/libav/moz.build
@@ -68,8 +68,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")
diff --git a/mfbt/Assertions.h b/mfbt/Assertions.h
index d4e7febdf1..cc4735071d 100644
--- a/mfbt/Assertions.h
+++ b/mfbt/Assertions.h
@@ -440,11 +440,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
diff --git a/netwerk/base/security-prefs.js b/netwerk/base/security-prefs.js
index 9d89979470..f22a49444b 100644
--- a/netwerk/base/security-prefs.js
+++ b/netwerk/base/security-prefs.js
@@ -90,11 +90,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.
@@ -102,11 +98,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.
@@ -129,11 +121,5 @@ pref("security.ssl.enable_tls13_compat_mode", false);
// If a request is mixed-content, send an HSTS priming request to attempt to
// see if it is available over HTTPS.
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
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
diff --git a/netwerk/ipc/NeckoParent.cpp b/netwerk/ipc/NeckoParent.cpp
index da2a6d7268..c3a288e689 100644
--- a/netwerk/ipc/NeckoParent.cpp
+++ b/netwerk/ipc/NeckoParent.cpp
@@ -1,5 +1,4 @@
/* -*- 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
* 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/. */
@@ -146,11 +145,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
}
diff --git a/toolkit/modules/addons/WebRequest.jsm b/toolkit/modules/addons/WebRequest.jsm
index 26118e43f9..b9f9e7b652 100644
--- a/toolkit/modules/addons/WebRequest.jsm
+++ b/toolkit/modules/addons/WebRequest.jsm
@@ -839,10 +839,7 @@ HttpObserverManager = {
var onBeforeRequest = {
get allowedOptions() {
delete this.allowedOptions;
- this.allowedOptions = ["blocking"];
-#ifndef RELEASE_OR_BETA
- this.allowedOptions.push("requestBody");
-#endif
+ this.allowedOptions = ["blocking", "requestBody"];
return this.allowedOptions;
},
addListener(callback, filter = null, opt_extraInfoSpec = null) {
diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp
index 932325458e..b15335ade3 100644
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -921,11 +921,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;
}
diff --git a/xpcom/build/IOInterposer.h b/xpcom/build/IOInterposer.h
index 9411fbda39..8f830c1f7d 100644
--- a/xpcom/build/IOInterposer.h
+++ b/xpcom/build/IOInterposer.h
@@ -259,14 +259,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
}
diff --git a/xpcom/system/nsIXULRuntime.idl b/xpcom/system/nsIXULRuntime.idl
index d3f3535472..fd92cf54a5 100644
--- a/xpcom/system/nsIXULRuntime.idl
+++ b/xpcom/system/nsIXULRuntime.idl
@@ -131,7 +131,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;