Commit 74ff9bc
committed
timers: minor _unrefActive fixes and improvements
This commit addresses most of the review comments in
#2540, which are kept in this
separate commit so as to better preserve the prior two patches as they
landed in 0.12.
This commit:
- Fixes a bug with unrefActive timers and disposed domains.
- Fixes a bug with unrolling an unrefActive timer from another.
- Adds a test for both above bugs.
- Improves check logic, making it stricter, simpler, or both.
- Optimizes nicer with a smaller, separate function for the try/catch.
Fixes: nodejs/node-convergence-archive#23
Ref: #268
PR-URL: #2540
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>1 parent 5d14a6e commit 74ff9bcCopy full SHA for 74ff9bc
File tree
Expand file treeCollapse file tree
2 files changed
+68
-17
lines changedOpen diff view settings
Filter options
- lib
- test/parallel
Expand file treeCollapse file tree
2 files changed
+68
-17
lines changedOpen diff view settings
Collapse file
+22-17Lines changed: 22 additions & 17 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
481 | 481 | |
482 | 482 | |
483 | 483 | |
| 484 | + |
| 485 | + |
484 | 486 | |
485 | 487 | |
486 | | - |
| 488 | + |
487 | 489 | |
488 | 490 | |
489 | 491 | |
490 | 492 | |
491 | 493 | |
492 | | - |
493 | | - |
| 494 | + |
| 495 | + |
| 496 | + |
494 | 497 | |
495 | | - |
496 | | - |
| 498 | + |
| 499 | + |
497 | 500 | |
498 | | - |
| 501 | + |
| 502 | + |
| 503 | + |
499 | 504 | |
500 | | - |
501 | | - |
502 | | - |
503 | | - |
| 505 | + |
| 506 | + |
| 507 | + |
504 | 508 | |
| 509 | + |
| 510 | + |
| 511 | + |
| 512 | + |
505 | 513 | |
506 | | - |
507 | | - |
508 | | - |
509 | 514 | |
510 | 515 | |
511 | 516 | |
| ||
519 | 524 | |
520 | 525 | |
521 | 526 | |
522 | | - |
| 527 | + |
523 | 528 | |
524 | 529 | |
525 | 530 | |
| ||
534 | 539 | |
535 | 540 | |
536 | 541 | |
537 | | - |
| 542 | + |
538 | 543 | |
539 | 544 | |
540 | 545 | |
| ||
543 | 548 | |
544 | 549 | |
545 | 550 | |
546 | | - |
| 551 | + |
547 | 552 | |
548 | 553 | |
549 | 554 | |
| ||
569 | 574 | |
570 | 575 | |
571 | 576 | |
572 | | - |
| 577 | + |
573 | 578 | |
574 | 579 | |
575 | 580 | |
|
Collapse file
test/parallel/test-timers-unref-active-unenrolled-disposed.js
Copy file name to clipboard+46Lines changed: 46 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
0 commit comments