Skip to content

js/wasm: wrong this argument passed in wasm_exec::_makeFuncWrapper #74927

@EnoahNetzach

Description

@EnoahNetzach

Go version

latest

Output of go env in your module/workspace:

not necessary

What did you do?

I tried building a wasm executable for go GOOS=js GOARCH=wasm GOHOSTOS=darwin GOHOSTARCH=arm64 GO_BUILDER_NAME=js_wasm ./bootstrap.bash

What did you see happen?

When _makeFuncWrapper is called, the this field in the event is taken within the anonymous function context, which sets it to undefined.

What did you expect to see?

Since there is already const go = this outside of this lambda, then I guess that is what needs to be used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugReportIssues describing a possible bug in the Go implementation.NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.OS-JSarch-wasmWebAssembly issues

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions