diff --git a/src/wasm/wasm-js.cc b/src/wasm/wasm-js.cc index 9d14de5223..dd9316fced 100644 --- a/src/wasm/wasm-js.cc +++ b/src/wasm/wasm-js.cc @@ -697,7 +697,7 @@ void WebAssemblyMemoryGrow(const v8::FunctionCallbackInfo& args) { i::Handle::cast(Utils::OpenHandle(*args.This())); int64_t max_size64 = receiver->maximum_pages(); if (max_size64 < 0 || - max_size64 > static_cast(i::wasm::kV8MaxWasmTableSize)) { + max_size64 > static_cast(i::wasm::kV8MaxWasmMemoryPages)) { max_size64 = i::wasm::kV8MaxWasmMemoryPages; } i::Handle old_buffer(receiver->buffer());