summaryrefslogtreecommitdiff
path: root/js/src/vm
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2022-02-20 22:00:59 +0000
committerMoonchild <moonchild@palemoon.org>2022-04-22 13:58:16 +0000
commit5aa65d2aeab36ea8de8129c0babcf70a5e4e662a (patch)
tree36ed652ffb09104d8a10c01261b851329f34882f /js/src/vm
parent712ca7303b0835772f8abca85ebec981e254a017 (diff)
downloaduxp-5aa65d2aeab36ea8de8129c0babcf70a5e4e662a.tar.gz
Issue #1877 - Resolve NIGHTLY_BUILD conditionals.
Diffstat (limited to 'js/src/vm')
-rw-r--r--js/src/vm/Debugger.cpp10
-rw-r--r--js/src/vm/Debugger.h4
-rw-r--r--js/src/vm/UnboxedObject.cpp10
3 files changed, 8 insertions, 16 deletions
diff --git a/js/src/vm/Debugger.cpp b/js/src/vm/Debugger.cpp
index 305555f414..1c875c606f 100644
--- a/js/src/vm/Debugger.cpp
+++ b/js/src/vm/Debugger.cpp
@@ -641,7 +641,7 @@ Debugger::Debugger(JSContext* cx, NativeObject* dbg)
environments(cx),
wasmInstanceScripts(cx),
wasmInstanceSources(cx),
-#ifdef NIGHTLY_BUILD
+#ifdef DEBUG
traceLoggerLastDrainedSize(0),
traceLoggerLastDrainedIteration(0),
#endif
@@ -656,7 +656,7 @@ Debugger::Debugger(JSContext* cx, NativeObject* dbg)
#ifdef JS_TRACE_LOGGING
TraceLoggerThread* logger = TraceLoggerForMainThread(cx->runtime());
if (logger) {
-#ifdef NIGHTLY_BUILD
+#ifdef DEBUG
logger->getIterationAndSize(&traceLoggerLastDrainedIteration, &traceLoggerLastDrainedSize);
#endif
logger->getIterationAndSize(&traceLoggerScriptedCallsLastDrainedIteration,
@@ -4891,7 +4891,7 @@ DefineProperty(JSContext* cx, HandleObject obj, HandleId id, const char* value,
}
#ifdef JS_TRACE_LOGGING
-# ifdef NIGHTLY_BUILD
+# ifdef DEBUG
bool
Debugger::setupTraceLogger(JSContext* cx, unsigned argc, Value* vp)
{
@@ -5009,7 +5009,7 @@ Debugger::drainTraceLogger(JSContext* cx, unsigned argc, Value* vp)
return true;
}
-# endif // NIGHTLY_BUILD
+# endif // DEBUG
bool
Debugger::setupTraceLoggerScriptCalls(JSContext* cx, unsigned argc, Value* vp)
@@ -5262,7 +5262,7 @@ const JSFunctionSpec Debugger::methods[] = {
JS_FN("drainTraceLoggerScriptCalls", Debugger::drainTraceLoggerScriptCalls, 0, 0),
JS_FN("startTraceLogger", Debugger::startTraceLogger, 0, 0),
JS_FN("endTraceLogger", Debugger::endTraceLogger, 0, 0),
-# ifdef NIGHTLY_BUILD
+# ifdef DEBUG
JS_FN("setupTraceLogger", Debugger::setupTraceLogger, 1, 0),
JS_FN("drainTraceLogger", Debugger::drainTraceLogger, 0, 0),
# endif
diff --git a/js/src/vm/Debugger.h b/js/src/vm/Debugger.h
index c8b84d8b14..56a6318ba9 100644
--- a/js/src/vm/Debugger.h
+++ b/js/src/vm/Debugger.h
@@ -485,7 +485,7 @@ class Debugger : private mozilla::LinkedListElement<Debugger>
* Keep track of tracelogger last drained identifiers to know if there are
* lost events.
*/
-#ifdef NIGHTLY_BUILD
+#ifdef DEBUG
uint32_t traceLoggerLastDrainedSize;
uint32_t traceLoggerLastDrainedIteration;
#endif
@@ -629,7 +629,7 @@ class Debugger : private mozilla::LinkedListElement<Debugger>
static bool startTraceLogger(JSContext* cx, unsigned argc, Value* vp);
static bool endTraceLogger(JSContext* cx, unsigned argc, Value* vp);
static bool isCompilableUnit(JSContext* cx, unsigned argc, Value* vp);
-#ifdef NIGHTLY_BUILD
+#ifdef DEBUG
static bool setupTraceLogger(JSContext* cx, unsigned argc, Value* vp);
static bool drainTraceLogger(JSContext* cx, unsigned argc, Value* vp);
#endif
diff --git a/js/src/vm/UnboxedObject.cpp b/js/src/vm/UnboxedObject.cpp
index de6bdef9e3..4912e65db9 100644
--- a/js/src/vm/UnboxedObject.cpp
+++ b/js/src/vm/UnboxedObject.cpp
@@ -1906,17 +1906,9 @@ js::TryConvertToUnboxedLayout(ExclusiveContext* cx, AutoEnterAnalysis& enter, Sh
{
bool isArray = !templateShape;
- // Unboxed arrays are nightly only for now. The getenv() call will be
- // removed when they are on by default. See bug 1153266.
+ // Unboxed arrays are disabled for now. See bug 1153266.
if (isArray) {
-#ifdef NIGHTLY_BUILD
- if (!getenv("JS_OPTION_USE_UNBOXED_ARRAYS")) {
- if (!cx->options().unboxedArrays())
- return true;
- }
-#else
return true;
-#endif
} else {
if (jit::JitOptions.disableUnboxedObjects)
return true;