Index: codex-rs/modcargo-crates/v8-146.4.0/v8/src/heap/memory-allocator.cc
--- codex-rs/modcargo-crates/v8-146.4.0/v8/src/heap/memory-allocator.cc.orig
+++ codex-rs/modcargo-crates/v8-146.4.0/v8/src/heap/memory-allocator.cc
@@ -675,10 +675,10 @@ bool MemoryAllocator::SetPermissionsOnExecutableMemory
   DCHECK_EQ(0, chunk_size % GetCommitPageSize());
 
   if (isolate_->RequiresCodeRange()) {
-    // The pages of the code range are already mapped RWX, we just need to
-    // recommit them.
+    // The pages of the code range are already mapped for code modification, we
+    // just need to recommit them.
     return vm->RecommitPages(start, chunk_size,
-                             PageAllocator::kReadWriteExecute);
+                             MutablePage::GetCodeModificationPermission());
   } else {
     return vm->SetPermissions(start, chunk_size,
                               MutablePage::GetCodeModificationPermission());
