| Index: src/wasm/wasm-debug.cc
|
| diff --git a/src/wasm/wasm-debug.cc b/src/wasm/wasm-debug.cc
|
| index 54e71009353715807c70773381c6a6de309d6830..ebd3a5a0410aeafa5de681655eacb866daf23b0b 100644
|
| --- a/src/wasm/wasm-debug.cc
|
| +++ b/src/wasm/wasm-debug.cc
|
| @@ -32,11 +32,15 @@ ByteArray *GetOrCreateFunctionOffsetTable(Handle<WasmDebugInfo> debug_info) {
|
| FunctionOffsetsResult function_offsets;
|
| {
|
| DisallowHeapAllocation no_gc;
|
| + Handle<JSObject> wasm_object(debug_info->wasm_object(), isolate);
|
| + uint32_t num_imported_functions =
|
| + wasm::GetNumImportedFunctions(wasm_object);
|
| SeqOneByteString *wasm_bytes =
|
| wasm::GetWasmBytes(debug_info->wasm_object());
|
| const byte *bytes_start = wasm_bytes->GetChars();
|
| const byte *bytes_end = bytes_start + wasm_bytes->length();
|
| - function_offsets = wasm::DecodeWasmFunctionOffsets(bytes_start, bytes_end);
|
| + function_offsets = wasm::DecodeWasmFunctionOffsets(bytes_start, bytes_end,
|
| + num_imported_functions);
|
| }
|
| DCHECK(function_offsets.ok());
|
| size_t array_size = 2 * kIntSize * function_offsets.val.size();
|
|
|