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

timers: fixing API refs to use safe internal refs #2500

Closed
wants to merge 1 commit into from
Closed

timers: fixing API refs to use safe internal refs #2500

wants to merge 1 commit into from

Conversation

getify
Copy link
Contributor

@getify getify commented Aug 23, 2015

Added safe internal references for 'clearTimeout(..)', 'active(..)', and
'unenroll(..)'. Changed various API refs from 'export.*' to use these
safe internal references.

Now, overwriting the global API identifiers does not create potential
breakage and/or race conditions. See Issue #2493.

Added safe internal references for 'clearTimeout(..)', 'active(..)', and
'unenroll(..)'. Changed various API refs from 'export.*' to use these
safe internal references.

Now, overwriting the global API identifiers does not create potential
breakage and/or race conditions. See Issue #2493.
@Fishrock123
Copy link
Contributor

@Fishrock123 Fishrock123 added the timers Issues and PRs related to the timers subsystem / setImmediate, setInterval, setTimeout. label Aug 23, 2015
@getify
Copy link
Contributor Author

getify commented Aug 23, 2015

The only failures appear to be two of the arm builds on raspberry pi's, and the failures seem to be related to not being able to reach a URL.

@@ -158,7 +158,7 @@ exports.enroll = function(item, msecs) {

// call this whenever the item is active (not idle)
// it will reset its timeout.
exports.active = function(item) {
const active = exports.active = function(item) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I've been thinking about it and I think it would be best to only do this for the globals, so only clearTimeout in this patch. (Plus we also don't test active/{un}enroll and there's not a terribly good reason to.

@Fishrock123 Fishrock123 self-assigned this Aug 28, 2015
@Fishrock123
Copy link
Contributor

@getify Sorry for taking a bit. I'm not sure if it is better to define these locally or just always use the ones on exports. :s

@jasnell
Copy link
Member

jasnell commented Nov 16, 2015

@Fishrock123 @getify ... any further thoughts on this one?

@jasnell jasnell added the stalled Issues and PRs that are stalled. label Nov 16, 2015
@jasnell
Copy link
Member

jasnell commented Mar 22, 2016

Closing due to lack of activity or response.

@jasnell jasnell closed this Mar 22, 2016
@getify
Copy link
Contributor Author

getify commented Mar 22, 2016

I would still very much like this to be addressed. I'm not sure what else I can do? Please re-open.

@jasnell jasnell reopened this Mar 22, 2016
@jasnell
Copy link
Member

jasnell commented Mar 22, 2016

@getify... done! :-) can you rebase to make sure it's up to date. @Fishrock123 , would you have a chance to give this another review?

@targos
Copy link
Member

targos commented Mar 22, 2016

I'll also review it once it's rebased

@Trott
Copy link
Member

Trott commented Mar 22, 2016

If you want to get a head start on reviewing the rebased version: https://github.com/nodejs/node/compare/master...Trott:fix-timers-api-refs?expand=1

I resolved a couple conflicts and it's possible @getify will choose to resolve them differently, but the choices I made pass linting and testing....

@getify
Copy link
Contributor Author

getify commented Mar 22, 2016

Thanks @Trott ... I don't see anything in your version that I'd disagree with. 👍

@Trott
Copy link
Member

Trott commented Mar 22, 2016

@getify Probably best to get it in this PR so that the conversation thread isn't lost. Maybe clone my branch to your local working repo and force push it up to your branch on GitHub?

@jasnell jasnell removed the stalled Issues and PRs that are stalled. label Mar 22, 2016
@Trott
Copy link
Member

Trott commented Mar 23, 2016

I'm going to go ahead and make a PR from the rebase I did. @getify, if you're planning on updating this branch instead or if you otherwise would prefer I not proceed, let me know!

@getify
Copy link
Contributor Author

getify commented Mar 24, 2016

Thanks for taking the lead, @Trott. Been a bit swamped and hadn't got to this yet.

@getify getify closed this Mar 24, 2016
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.

5 participants