Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Q module fails to load if e.stack throws #796

Open
murrayju opened this issue Dec 9, 2016 · 0 comments
Open

Q module fails to load if e.stack throws #796

murrayju opened this issue Dec 9, 2016 · 0 comments

Comments

@murrayju
Copy link

murrayju commented Dec 9, 2016

The hasStacks logic at q.js#L86 could throw an Error, causing the module to fail to load. This can happen when something has overridden Error.prepareStackTrace() with a function that might throw. Although it looks like a property, e.stack will actually evaluate Error.prepareStackTrace() (and cache the result).

The solution is probably to surround e.stack in a try/catch.

A real example with more details can be found at jashkenas/coffeescript#4391.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant