GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — lib: created isValidCallback validator by yashLadha · Pull Request #32665 · nodejs/node

Conversation

@yashLadha

@yashLadha yashLadha commented Apr 5, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

A crucial part of the timers function is to execute the callback function, and
this check is needed by several variants of timer functions and by other modules as well. So to
isolate the checking to a comman function that can be shared by different blocks and thus no need to reimplement the samee thing.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bricss reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@nodejs-github-bot nodejs-github-bot added the timers Issues and PRs related to timers, setImmediate(), setInterval(), and setTimeout(). label Apr 5, 2020
himself65
himself65 reviewed Apr 5, 2020
View reviewed changes

@himself65 himself65 left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

-1 because we call one more stack now. and not more readable for the coder

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@yashLadha

yashLadha commented Apr 5, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

@himself65 One can also say that repeating the code can be moved into one place, following DRY (Don't repeat your code).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

himself65
himself65 requested changes Apr 5, 2020
View reviewed changes
Comment thread lib/timers.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

@rickyes

rickyes commented Apr 5, 2020

Copy link
Copy Markdown
Contributor

Maybe it can be moved to lib/internal/validators.js

yashLadha reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@yashLadha

yashLadha commented Apr 5, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

@rickyes nice suggestion as this error code is being consumed by other modules as well. I think changing in other modules can be taken in some other PR as not related to the scope of this PR. Will go forward with timers in this PR.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@yashLadha
yashLadha force-pushed the refactor/timers_callback branch 2 times, most recently from a9a5337 to 7d4316e Compare April 5, 2020 12:03
@yashLadha yashLadha changed the title lib: created isValidCallback helper lib: created isValidCallback validator Apr 5, 2020
@yashLadha
lib: created isValidCallback helper
7ef2f2a
check for callback function is moved to a separate function.
This piece of code is being shared by other entities as well.
@yashLadha
yashLadha force-pushed the refactor/timers_callback branch from 7d4316e to 7ef2f2a Compare April 5, 2020 17:30
addaleax
addaleax approved these changes Apr 5, 2020
View reviewed changes
jasnell
jasnell approved these changes Apr 7, 2020
View reviewed changes
Flarna
Flarna approved these changes Apr 12, 2020
View reviewed changes
@nodejs-github-bot

nodejs-github-bot commented Apr 12, 2020

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/30657/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented Apr 12, 2020

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/30659/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

himself65
himself65 approved these changes Apr 14, 2020
View reviewed changes
himself65 pushed a commit that referenced this pull request Apr 14, 2020
@yashLadha @himself65
lib: created isValidCallback helper
55b4d03
check for callback function is moved to a separate function.
This piece of code is being shared by other entities as well.

PR-URL: #32665
Reviewed-By: Zeyu Yang <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
@himself65

himself65 commented Apr 14, 2020

Copy link
Copy Markdown
Member

Landed in 55b4d03

yashLadha reacted with hooray emoji
All reactions
  • 🎉 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@himself65 himself65 closed this Apr 14, 2020
BethGriggs pushed a commit that referenced this pull request Apr 14, 2020
@yashLadha @BethGriggs
lib: created isValidCallback helper
399749e
check for callback function is moved to a separate function.
This piece of code is being shared by other entities as well.

PR-URL: #32665
Reviewed-By: Zeyu Yang <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
@BethGriggs BethGriggs mentioned this pull request Apr 14, 2020
2020-04-21, Version 14.0.0 (Current) #32181
Merged
targos pushed a commit to targos/node that referenced this pull request Apr 25, 2020
@yashLadha @targos
lib: created isValidCallback helper
ca5215f
check for callback function is moved to a separate function.
This piece of code is being shared by other entities as well.

PR-URL: nodejs#32665
Reviewed-By: Zeyu Yang <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
BridgeAR pushed a commit that referenced this pull request Apr 28, 2020
@yashLadha @BridgeAR
lib: created isValidCallback helper
83f1e98
check for callback function is moved to a separate function.
This piece of code is being shared by other entities as well.

PR-URL: #32665
Reviewed-By: Zeyu Yang <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
@BridgeAR BridgeAR mentioned this pull request Apr 28, 2020
v13.14.0 proposal #33122
Merged
targos pushed a commit that referenced this pull request Apr 28, 2020
@yashLadha @targos
lib: created isValidCallback helper
5885b37
check for callback function is moved to a separate function.
This piece of code is being shared by other entities as well.

PR-URL: #32665
Reviewed-By: Zeyu Yang <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
@targos targos mentioned this pull request May 2, 2020
v12.17.0 release proposal #33197
Merged
@137717unity 137717unity mentioned this pull request Mar 22, 2024
[Snyk] Fix for 2 vulnerabilities 137717unity/node#122
Open
@baby636 baby636 mentioned this pull request Mar 22, 2024
[Snyk] Security upgrade gatsby from 2.24.27 to 3.13.0 baby636/node#136
Open
@kissofire kissofire mentioned this pull request Mar 22, 2024
[Snyk] Fix for 2 vulnerabilities kissofire/node#124
Open
@aliceUnhinged613 aliceUnhinged613 mentioned this pull request Mar 22, 2024
[Snyk] Fix for 2 vulnerabilities aliceUnhinged613/node#123
Open
@ron-a20 ron-a20 mentioned this pull request Mar 22, 2024
[Snyk] Fix for 2 vulnerabilities ron-a20/node#121
Open
@wedataintelligence wedataintelligence mentioned this pull request Mar 23, 2024
[Snyk] Fix for 2 vulnerabilities wedataintelligence/node#105
Open
@aliceUnhinged613 aliceUnhinged613 mentioned this pull request May 13, 2024
[Snyk] Fix for 1 vulnerabilities aliceUnhinged613/node#127
Open
@molllyn1 molllyn1 mentioned this pull request May 13, 2024
[Snyk] Fix for 2 vulnerabilities molllyn1/node#111
Open
@ron-a20 ron-a20 mentioned this pull request May 13, 2024
[Snyk] Fix for 2 vulnerabilities ron-a20/node#126
Open
@kissofire kissofire mentioned this pull request May 13, 2024
[Snyk] Fix for 2 vulnerabilities kissofire/node#128
Open
@137717unity 137717unity mentioned this pull request May 14, 2024
[Snyk] Fix for 2 vulnerabilities 137717unity/node#128
Open
@baby636 baby636 mentioned this pull request May 14, 2024
[Snyk] Fix for 2 vulnerabilities baby636/node#149
Open
@wedataintelligence wedataintelligence mentioned this pull request May 14, 2024
[Snyk] Fix for 2 vulnerabilities wedataintelligence/node#111
Open
@aliceUnhinged613 aliceUnhinged613 mentioned this pull request May 15, 2024
[Snyk] Fix for 1 vulnerabilities aliceUnhinged613/node#129
Open
@kissofire kissofire mentioned this pull request May 20, 2024
[Snyk] Fix for 1 vulnerabilities kissofire/node#130
Open
@aliceUnhinged613 aliceUnhinged613 mentioned this pull request May 21, 2024
[Snyk] Fix for 1 vulnerabilities aliceUnhinged613/node#130
Open
@wedataintelligence wedataintelligence mentioned this pull request May 21, 2024
[Snyk] Fix for 1 vulnerabilities wedataintelligence/node#112
Open
@137717unity 137717unity mentioned this pull request May 21, 2024
[Snyk] Fix for 1 vulnerabilities 137717unity/node#129
Open
@molllyn1 molllyn1 mentioned this pull request May 21, 2024
[Snyk] Fix for 1 vulnerabilities molllyn1/node#113
Open
@ron-a20 ron-a20 mentioned this pull request May 22, 2024
[Snyk] Fix for 1 vulnerabilities ron-a20/node#127
Open
@wedataintelligence wedataintelligence mentioned this pull request Oct 9, 2024
[Snyk] Fix for 3 vulnerabilities wedataintelligence/node#127
Open
@ron-a20 ron-a20 mentioned this pull request Oct 9, 2024
[Snyk] Fix for 3 vulnerabilities ron-a20/node#142
Open
@aliceUnhinged613 aliceUnhinged613 mentioned this pull request Oct 11, 2024
[Snyk] Fix for 4 vulnerabilities aliceUnhinged613/node#146
Open
@137717unity 137717unity mentioned this pull request Oct 13, 2024
[Snyk] Security upgrade gatsby from 2.18.18 to 3.13.0 137717unity/node#145
Open
@kissofire kissofire mentioned this pull request Oct 13, 2024
[Snyk] Security upgrade gatsby from 2.13.73 to 3.13.0 kissofire/node#147
Open
@137717unity 137717unity mentioned this pull request Oct 20, 2024
[Snyk] Security upgrade gatsby from 2.18.18 to 3.13.0 137717unity/node#146
Open
@kissofire kissofire mentioned this pull request Oct 20, 2024
[Snyk] Security upgrade gatsby from 2.13.73 to 3.13.0 kissofire/node#148
Open
@opekeye opekeye mentioned this pull request Oct 20, 2024
[Snyk] Security upgrade gatsby from 2.13.73 to 3.13.0 opekeye/node#17
Open
@molllyn1 molllyn1 mentioned this pull request Oct 22, 2024
[Snyk] Security upgrade gatsby from 2.18.18 to 3.13.0 molllyn1/node#131
Open
@wedataintelligence wedataintelligence mentioned this pull request Oct 22, 2024
[Snyk] Security upgrade gatsby from 2.18.18 to 3.13.0 wedataintelligence/node#129
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@himself65 himself65 himself65 approved these changes
@Flarna Flarna Flarna approved these changes
@jasnell jasnell jasnell approved these changes
@addaleax addaleax addaleax approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

timers Issues and PRs related to timers, setImmediate(), setInterval(), and setTimeout().

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

7 participants

@yashLadha @rickyes @nodejs-github-bot @himself65 @jasnell @addaleax @Flarna
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.