nolanlawson / fuite

A tool for finding memory leaks in web apps
Apache License 2.0
4.26k stars 70 forks source link

Event Listeners line and column numbers don't match with the source code #116

Open KamruzzamanAsif opened 2 weeks ago

KamruzzamanAsif commented 2 weeks ago

I came out with a problem with the output. At output, the line numbers and column numbers for event listeners don't match with the source code.

image

Here the line number is 33.

image

But actually in source code the line number is 10.

Note: mousemove is a custom event listener. I am running code in localhost. The code isn't minified.

nolanlawson commented 2 weeks ago

Thanks for filing! I think the issue here is that we only call resolveSourceMappedPositions for stacktraces from leaking collections. We don't do any sourcemapping for the event listener object.

https://github.com/nolanlawson/fuite/blob/6006b8cf30ded46e0c6c2c530feecbadc82bde2d/src/prettifyStacktrace.js#L20