Index: src/wasm/wasm-objects.cc |
diff --git a/src/wasm/wasm-objects.cc b/src/wasm/wasm-objects.cc |
index c55febcd23ea4d300c97bf92f72e6b0430cd80a3..7d9d2297127079e302115e807e65e7969329b14e 100644 |
--- a/src/wasm/wasm-objects.cc |
+++ b/src/wasm/wasm-objects.cc |
@@ -184,7 +184,8 @@ Handle<WasmTableObject> WasmTableObject::New(Isolate* isolate, uint32_t initial, |
} |
table_obj->set_functions(**js_functions); |
DCHECK_EQ(maximum, static_cast<int>(maximum)); |
- table_obj->set_maximum_length(static_cast<int>(maximum)); |
+ Handle<Object> max = isolate->factory()->NewNumber(maximum); |
+ table_obj->set_maximum_length(*max); |
Handle<FixedArray> dispatch_tables = isolate->factory()->NewFixedArray(0); |
table_obj->set_dispatch_tables(*dispatch_tables); |