Index: src/third_party/mozjs/mozilla-release/js/src/jit/ProcessExecutableMemory.h
--- src/third_party/mozjs/mozilla-release/js/src/jit/ProcessExecutableMemory.h.orig
+++ src/third_party/mozjs/mozilla-release/js/src/jit/ProcessExecutableMemory.h
@@ -14,7 +14,9 @@ namespace jit {
 
 // Limit on the number of bytes of executable memory to prevent JIT spraying
 // attacks.
-#if JS_BITS_PER_WORD == 32
+// attacks. Default datasize is 768Mb on OpenBSD, keep MaxCodeBytesPerProcess
+// low there otherwise the js engine hits ulimit quickly.
+#if JS_BITS_PER_WORD == 32 || defined(__OpenBSD__)
 static const size_t MaxCodeBytesPerProcess = 140 * 1024 * 1024;
 #else
 // This is the largest number which satisfies various alignment static
