Skip to content
This repository has been archived by the owner on Feb 17, 2024. It is now read-only.

Commit

Permalink
We no longer need this
Browse files Browse the repository at this point in the history
  • Loading branch information
chriso committed Jun 1, 2023
1 parent f998867 commit 86d4592
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 29 deletions.
15 changes: 0 additions & 15 deletions replay.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import (
"github.com/stealthrocket/wasi-go/imports"
"github.com/stealthrocket/wasi-go/imports/wasi_snapshot_preview1"
"github.com/stealthrocket/wazergo"
"github.com/tetratelabs/wazero/sys"
)

const replayUsage = `
Expand Down Expand Up @@ -89,21 +88,7 @@ func replay(ctx context.Context, args []string) error {

var debugREPL *debug.REPL
if debugger {
defer func() {
if panicErr := recover(); panicErr != nil {
// We need this to handle the case of the REPL calling
// panic(sys.NewExitError(code)) before the module is started
// or after it has finished.
if exitErr, ok := panicErr.(*sys.ExitError); ok {
err = exitCode(exitErr.ExitCode())
return
}
panic(panicErr)
}
}()

debugREPL = debug.NewREPL(os.Stdin, os.Stdout)

ctx = debug.RegisterFunctionListener(ctx, debugREPL)
}

Expand Down
14 changes: 0 additions & 14 deletions run.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,21 +93,7 @@ func run(ctx context.Context, args []string) error {

var debugREPL *debug.REPL
if debugger {
defer func() {
if panicErr := recover(); panicErr != nil {
// We need this to handle the case of the REPL calling
// panic(sys.NewExitError(code)) before the module is started
// or after it has finished.
if exitErr, ok := panicErr.(*sys.ExitError); ok {
err = exitCode(exitErr.ExitCode())
return
}
panic(panicErr)
}
}()

debugREPL = debug.NewREPL(os.Stdin, os.Stdout)

ctx = debug.RegisterFunctionListener(ctx, debugREPL)
}

Expand Down

0 comments on commit 86d4592

Please sign in to comment.