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

Promise.delay() does not produce long stack traces #1182

Closed
ben-page opened this issue Aug 4, 2016 · 1 comment
Closed

Promise.delay() does not produce long stack traces #1182

ben-page opened this issue Aug 4, 2016 · 1 comment

Comments

@ben-page
Copy link
Contributor

@ben-page ben-page commented Aug 4, 2016

  1. What version of bluebird is the issue happening on? 3.4.1

  2. What platform and version? (For example Node.js 0.12 or Google Chrome 32) Node.js 4.7.1 on Windows x64 There is no call stack at all on newer version of Node. See #1181

  3. Did this issue happen with earlier version of bluebird? Yes

Promise.resolve()
    .then(() => {
        Promise.delay(1000)
            .then(() => {
                console.log('inner');
            })
    })
    .then(() => {
        console.log('outer');
    });

Console

Warning: a promise was created in a handler but was not returned from it
    at processImmediate [as _immediateCallback] (timers.js:383:17)

outer
inner
@ben-page
Copy link
Contributor Author

@ben-page ben-page commented Aug 5, 2016

It looks like delay is missing a call to _captureStackTrace(). I added it in the PR.

@ben-page ben-page changed the title runaway promise caused by Promise.delay() does not produce a useful call stack runaway promise caused by Promise.delay() does have long stack traces Aug 5, 2016
@ben-page ben-page changed the title runaway promise caused by Promise.delay() does have long stack traces Promise.delay() does not produce long stack traces Aug 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.