By enabling std::function wrapped JSFunctions, we would allow lambda functions to be used as native JS functions. This would be useful for instance in the implementation of ReadableStream operating on JS sources. The close, error and enqueue JS functions need to retrieve in some manner the stream to operate on.
Created attachment 250081 [details] WIP
Fixed as part of bug 145792