| Index: src/wasm/wasm-debug.cc
|
| diff --git a/src/wasm/wasm-debug.cc b/src/wasm/wasm-debug.cc
|
| index bbdf985219022ce4f9c0a7d9854e3041b7b14e26..f1b01593cf437415f2d4143af5e03734149a2851 100644
|
| --- a/src/wasm/wasm-debug.cc
|
| +++ b/src/wasm/wasm-debug.cc
|
| @@ -120,11 +120,6 @@ JSObject *WasmDebugInfo::wasm_object() {
|
| return JSObject::cast(get(kWasmDebugInfoWasmObj));
|
| }
|
|
|
| -bool WasmDebugInfo::SetBreakPoint(int byte_offset) {
|
| - // TODO(clemensh): Implement this.
|
| - return false;
|
| -}
|
| -
|
| Script *WasmDebugInfo::GetFunctionScript(Handle<WasmDebugInfo> debug_info,
|
| int func_index) {
|
| Isolate *isolate = debug_info->GetIsolate();
|
| @@ -149,6 +144,16 @@ Script *WasmDebugInfo::GetFunctionScript(Handle<WasmDebugInfo> debug_info,
|
| scripts->set(func_index, *script);
|
|
|
| script->set_type(Script::TYPE_WASM);
|
| + script->set_wasm_object(debug_info->wasm_object());
|
| + script->set_wasm_function_index(func_index);
|
| +
|
| + int hash = 0;
|
| + debug_info->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);
|
|
|
| int func_bytes_len =
|
| GetFunctionOffsetAndLength(debug_info, func_index).second;
|
| @@ -157,7 +162,7 @@ Script *WasmDebugInfo::GetFunctionScript(Handle<WasmDebugInfo> debug_info,
|
| line_ends->set_map(isolate->heap()->fixed_cow_array_map());
|
| script->set_line_ends(*line_ends);
|
|
|
| - // TODO(clemensh): Register this new script at the debugger.
|
| + isolate->debug()->OnAfterCompile(script);
|
|
|
| return *script;
|
| }
|
|
|