| Index: src/wasm/wasm-debug.cc
|
| diff --git a/src/wasm/wasm-debug.cc b/src/wasm/wasm-debug.cc
|
| index 3e464ed4e82a27d4bb26c674dd9d3ccba1c740bc..7d4aa5e5eec3e9992408e8aec3b72ad7af7411fb 100644
|
| --- a/src/wasm/wasm-debug.cc
|
| +++ b/src/wasm/wasm-debug.cc
|
| @@ -145,6 +145,16 @@ Script *WasmDebugInfo::GetFunctionScript(int func_index) {
|
| scripts->set(func_index, *script);
|
|
|
| script->set_type(Script::TYPE_WASM);
|
| + script->set_wasm_object(*wasm);
|
| + script->set_wasm_function_index(func_index);
|
| +
|
| + int hash = 0;
|
| + get(kWasmDebugInfoWasmBytesHash)->ToInt32(&hash);
|
| + char buffer[32];
|
| + SNPrintF(ArrayVector(buffer), "wasm://%08x/%d", hash, func_index);
|
| + Handle<String> source_url =
|
| + isolate->factory()->NewStringFromAsciiChecked(buffer, TENURED);
|
| + script->set_source_url(*source_url);
|
|
|
| Handle<ByteArray> offset_arr(GetOrCreateFunctionOffsetTable(this), isolate);
|
| int func_bytes_len = offset_arr->get_int(2 * func_index + 1);
|
| @@ -153,11 +163,7 @@ Script *WasmDebugInfo::GetFunctionScript(int func_index) {
|
| line_ends->set_map(isolate->heap()->fixed_cow_array_map());
|
| script->set_line_ends(*line_ends);
|
|
|
| - int hash = 0;
|
| - get(kWasmDebugInfoWasmBytesHash)->ToInt32(&hash);
|
| -
|
| - // TODO(clemensh): Register this new script at the debugger.
|
| - USE(hash);
|
| + isolate->debug()->OnAfterCompile(script);
|
|
|
| return *script;
|
| }
|
|
|