• Sina Mahmoodi's avatar
    eth/tracers/js: drop duktape engine (#24934) · ba47d800
    Sina Mahmoodi authored
    #23773 added a JS tracer which uses Goja as its engine. In this PR I remove the previous tracer which used duktape as well as remove the dependencies.
    
    This PR also comes with 2 fixes in the Goja tracer and one small behavioural change:
    
        I had handled errors in the native Go functions by panicing. My oversight was that Goja only handles panics with a Goja.Value as argument. The difference is panic(goja.Value) allows JS to catch the exception whereas Interrupt(error) doesn't.
        There was a race in how I handled Stop.
        Because of 1. some of the methods that simply return nil on error (like memory.slice) now throw an exception.
    ba47d800
calltrace_test.go 13.6 KB