Index: src/wasm/wasm-js.cc |
diff --git a/src/wasm/wasm-js.cc b/src/wasm/wasm-js.cc |
index 6529810918bcac9ffecd17a57737cd70c349e026..88b9e1682fea79fe1296171ce6e7a2085890017f 100644 |
--- a/src/wasm/wasm-js.cc |
+++ b/src/wasm/wasm-js.cc |
@@ -546,9 +546,12 @@ void WasmJs::InstallWasmFunctionMap(Isolate* isolate, Handle<Context> context) { |
CHECK_EQ(0, internal_fields); |
int pre_allocated = |
prev_map->GetInObjectProperties() - prev_map->unused_property_fields(); |
- int instance_size; |
- int in_object_properties; |
- JSFunction::CalculateInstanceSizeHelper(instance_type, internal_fields + 1, |
+ int instance_size = 0; |
+ int in_object_properties = 0; |
+ int wasm_internal_fields = internal_fields + 1 // module instance object |
+ + 1 // function arity |
+ + 1; // function signature |
+ JSFunction::CalculateInstanceSizeHelper(instance_type, wasm_internal_fields, |
0, &instance_size, |
&in_object_properties); |