Bug 1533733: Delete obsolete workaround r=mgaudet

Differential Revision: https://phabricator.services.mozilla.com/D22705

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Iain Ireland 2019-03-08 15:28:40 +00:00
Родитель 9558207189
Коммит 54ccd86c68
2 изменённых файлов: 0 добавлений и 73 удалений

Просмотреть файл

@ -1278,7 +1278,6 @@ JSContext::JSContext(JSRuntime* runtime, const JS::ContextOptions& options)
generatingError(false),
cycleDetectorVector_(this),
data(nullptr),
jitIsBroken(false),
asyncCauseForNewActivations(nullptr),
asyncCallIsExplicit(false),
interruptCallbackDisabled(false),
@ -1380,74 +1379,6 @@ bool JSContext::isThrowingDebuggeeWouldRun() {
JSEXN_DEBUGGEEWOULDRUN;
}
static bool ComputeIsJITBroken() {
#if !defined(ANDROID)
return false;
#else // ANDROID
if (getenv("JS_IGNORE_JIT_BROKENNESS")) {
return false;
}
std::string line;
// Check for the known-bad kernel version (2.6.29).
std::ifstream osrelease("/proc/sys/kernel/osrelease");
std::getline(osrelease, line);
__android_log_print(ANDROID_LOG_INFO, "Gecko", "Detected osrelease `%s'",
line.c_str());
if (line.npos == line.find("2.6.29")) {
// We're using something other than 2.6.29, so the JITs should work.
__android_log_print(ANDROID_LOG_INFO, "Gecko", "JITs are not broken");
return false;
}
// We're using 2.6.29, and this causes trouble with the JITs on i9000.
line = "";
bool broken = false;
std::ifstream cpuinfo("/proc/cpuinfo");
do {
if (0 == line.find("Hardware")) {
static const char* const blacklist[] = {
"SCH-I400", // Samsung Continuum
"SGH-T959", // Samsung i9000, Vibrant device
"SGH-I897", // Samsung i9000, Captivate device
"SCH-I500", // Samsung i9000, Fascinate device
"SPH-D700", // Samsung i9000, Epic device
"GT-I9000", // Samsung i9000, UK/Europe device
nullptr};
for (const char* const* hw = &blacklist[0]; *hw; ++hw) {
if (line.npos != line.find(*hw)) {
__android_log_print(ANDROID_LOG_INFO, "Gecko",
"Blacklisted device `%s'", *hw);
broken = true;
break;
}
}
break;
}
std::getline(cpuinfo, line);
} while (!cpuinfo.fail() && !cpuinfo.eof());
__android_log_print(ANDROID_LOG_INFO, "Gecko", "JITs are %sbroken",
broken ? "" : "not ");
return broken;
#endif // ifndef ANDROID
}
static bool IsJITBrokenHere() {
static bool computedIsBroken = false;
static bool isBroken = false;
if (!computedIsBroken) {
isBroken = ComputeIsJITBroken();
computedIsBroken = true;
}
return isBroken;
}
void JSContext::updateJITEnabled() { jitIsBroken = IsJITBrokenHere(); }
size_t JSContext::sizeOfExcludingThis(
mozilla::MallocSizeOf mallocSizeOf) const {
/*

Просмотреть файл

@ -718,10 +718,6 @@ struct JSContext : public JS::RootingContext,
bool runtimeMatches(JSRuntime* rt) const { return runtime_ == rt; }
js::ThreadData<bool> jitIsBroken;
void updateJITEnabled();
private:
/*
* Youngest frame of a saved stack that will be picked up as an async stack