bug 603624 - Don't blacklist i9000 unless it's running 2.6.29. r=gal a=blocking-fennec
authorJacob Bramley <Jacob.Bramley@arm.com>
Tue, 16 Nov 2010 19:27:21 -0500
changeset 57624 fe92d201e2c45d4c506b19657352adf9ef7ef184
parent 57623 82930764023434b846a772f03a918e26c2512a55
child 57625 dab3886f5e70ebd02101f992936525d76a3133d0
push id1
push usershaver@mozilla.com
push dateTue, 04 Jan 2011 17:58:04 +0000
reviewersgal, blocking-fennec
bugs603624
milestone2.0b8pre
bug 603624 - Don't blacklist i9000 unless it's running 2.6.29. r=gal a=blocking-fennec
js/src/jscntxt.cpp
--- a/js/src/jscntxt.cpp
+++ b/js/src/jscntxt.cpp
@@ -2227,18 +2227,28 @@ ComputeIsJITBroken()
 {
 #ifndef 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);
+    if (line.npos == line.find("2.6.29")) {
+        // We're using something other than 2.6.29, so the JITs should work.
+        return false;
+    }
+
+    // We're using 2.6.29, and this causes trouble with the JITs on i9000.
     bool broken = false;
-    std::string line;
     std::ifstream cpuinfo("/proc/cpuinfo");
     do {
         if (0 == line.find("Hardware")) {
             const char* blacklist[] = {
                 "SGH-T959",     // Samsung i9000, Vibrant device
                 "SGH-I897",     // Samsung i9000, Captivate device
                 "SCH-I500",     // Samsung i9000, Fascinate device
                 "SPH-D700",     // Samsung i9000, Epic device