Index: src/wasm/wasm-limits.h |
diff --git a/src/wasm/wasm-limits.h b/src/wasm/wasm-limits.h |
index 56517ede6432222aafe4e1748e30fb190055480a..63326fffa201b71dff63ef738eab98472986c24b 100644 |
--- a/src/wasm/wasm-limits.h |
+++ b/src/wasm/wasm-limits.h |
@@ -9,14 +9,25 @@ namespace v8 { |
namespace internal { |
namespace wasm { |
-const size_t kV8MaxWasmSignatures = 10000000; |
-const size_t kV8MaxWasmFunctions = 10000000; |
+// The following limits are imposed by V8 on WebAssembly modules. |
+// The limits are agreed upon with other engines for consistency. |
+const size_t kV8MaxWasmTypes = 1000000; |
+const size_t kV8MaxWasmFunctions = 1000000; |
+const size_t kV8MaxWasmImports = 100000; |
+const size_t kV8MaxWasmExports = 100000; |
+const size_t kV8MaxWasmGlobals = 1000000; |
+const size_t kV8MaxWasmDataSegments = 100000; |
const size_t kV8MaxWasmMemoryPages = 16384; // = 1 GiB |
const size_t kV8MaxWasmStringSize = 256; |
const size_t kV8MaxWasmModuleSize = 1024 * 1024 * 1024; // = 1 GiB |
const size_t kV8MaxWasmFunctionSize = 128 * 1024; |
const size_t kV8MaxWasmFunctionLocals = 50000; |
+const size_t kV8MaxWasmFunctionParams = 1000; |
+const size_t kV8MaxWasmFunctionMultiReturns = 1000; |
+const size_t kV8MaxWasmFunctionReturns = 1; |
const size_t kV8MaxWasmTableSize = 16 * 1024 * 1024; |
+const size_t kV8MaxWasmTables = 1; |
+const size_t kV8MaxWasmMemories = 1; |
const size_t kSpecMaxWasmMemoryPages = 65536; |