Commit 1f069202 authored by ahaas's avatar ahaas Committed by Commit bot

[wasm] Fix a typo in wasm-js.cc

I guess that a comparison with i::wasm::kV8MaxWasmTableSize was not
intended here. I did not add a test because I do not even know if it is
even possible to create a WasmMemoryObject with
maximum_pages > i::wasm::kV8MaxWasmMemoryPages. Maybe we should replace
the condition with a Check instead.

R=titzer@chromium.org

Review-Url: https://codereview.chromium.org/2645273004
Cr-Commit-Position: refs/heads/master@{#42596}
parent 876da98a
......@@ -697,7 +697,7 @@ void WebAssemblyMemoryGrow(const v8::FunctionCallbackInfo<v8::Value>& args) {
i::Handle<i::WasmMemoryObject>::cast(Utils::OpenHandle(*args.This()));
int64_t max_size64 = receiver->maximum_pages();
if (max_size64 < 0 ||
max_size64 > static_cast<int64_t>(i::wasm::kV8MaxWasmTableSize)) {
max_size64 > static_cast<int64_t>(i::wasm::kV8MaxWasmMemoryPages)) {
max_size64 = i::wasm::kV8MaxWasmMemoryPages;
}
i::Handle<i::JSArrayBuffer> old_buffer(receiver->buffer());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment