[roheap] Make nosnap and read-only heap sharing mutually exclusive

Bug: v8:7464
Change-Id: I09e5d66a2dc369d031691ef04cd8bb34bb40278e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1642808
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Maciej Goszczycki <goszczycki@google.com>
Cr-Commit-Position: refs/heads/master@{#61985}
diff --git a/BUILD.gn b/BUILD.gn
index b97b4b1..0eef92a 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -242,6 +242,8 @@
 assert(
     !v8_enable_pointer_compression || !v8_enable_shared_ro_heap,
     "Pointer compression is not supported with shared read-only heap enabled")
+assert(v8_use_snapshot || !v8_enable_shared_ro_heap,
+       "Shared read-only heap requires snapshot")
 
 v8_random_seed = "314159265"
 v8_toolset_for_shell = "host"