0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-24 00:17:37 +01:00

Revert "SERVER-91111: Enable spider-monkey-dbg build. (#22906)" (#24713)

GitOrigin-RevId: 70b5bdac333a71ff8ea88cf6f5827e2d19b109e8
This commit is contained in:
Santiago Roche 2024-07-12 17:32:23 -04:00 committed by MongoDB Bot
parent d31d9e6d75
commit e72ba5f996
32 changed files with 29 additions and 174 deletions

View File

@ -108,7 +108,6 @@ globals:
_isLeakSanitizerActive: true
_isThreadSanitizerActive: true
_isUndefinedBehaviorSanitizerActive: true
_isSpiderMonkeyDebugEnabled: true
_optimizationsEnabled: true
allocatePort: true
allocatePorts: true

View File

@ -36,7 +36,6 @@ variables:
# - etc/evergreen_yml_components/variants/rhel/test_dev_master_and_lts_branches_only.yml
# - etc/evergreen_yml_components/variants/rhel/test_dev.yml
# - etc/evergreen_yml_components/variants/sanitizer/test_dev_master_branch_only.yml
# - etc/evergreen_yml_components/variants/sanitizer/test_dev.yml
# ANY MODIFICATIONS HERE SHOULD ALSO BE MADE IN THOSE FILES
- &linux_x86_dynamic_compile_variant_dependency
depends_on:
@ -55,7 +54,6 @@ variables:
# - etc/evergreen_yml_components/variants/rhel/test_dev_master_and_lts_branches_only.yml
# - etc/evergreen_yml_components/variants/rhel/test_dev.yml
# - etc/evergreen_yml_components/variants/sanitizer/test_dev_master_branch_only.yml
# - etc/evergreen_yml_components/variants/sanitizer/test_dev.yml
# ANY MODIFICATIONS HERE SHOULD ALSO BE MADE IN THOSE FILES
- &linux_x86_generic_expansions
multiversion_platform: rhel8
@ -70,7 +68,6 @@ variables:
# - etc/evergreen_yml_components/variants/rhel/test_dev_master_branch_only.yml
# - etc/evergreen_yml_components/variants/rhel/test_dev.yml
# - etc/evergreen_yml_components/variants/sanitizer/test_dev_master_branch_only.yml
# - etc/evergreen_yml_components/variants/sanitizer/test_dev.yml
# ANY MODIFICATIONS HERE SHOULD ALSO BE MADE IN THOSE FILES
- &enterprise-rhel-8-64-bit-dynamic-expansions
<<: *linux_x86_generic_expansions

View File

@ -10,7 +10,6 @@ variables:
# - etc/evergreen_yml_components/variants/rhel/test_dev_master_and_lts_branches_only.yml
# - etc/evergreen_yml_components/variants/rhel/test_dev.yml
# - etc/evergreen_yml_components/variants/sanitizer/test_dev_master_branch_only.yml
# - etc/evergreen_yml_components/variants/sanitizer/test_dev.yml
# ANY MODIFICATIONS HERE SHOULD ALSO BE MADE IN THOSE FILES
- &linux_x86_dynamic_compile_variant_dependency
depends_on:
@ -29,7 +28,6 @@ variables:
# - etc/evergreen_yml_components/variants/rhel/test_dev_master_and_lts_branches_only.yml
# - etc/evergreen_yml_components/variants/rhel/test_dev.yml
# - etc/evergreen_yml_components/variants/sanitizer/test_dev_master_branch_only.yml
# - etc/evergreen_yml_components/variants/sanitizer/test_dev.yml
# ANY MODIFICATIONS HERE SHOULD ALSO BE MADE IN THOSE FILES
- &linux_x86_generic_expansions
multiversion_platform: rhel8

View File

@ -62,7 +62,6 @@ variables:
# - etc/evergreen_yml_components/variants/rhel/test_dev_master_and_lts_branches_only.yml
# - etc/evergreen_yml_components/variants/rhel/test_dev.yml
# - etc/evergreen_yml_components/variants/sanitizer/test_dev_master_branch_only.yml
# - etc/evergreen_yml_components/variants/sanitizer/test_dev.yml
# ANY MODIFICATIONS HERE SHOULD ALSO BE MADE IN THOSE FILES
- &linux_x86_dynamic_compile_variant_dependency
depends_on:
@ -81,7 +80,6 @@ variables:
# - etc/evergreen_yml_components/variants/rhel/test_dev_master_and_lts_branches_only.yml
# - etc/evergreen_yml_components/variants/rhel/test_dev.yml
# - etc/evergreen_yml_components/variants/sanitizer/test_dev_master_branch_only.yml
# - etc/evergreen_yml_components/variants/sanitizer/test_dev.yml
# ANY MODIFICATIONS HERE SHOULD ALSO BE MADE IN THOSE FILES
- &linux_x86_generic_expansions
multiversion_platform: rhel8
@ -96,7 +94,6 @@ variables:
# - etc/evergreen_yml_components/variants/rhel/test_dev_master_branch_only.yml
# - etc/evergreen_yml_components/variants/rhel/test_dev.yml
# - etc/evergreen_yml_components/variants/sanitizer/test_dev_master_branch_only.yml
# - etc/evergreen_yml_components/variants/sanitizer/test_dev.yml
# ANY MODIFICATIONS HERE SHOULD ALSO BE MADE IN THOSE FILES
- &enterprise-rhel-8-64-bit-dynamic-expansions
<<: *linux_x86_generic_expansions

View File

@ -31,60 +31,6 @@ variables:
scons_cache_mode: all
has_packages: false
# THIS HAS COPIES IN:
# - etc/evergreen_yml_components/variants/rhel/test_dev_master_branch_only.yml
# - etc/evergreen_yml_components/variants/rhel/test_dev_master_and_lts_branches_only.yml
# - etc/evergreen_yml_components/variants/rhel/test_dev.yml
# - etc/evergreen_yml_components/variants/sanitizer/test_dev_master_branch_only.yml
# - etc/evergreen_yml_components/variants/sanitizer/test_dev.yml
# ANY MODIFICATIONS HERE SHOULD ALSO BE MADE IN THOSE FILES
- &linux_x86_dynamic_compile_variant_dependency
depends_on:
- name: archive_dist_test_debug
variant: &linux_x86_dynamic_compile_variant_name linux-x86-dynamic-compile
- name: version_gen
variant: generate-tasks-for-version
# This is added because of EVG-18211.
# Without this we are adding extra dependencies on evergreen and it is causing strain
omit_generated_tasks: true
# - name: generate_buildid_to_debug_symbols_mapping
# variant: linux-x86-dynamic-compile
# THIS HAS COPIES IN:
# - etc/evergreen_yml_components/variants/rhel/test_dev_master_branch_only.yml
# - etc/evergreen_yml_components/variants/rhel/test_dev_master_and_lts_branches_only.yml
# - etc/evergreen_yml_components/variants/rhel/test_dev.yml
# - etc/evergreen_yml_components/variants/sanitizer/test_dev_master_branch_only.yml
# - etc/evergreen_yml_components/variants/sanitizer/test_dev.yml
# ANY MODIFICATIONS HERE SHOULD ALSO BE MADE IN THOSE FILES
- &linux_x86_generic_expansions
multiversion_platform: rhel80
multiversion_edition: enterprise
repo_edition: enterprise
large_distro_name: rhel80-medium
core_analyzer_distro_name: rhel80-xlarge
num_scons_link_jobs_available: 0.99
compile_variant: *linux_x86_dynamic_compile_variant_name
# THIS HAS COPIES IN:
# - etc/evergreen_yml_components/variants/rhel/test_dev_master_branch_only.yml
# - etc/evergreen_yml_components/variants/rhel/test_dev.yml
# - etc/evergreen_yml_components/variants/sanitizer/test_dev_master_branch_only.yml
# - etc/evergreen_yml_components/variants/sanitizer/test_dev.yml
# ANY MODIFICATIONS HERE SHOULD ALSO BE MADE IN THOSE FILES
- &enterprise-rhel-80-64-bit-dynamic-expansions
<<: *linux_x86_generic_expansions
scons_cache_scope: shared
scons_cache_mode: all
has_packages: false
jstestfuzz_num_generated_files: 40
jstestfuzz_concurrent_num_files: 10
target_resmoke_time: 10
max_sub_suites: 5
idle_timeout_factor: 1.5
exec_timeout_factor: 1.5
large_distro_name: rhel80-medium
# THIS HAS COPIES IN
# - etc/evergreen_yml_components/variants/sanitizer/test_dev.yml
# - etc/evergreen_yml_components/variants/wiredtiger/test_dev_master_branch_only.yml
@ -580,34 +526,3 @@ buildvariants:
- name: .serverless
- name: unittest_shell_hang_analyzer_gen
- name: .watchdog
- name: &enterprise-rhel-80-64-bit-dynamic-spider-monkey-dbg enterprise-rhel-80-64-bit-dynamic-spider-monkey-dbg
display_name: "~ Shared Library Enterprise RHEL 8.0 SpiderMonkey Debug"
tags: []
cron: "0 */4 * * *" # From the ${project_required_suggested_cron} parameter
run_on:
- rhel80-small
expansions:
<<: *enterprise-rhel-80-64-bit-dynamic-expansions
# JS_GC_ZEAL modes can be found at https://github.com/mongodb/mongo/blob/r8.0.0-rc9/src/third_party/mozjs/extract/js/src/gc/GC.cpp#L563-L612.
# These modes correspond to collecting the nursery (GenerationalGC) every 50 allocations.
mozjs_options: JS_GC_ZEAL='7,50'
compile_flags: >-
--ssl
MONGO_DISTMOD=rhel80
-j$(grep -c ^processor /proc/cpuinfo)
--variables-files=etc/scons/mongodbtoolchain_stable_gcc.vars
--link-model=dynamic
--use-diagnostic-latches=on
--spider-monkey-dbg=on
exec_timeout_secs: 32400 # 9 hour timeout
timeout_secs: 18000 # 5 hour idle timeout
depends_on: []
tasks:
- name: compile_test_parallel_core_stream_TG
distros:
- rhel80-xlarge
- name: aggregation
- name: aggregation_mongos_passthrough
- name: concurrency_simultaneous_gen
- name: jsCore

View File

@ -21,7 +21,6 @@ variables:
# - etc/evergreen_yml_components/variants/rhel/test_dev_master_and_lts_branches_only.yml
# - etc/evergreen_yml_components/variants/rhel/test_dev.yml
# - etc/evergreen_yml_components/variants/sanitizer/test_dev_master_branch_only.yml
# - etc/evergreen_yml_components/variants/sanitizer/test_dev.yml
# ANY MODIFICATIONS HERE SHOULD ALSO BE MADE IN THOSE FILES
- &linux_x86_dynamic_compile_variant_dependency
depends_on:
@ -58,7 +57,6 @@ variables:
# - etc/evergreen_yml_components/variants/rhel/test_dev_master_and_lts_branches_only.yml
# - etc/evergreen_yml_components/variants/rhel/test_dev.yml
# - etc/evergreen_yml_components/variants/sanitizer/test_dev_master_branch_only.yml
# - etc/evergreen_yml_components/variants/sanitizer/test_dev.yml
# ANY MODIFICATIONS HERE SHOULD ALSO BE MADE IN THOSE FILES
- &linux_x86_generic_expansions
multiversion_platform: rhel8
@ -73,7 +71,6 @@ variables:
# - etc/evergreen_yml_components/variants/rhel/test_dev_master_branch_only.yml
# - etc/evergreen_yml_components/variants/rhel/test_dev.yml
# - etc/evergreen_yml_components/variants/sanitizer/test_dev_master_branch_only.yml
# - etc/evergreen_yml_components/variants/sanitizer/test_dev.yml
# ANY MODIFICATIONS HERE SHOULD ALSO BE MADE IN THOSE FILES
- &enterprise-rhel-8-64-bit-dynamic-expansions
<<: *linux_x86_generic_expansions

View File

@ -125,7 +125,7 @@ if [[ ${disable_unit_tests} = "false" && ! -f ${skip_tests} ]]; then
suite_name=${suite}
fi
resmoke_env_options="${gcov_environment} ${lang_environment} ${san_options} ${mozjs_options}"
resmoke_env_options="${gcov_environment} ${lang_environment} ${san_options}"
echo $resmoke_env_options > resmoke_env_options.txt
# The "resmoke_wrapper" expansion is used by the 'burn_in_tests' task to wrap the resmoke.py

View File

@ -24,7 +24,7 @@ import {checkCascadesOptimizerEnabled} from "jstests/libs/optimizer_utils.js";
const debugBuild = db.adminCommand("buildInfo").debug;
if (debugBuild || !_optimizationsEnabled() || _isAddressSanitizerActive() ||
_isLeakSanitizerActive() || _isThreadSanitizerActive() ||
_isUndefinedBehaviorSanitizerActive() || _isSpiderMonkeyDebugEnabled()) {
_isUndefinedBehaviorSanitizerActive()) {
jsTestLog("Returning early because debug is on, opt is off, or a sanitizer is enabled.");
return;
}

View File

@ -65,7 +65,6 @@ struct BaseInfo {
static const JSFunctionSpec* freeFunctions;
static const JSFunctionSpec* methods;
static const unsigned classFlags = 0;
static constexpr uint32_t finalizeFlag = JSCLASS_FOREGROUND_FINALIZE;
static void addProperty(JSContext* cx,
JS::HandleObject obj,
JS::HandleId id,

View File

@ -66,8 +66,7 @@ struct BinDataInfo : public BaseInfo {
static const JSFunctionSpec freeFunctions[4];
static const char* const className;
static const unsigned classFlags =
JSCLASS_HAS_RESERVED_SLOTS(BinDataSlotCount) | BaseInfo::finalizeFlag;
static const unsigned classFlags = JSCLASS_HAS_RESERVED_SLOTS(BinDataSlotCount);
};
} // namespace mozjs

View File

@ -73,8 +73,7 @@ struct BSONInfo : public BaseInfo {
JS::ObjectOpResult& result);
static const char* const className;
static const unsigned classFlags =
JSCLASS_HAS_RESERVED_SLOTS(BSONInfoSlotCount) | BaseInfo::finalizeFlag;
static const unsigned classFlags = JSCLASS_HAS_RESERVED_SLOTS(BSONInfoSlotCount);
static const InstallType installType = InstallType::Private;
static void postInstall(JSContext* cx, JS::HandleObject global, JS::HandleObject proto);

View File

@ -69,8 +69,7 @@ struct CursorInfo : public BaseInfo {
static const JSFunctionSpec methods[9];
static const char* const className;
static const unsigned classFlags =
JSCLASS_HAS_RESERVED_SLOTS(CursorInfoSlotCount) | BaseInfo::finalizeFlag;
static const unsigned classFlags = JSCLASS_HAS_RESERVED_SLOTS(CursorInfoSlotCount);
static const InstallType installType = InstallType::Private;
/**

View File

@ -61,8 +61,7 @@ struct CursorHandleInfo : public BaseInfo {
static const JSFunctionSpec methods[2];
static const char* const className;
static const unsigned classFlags =
JSCLASS_HAS_RESERVED_SLOTS(CursorHandleInfoSlotCount) | BaseInfo::finalizeFlag;
static const unsigned classFlags = JSCLASS_HAS_RESERVED_SLOTS(CursorHandleInfoSlotCount);
static const InstallType installType = InstallType::Private;
/**

View File

@ -56,8 +56,7 @@ struct DBRefInfo : public BaseInfo {
static void construct(JSContext* cx, JS::CallArgs args);
static const char* const className;
static const unsigned classFlags =
JSCLASS_HAS_RESERVED_SLOTS(DBRefInfoSlotCount) | BaseInfo::finalizeFlag;
static const unsigned classFlags = JSCLASS_HAS_RESERVED_SLOTS(DBRefInfoSlotCount);
static void delProperty(JSContext* cx,
JS::HandleObject obj,

View File

@ -560,7 +560,7 @@ MozJSImplScope::MozJSImplScope(MozJSScriptEngine* engine, boost::optional<int> j
}
MozJSImplScope::~MozJSImplScope() {
invariant(!_promiseResult.initialized());
invariant(!_promiseResult.has_value());
currentJSScope = nullptr;
for (auto&& x : _funcs) {
@ -712,8 +712,7 @@ void MozJSImplScope::_MozJSCreateFunction(StringData raw, JS::MutableHandleValue
bool MozJSImplScope::onSyncPromiseResolved(JSContext* cx, unsigned argc, JS::Value* vp) {
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
auto scope = getScope(cx);
invariant(!scope->_promiseResult.initialized());
scope->_promiseResult.init(cx, args[0]);
scope->_promiseResult.emplace(cx, args[0]);
args.rval().setUndefined();
return true;
}
@ -764,9 +763,9 @@ bool MozJSImplScope::awaitPromise(JSContext* cx,
return false;
}
invariant(scope->_promiseResult.initialized());
out.set(scope->_promiseResult);
scope->_promiseResult.reset();
invariant(scope->_promiseResult.has_value());
out.set(*scope->_promiseResult);
scope->_promiseResult = boost::none;
return true;
}
@ -1167,11 +1166,6 @@ bool MozJSImplScope::_checkErrorState(bool success, bool reportError, bool asser
if (_status.isOK()) {
JS::RootedValue excn(_context);
if (JS_GetPendingException(_context, &excn)) {
// The pending JS exception needs to be cleared before we call ValueWriter below to
// print the exception. ValueWriter::toStringData() may call back into the Interpret,
// which asserts that we don't have an exception pending in DEBUG builds.
JS_ClearPendingException(_context);
if (excn.isObject()) {
str::stream ss;
// Exceptions originating from C++ should not get the "uncaught exception: " prefix.
@ -1216,8 +1210,6 @@ bool MozJSImplScope::_checkErrorState(bool success, bool reportError, bool asser
_status = Status(ErrorCodes::UnknownError, "Unknown Failure from JSInterpreter");
}
}
// We always unconditionally clear any pending exception, as this method _checkErrorState is
// expected to report and clear the errors before returning.
JS_ClearPendingException(_context);
if (auto extraInfo = _status.extraInfo<JSExceptionInfo>()) {

View File

@ -449,6 +449,8 @@ private:
struct MozRuntime {
public:
MozRuntime(const MozJSScriptEngine* engine, boost::optional<int> jsHeapLimitMB);
std::unique_ptr<JSRuntime, std::function<void(JSRuntime*)>> _runtime;
std::unique_ptr<JSContext, std::function<void(JSContext*)>> _context;
};
@ -514,10 +516,7 @@ private:
std::unique_ptr<ModuleLoader> _moduleLoader;
std::unique_ptr<EnvironmentPreparer> _environmentPreparer;
// _promiseResult must be a persistentRootedValue (instead of a simple RootedValue). Using a
// simple RootedValue here affects the stack cleanup conditions in the promise's execution
// context.
JS::PersistentRootedValue _promiseResult;
boost::optional<JS::RootedValue> _promiseResult;
WrapType<BinDataInfo> _binDataProto;
WrapType<BSONInfo> _bsonProto;

View File

@ -74,8 +74,7 @@ struct JSThreadInfo : public BaseInfo {
static const JSFunctionSpec freeFunctions[3];
static const char* const className;
static const unsigned classFlags =
JSCLASS_HAS_RESERVED_SLOTS(JSThreadInfoSlotCount) | BaseInfo::finalizeFlag;
static const unsigned classFlags = JSCLASS_HAS_RESERVED_SLOTS(JSThreadInfoSlotCount);
static const InstallType installType = InstallType::Private;
};

View File

@ -361,7 +361,7 @@ JSString* ModuleLoader::fetchSource(JSContext* cx,
enum GlobalAppSlot { GlobalAppSlotModuleRegistry, GlobalAppSlotCount };
JSObject* ModuleLoader::getOrCreateModuleRegistry(JSContext* cx) {
JS::RootedObject global(cx, JS::CurrentGlobalOrNull(cx));
JSObject* global = JS::CurrentGlobalOrNull(cx);
if (!global) {
return nullptr;
}
@ -371,7 +371,7 @@ JSObject* ModuleLoader::getOrCreateModuleRegistry(JSContext* cx) {
return &value.toObject();
}
JS::RootedObject registry(cx, JS::NewMapObject(cx));
JSObject* registry = JS::NewMapObject(cx);
if (!registry) {
return nullptr;
}

View File

@ -112,8 +112,7 @@ struct MongoBase : public BaseInfo {
static const JSFunctionSpec methods[31];
static const char* const className;
static const unsigned classFlags =
JSCLASS_HAS_RESERVED_SLOTS(MongoBaseSlotCount) | BaseInfo::finalizeFlag;
static const unsigned classFlags = JSCLASS_HAS_RESERVED_SLOTS(MongoBaseSlotCount);
};
/**

View File

@ -62,8 +62,7 @@ struct NativeFunctionInfo : public BaseInfo {
static const char* const inheritFrom;
static const char* const className;
static const unsigned classFlags =
JSCLASS_HAS_RESERVED_SLOTS(NativeFunctionInfoSlotCount) | BaseInfo::finalizeFlag;
static const unsigned classFlags = JSCLASS_HAS_RESERVED_SLOTS(NativeFunctionInfoSlotCount);
static const InstallType installType = InstallType::Private;
struct Functions {

View File

@ -61,8 +61,8 @@ struct NumberDecimalInfo : public BaseInfo {
static const JSFunctionSpec methods[3];
static const char* const className;
static const unsigned classFlags =
JSCLASS_HAS_RESERVED_SLOTS(NumberDecimalInfoSlotCount) | BaseInfo::finalizeFlag;
static const unsigned classFlags = JSCLASS_HAS_RESERVED_SLOTS(NumberDecimalInfoSlotCount);
static Decimal128 ToNumberDecimal(JSContext* cx, JS::HandleObject object);
static Decimal128 ToNumberDecimal(JSContext* cx, JS::HandleValue value);

View File

@ -61,8 +61,7 @@ struct NumberIntInfo : public BaseInfo {
static const JSFunctionSpec methods[5];
static const char* const className;
static const unsigned classFlags =
JSCLASS_HAS_RESERVED_SLOTS(NumberIntInfoSlotCount) | BaseInfo::finalizeFlag;
static const unsigned classFlags = JSCLASS_HAS_RESERVED_SLOTS(NumberIntInfoSlotCount);
static int ToNumberInt(JSContext* cx, JS::HandleObject object);
static int ToNumberInt(JSContext* cx, JS::HandleValue value);

View File

@ -77,8 +77,7 @@ struct NumberLongInfo : public BaseInfo {
static const JSFunctionSpec methods[6];
static const char* const className;
static const unsigned classFlags =
JSCLASS_HAS_RESERVED_SLOTS(NumberLongInfoSlotCount) | BaseInfo::finalizeFlag;
static const unsigned classFlags = JSCLASS_HAS_RESERVED_SLOTS(NumberLongInfoSlotCount);
static void postInstall(JSContext* cx, JS::HandleObject global, JS::HandleObject proto);

View File

@ -60,8 +60,8 @@ struct OIDInfo : public BaseInfo {
static const JSFunctionSpec methods[3];
static const unsigned classFlags =
JSCLASS_HAS_RESERVED_SLOTS(OIDInfoSlotCount) | BaseInfo::finalizeFlag;
static const unsigned classFlags = JSCLASS_HAS_RESERVED_SLOTS(OIDInfoSlotCount);
static const char* const className;
static void postInstall(JSContext* cx, JS::HandleObject global, JS::HandleObject proto);

View File

@ -67,8 +67,7 @@ struct SessionInfo : public BaseInfo {
static const JSFunctionSpec methods[8];
static const char* const className;
static const unsigned classFlags =
JSCLASS_HAS_RESERVED_SLOTS(SessionInfoSlotCount) | BaseInfo::finalizeFlag;
static const unsigned classFlags = JSCLASS_HAS_RESERVED_SLOTS(SessionInfoSlotCount);
static const InstallType installType = InstallType::Private;
static void make(JSContext* cx,

View File

@ -65,8 +65,7 @@ struct MongoStatusInfo : public BaseInfo {
static const char* const className;
static const char* const inheritFrom;
static const unsigned classFlags =
JSCLASS_HAS_RESERVED_SLOTS(MongoStatusInfoSlotCount) | BaseInfo::finalizeFlag;
static const unsigned classFlags = JSCLASS_HAS_RESERVED_SLOTS(MongoStatusInfoSlotCount);
static const InstallType installType = InstallType::Private;
static Status toStatus(JSContext* cx, JS::HandleObject object);

View File

@ -402,21 +402,6 @@ function _isUndefinedBehaviorSanitizerActive() {
return __sanitizeMatch("undefined");
}
// Enabling a custom JS_GC_ZEAL value for spidermonkey is a two step process:
// 1) JS_GC_ZEAL preprocessor directive needs to be defined at compilation (spider-monkey-dbg=on).
// 2) A valid JS_GC_ZEAL value needs to be provided as an environment variable at runtime.
// In order to detect whether we are running with JS_GC_ZEAL enabled, ideally we'd like to check for
// the CPPDEFINE for JS_GC_ZEAL. Unfortunately, this CPPDEFINE only applies to libmozjs, and is not
// exposed in the BuildInfo response. Instead, we rely on detecting a non-empty environment variable
// for JS_GC_ZEAL. We could have restricted the RegExp to match a valid input for JS_GC_ZEAL
// For example: RegExp(/^\w+(;\w+)*(,\d+)?$/), but SpiderMonkey performs the validation for us.
// As long as a non-whitespace JS_GC_ZEAL value has been detected, we report it as being enabled.
function _isSpiderMonkeyDebugEnabled() {
const jsGcZeal = _getEnv("JS_GC_ZEAL");
let regex = RegExp(/^\S+$/);
return regex.test(jsGcZeal);
}
jsTestName = function() {
if (TestData) {
// If we are using the jsTestName as a database name and performing tenant prefixing

View File

@ -78,7 +78,6 @@ def injectMozJS(thisEnv):
thisEnv.Prepend(CPPDEFINES=[
'DEBUG',
'JS_DEBUG',
'JS_GC_ZEAL'
])

View File

@ -147,9 +147,6 @@ sources = [
"extract/js/src/wasm/WasmCode-platform.cpp",
]
if get_option('spider-monkey-dbg') == "on":
sources.extend(["extract/js/src/util/Utility.cpp"])
if env['TARGET_ARCH'] == 'x86_64' and not env.TargetOSIs('windows'):
env.Append(CCFLAGS=['-mavx2'])
sources.extend(["extract/mozglue/misc/SIMD_avx2.cpp", "extract/mozglue/misc/SSE.cpp"])

View File

@ -100,9 +100,6 @@ bool js::gExtraPoisoningEnabled = false;
# endif
#endif
// MONGODB MODIFICATION: We don't want to compile the below code when running in mongo embedding.
// Instead, we would like to rely on our own JS custom allocator implementation in mongo_sources.
#ifndef JS_USE_CUSTOM_ALLOCATOR
JS_PUBLIC_DATA arena_id_t js::MallocArena;
JS_PUBLIC_DATA arena_id_t js::ArrayBufferContentsArena;
JS_PUBLIC_DATA arena_id_t js::StringBufferArena;
@ -124,7 +121,6 @@ void js::ShutDownMallocAllocator() {
// moz_dispose_arena(MallocArena);
// moz_dispose_arena(ArrayBufferContentsArena);
}
#endif
extern void js::AssertJSStringBufferInCorrectArena(const void* ptr) {
// `jemalloc_ptr_info()` only exists if MOZ_MEMORY is defined, and it only

View File

@ -3583,8 +3583,6 @@ void js::AssertJSClassInvariants(const JSClass* clasp) {
//
// Environment objects unfortunately use these hooks, but environment objects
// are not exposed directly to script so they're generally less of an issue.
// MONGODB MODIFICATION: Disable the below MOZ_ASSERT calls when JIT is disabled, as these appear to be JIT specific checks.
#ifndef JS_CODEGEN_NONE
if (clasp->isNativeObject() && clasp != &WithEnvironmentObject::class_ &&
clasp != &ModuleEnvironmentObject::class_ &&
clasp != &RuntimeLexicalErrorObject::class_) {
@ -3597,7 +3595,6 @@ void js::AssertJSClassInvariants(const JSClass* clasp) {
MOZ_ASSERT(!clasp->getOpsGetOwnPropertyDescriptor());
MOZ_ASSERT(!clasp->getOpsDeleteProperty());
}
#endif
}
/* static */

View File

@ -9,7 +9,7 @@ set -vx
NAME=spidermonkey
LIB_GIT_BRANCH=spidermonkey-esr115.7-cpp-only
LIB_GIT_REVISION=8067826deecd3e89bdd85c80364ce5ce824c1f32
LIB_GIT_REVISION=bb6edb4fcd43607c87de81df8c58db11a663634a
LIB_GIT_REPO=git@github.com:mongodb-forks/spidermonkey.git
DEST_DIR=$(git rev-parse --show-toplevel)/src/third_party/mozjs