lib: fix undefined timeout regression by rmg · Pull Request #3331 · nodejs/node · GitHub
Skip to content

lib: fix undefined timeout regression#3331

Closed
rmg wants to merge 1 commit into
nodejs:masterfrom
rmg:fix-undefined-timeouts
Closed

lib: fix undefined timeout regression#3331
rmg wants to merge 1 commit into
nodejs:masterfrom
rmg:fix-undefined-timeouts

Conversation

@rmg

@rmg rmg commented Oct 12, 2015

Copy link
Copy Markdown
Contributor

63644dd introduced a regression caused by everyone's favourite
JavaScript feature: undefined < 0 === undefined >= 0.

Add a case to the existing tests to cover this scenario and then add
the check for undefined that makes the test pass.

@indutny @jasnell this should fix at least one of the v4.2.0 regressions.

Comment thread lib/timers.js Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of util.isUndefined, should be probably just be msecs === undefined

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure thing, incoming..

@indutny

indutny commented Oct 12, 2015

Copy link
Copy Markdown
Member

LGTM, cc @jasnell

@indutny indutny added timers Issues and PRs related to the timers subsystem / setImmediate, setInterval, setTimeout. land-on-v4.x labels Oct 12, 2015
@evanlucas

Copy link
Copy Markdown
Contributor

yea, LGTM other than that

@rmg rmg force-pushed the fix-undefined-timeouts branch from d66d408 to e2c2b44 Compare October 12, 2015 23:18
@rmg

rmg commented Oct 12, 2015

Copy link
Copy Markdown
Contributor Author

Fixed the msecs === undefined nit and added a missing trailing ,. @indutny @evanlucas better?

@indutny

indutny commented Oct 12, 2015

Copy link
Copy Markdown
Member

LGTM

indutny pushed a commit that referenced this pull request Oct 12, 2015
63644dd introduced a regression caused by everyone's favourite
JavaScript feature: undefined < 0 === undefined >= 0.

Add a case to the existing tests to cover this scenario and then add
the check for undefined that makes the test pass.

PR-URL: #3331
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed By: Evan Lucas <evanlucas@me.com>
@evanlucas

Copy link
Copy Markdown
Contributor

are we doing trailing commas?

@indutny

indutny commented Oct 12, 2015

Copy link
Copy Markdown
Member

Landed in bde32f8. Forgot to run CI :(

Thank you!

@indutny

indutny commented Oct 12, 2015

Copy link
Copy Markdown
Member

Argh, I have overlooked it. No, we don't

@rmg

rmg commented Oct 12, 2015

Copy link
Copy Markdown
Contributor Author

sorry! should I bother fixing?

63644dd introduced a regression caused by everyone's favourite
JavaScript feature: undefined < 0 === undefined >= 0.

Add a case to the existing tests to cover this scenario and then add
the check for undefined that makes the test pass.
@rmg rmg force-pushed the fix-undefined-timeouts branch from e2c2b44 to 1e14233 Compare October 12, 2015 23:29
@rmg

rmg commented Oct 12, 2015

Copy link
Copy Markdown
Contributor Author

guess I probably shouldn't have force pushed the fix for the trailing comma.. oh well.

@Trott

Trott commented Oct 13, 2015

Copy link
Copy Markdown
Member

I'm impressed/terrified that this edge case surfaced so quickly. Thanks for finding/fixing.

jasnell pushed a commit that referenced this pull request Oct 13, 2015
63644dd introduced a regression caused by everyone's favourite
JavaScript feature: undefined < 0 === undefined >= 0.

Add a case to the existing tests to cover this scenario and then add
the check for undefined that makes the test pass.

PR-URL: #3331
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed By: Evan Lucas <evanlucas@me.com>
@jasnell

jasnell commented Oct 13, 2015

Copy link
Copy Markdown
Member

Landed in v4.x in c245a19

@jasnell jasnell closed this Oct 13, 2015
jasnell added a commit that referenced this pull request Oct 13, 2015
* Includes fixes for two regressions
  - Assertion error in WeakCallback  - see [#3329](#3329)
  - Undefined timeout regression - see [#3331](#3331)
jasnell added a commit that referenced this pull request Oct 13, 2015
* Includes fixes for two regressions
  - Assertion error in WeakCallback  - see [#3329](#3329)
  - Undefined timeout regression - see [#3331](#3331)
@Fishrock123

Copy link
Copy Markdown
Contributor

Oops.

@chrisabrams

Copy link
Copy Markdown

Thanks for this - really appreciate the quick turn around for those of us relying on this fix and using LTS!

@rmg

rmg commented Oct 13, 2015

Copy link
Copy Markdown
Contributor Author

@rmg rmg deleted the fix-undefined-timeouts branch October 13, 2015 16:03
jasnell added a commit that referenced this pull request Oct 13, 2015
* Includes fixes for two regressions
  - Assertion error in WeakCallback  - see [#3329](#3329)
  - Undefined timeout regression - see [#3331](#3331)

* Document an additional known issue with pipelined requests
  - See: #3332 and #3342
jasnell added a commit that referenced this pull request Oct 13, 2015
* Includes fixes for two regressions
  - Assertion error in WeakCallback  - see [#3329](#3329)
  - Undefined timeout regression - see [#3331](#3331)

* Document an additional known issue with pipelined requests
  - See: #3332 and #3342
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

timers Issues and PRs related to the timers subsystem / setImmediate, setInterval, setTimeout.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants