[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}
This commit is contained in:
ahaas 2017-01-23 02:56:08 -08:00 committed by Commit bot
parent 876da98a51
commit 1f069202e1

View File

@ -697,7 +697,7 @@ void WebAssemblyMemoryGrow(const v8::FunctionCallbackInfo<v8::Value>& args) {
i::Handle<i::WasmMemoryObject>::cast(Utils::OpenHandle(*args.This())); i::Handle<i::WasmMemoryObject>::cast(Utils::OpenHandle(*args.This()));
int64_t max_size64 = receiver->maximum_pages(); int64_t max_size64 = receiver->maximum_pages();
if (max_size64 < 0 || 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; max_size64 = i::wasm::kV8MaxWasmMemoryPages;
} }
i::Handle<i::JSArrayBuffer> old_buffer(receiver->buffer()); i::Handle<i::JSArrayBuffer> old_buffer(receiver->buffer());