mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-16 14:55:47 +00:00
Bug 1465470
Part 7 - Avoid calling getenv at non-deterministic points in the JS engine, r=jandem.
--HG-- extra : rebase_source : 0bb17c91e14565fe5d0b6fa87dce05e2d7ff4d14
This commit is contained in:
parent
871f2e4852
commit
b5f74e9778
@ -345,7 +345,8 @@ AlwaysPoison(void* ptr, uint8_t value, size_t num, MemCheckKind kind)
|
||||
static inline void
|
||||
Poison(void* ptr, uint8_t value, size_t num, MemCheckKind kind)
|
||||
{
|
||||
static bool disablePoison = bool(getenv("JSGC_DISABLE_POISONING"));
|
||||
static bool disablePoison = !mozilla::recordreplay::IsRecordingOrReplaying()
|
||||
&& bool(getenv("JSGC_DISABLE_POISONING"));
|
||||
if (!disablePoison)
|
||||
AlwaysPoison(ptr, value, num, kind);
|
||||
}
|
||||
|
@ -172,6 +172,8 @@ js::InferSpewActive(SpewChannel channel)
|
||||
if (!checked) {
|
||||
checked = true;
|
||||
PodArrayZero(active);
|
||||
if (mozilla::recordreplay::IsRecordingOrReplaying())
|
||||
return false;
|
||||
const char* env = getenv("INFERFLAGS");
|
||||
if (!env)
|
||||
return false;
|
||||
@ -194,6 +196,8 @@ static bool InferSpewColorable()
|
||||
static bool checked = false;
|
||||
if (!checked) {
|
||||
checked = true;
|
||||
if (mozilla::recordreplay::IsRecordingOrReplaying())
|
||||
return false;
|
||||
const char* env = getenv("TERM");
|
||||
if (!env)
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user