Open programmin1 opened 10 years ago
As you can see, it is only modifying the results for trackStack, all others will call the original as usual.
Agreed, but in a fragile way (if (aMessage.filename.startsWith("resource://") && aMessage.filename.endsWith('trackStack.js'))
). It's unlikely, but possible that this collides with other files. It's also possible and more likely that the trackStack.js
file gets renamed (for instance if it's refactored into 2 files one day)
Now that I think about it, maybe the only thing to do is to replace console.error
calls with calls to logConsoleAPIMessage
(on the WebConsole of the current tab). This way, it's possible to configure the clickable filename without monkeypatching and weak inferences.
What do you think?
You're right, that would likely be a better approach. I just did a quick fix.
Fixes usefulstacktrace so it doesn't always go to trackstack.js for other scripts' stack traces.