From 19f8efe4edca86c366f393ade9e3ccb32e2179e0 Mon Sep 17 00:00:00 2001 From: Ryan VanderMeulen Date: Fri, 21 Feb 2014 13:32:16 -0500 Subject: [PATCH] Backed out changeset 2b2f69d46d30 (bug 975182) for SM(arm) failures. CLOSED TREE --- js/src/jit-test/tests/asm.js/testBug975182.js | 18 ------------------ js/src/jit/AsmJSSignalHandlers.cpp | 4 ++-- 2 files changed, 2 insertions(+), 20 deletions(-) delete mode 100644 js/src/jit-test/tests/asm.js/testBug975182.js diff --git a/js/src/jit-test/tests/asm.js/testBug975182.js b/js/src/jit-test/tests/asm.js/testBug975182.js deleted file mode 100644 index 3ff0bb5bd326..000000000000 --- a/js/src/jit-test/tests/asm.js/testBug975182.js +++ /dev/null @@ -1,18 +0,0 @@ -Function("\ - g = (function(t,foreign){\ - \"use asm\";\ - var ff = foreign.ff;\ - function f() {\ - +ff()\ - }\ - return f\ - })(this, {\ - ff: arguments.callee\ - }, ArrayBuffer(4096))\ -")() -function m(f) { - for (var j = 0; j < 6000; ++j) { - f(); - } -} -m(g); diff --git a/js/src/jit/AsmJSSignalHandlers.cpp b/js/src/jit/AsmJSSignalHandlers.cpp index 2baa3cf928ff..040026306c03 100644 --- a/js/src/jit/AsmJSSignalHandlers.cpp +++ b/js/src/jit/AsmJSSignalHandlers.cpp @@ -1031,10 +1031,10 @@ js::TriggerOperationCallbackForAsmJSCode(JSRuntime *rt) #if defined(XP_WIN) DWORD oldProtect; - if (!VirtualProtect(module.codeBase(), module.functionBytes(), PAGE_READWRITE, &oldProtect)) + if (!VirtualProtect(module.codeBase(), module.functionBytes(), PAGE_NOACCESS, &oldProtect)) MOZ_CRASH(); #else // assume Unix - if (mprotect(module.codeBase(), module.functionBytes(), PROT_READ|PROT_WRITE)) + if (mprotect(module.codeBase(), module.functionBytes(), PROT_NONE)) MOZ_CRASH(); #endif }