Skip to content

Conversation

@deermichel
Copy link
Contributor

@deermichel deermichel commented Jul 24, 2019

Description of Change

Fixes #19425.

The issue was rooted in an upstream change: nodejs/node#26016 (found its way to electron in #17752). Previously, the process-relative uptime was set in a method which got called by both node::Start (used by nodejs) and node::Init (used by embedders, deprecated) init methods. After the change, it is set directly in node::Start and thereby not when using node::Init. This PR just reverts that.

Since i don't see any difference in either way of setting the variable, we might wanna upstream this patch so other embedders can benefit from it as well.

cc @MarshallOfSound @codebytere

Checklist

Release Notes

Notes: Fixed process.uptime() returning the wrong time.

@deermichel deermichel requested a review from a team as a code owner July 24, 2019 19:07
@electron-cation electron-cation bot added the new-pr 🌱 PR opened recently label Jul 24, 2019
@nornagon
Copy link
Contributor

@deermichel before we merge this, do you want to try submitting a PR to nodejs/node to see if anyone from the node maintainer group has thoughts about it?

@deermichel
Copy link
Contributor Author

deermichel commented Jul 24, 2019

Yep, sounds good to me :) --> nodejs/node#28849

@electron-cation electron-cation bot removed the new-pr 🌱 PR opened recently label Jul 25, 2019
@deermichel
Copy link
Contributor Author

@nornagon my node PR got merged 🎉. So can we keep the patch here until we reached the current upstream version?

Copy link
Contributor

@nornagon nornagon left a comment

Choose a reason for hiding this comment

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

yup sgtm

@codebytere
Copy link
Member

@deermichel needs rebase ☝️

@deermichel deermichel force-pushed the intern/process-uptime branch from 74cbc05 to 7013160 Compare July 29, 2019 17:56
@deermichel
Copy link
Contributor Author

done ✅

Copy link
Member

@MarshallOfSound MarshallOfSound left a comment

Choose a reason for hiding this comment

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

Also now that this is fixed we should re-enable the test/parallel/test-process-uptime node test

@deermichel deermichel force-pushed the intern/process-uptime branch 2 times, most recently from ac60f36 to ebfefbf Compare July 29, 2019 22:10
@deermichel deermichel force-pushed the intern/process-uptime branch from ebfefbf to 09691d1 Compare July 29, 2019 22:11
@jkleinsc jkleinsc merged commit 6e367da into master Jul 30, 2019
@release-clerk
Copy link

release-clerk bot commented Jul 30, 2019

Release Notes Persisted

Fixed process.uptime() returning the wrong time.

@jkleinsc jkleinsc deleted the intern/process-uptime branch July 30, 2019 18:08
@trop
Copy link
Contributor

trop bot commented Jul 30, 2019

I was unable to backport this PR to "5-0-x" cleanly;
you will need to perform this backport manually.

@trop
Copy link
Contributor

trop bot commented Jul 30, 2019

I was unable to backport this PR to "6-0-x" cleanly;
you will need to perform this backport manually.

@trop trop bot removed target/5-0-x labels Jul 30, 2019
@codebytere
Copy link
Member

@deermichel could you please open manual backports for this to 5/6?

@deermichel
Copy link
Contributor Author

oh missed this, sure...

@trop
Copy link
Contributor

trop bot commented Aug 1, 2019

A maintainer has manually backported this PR to "5-0-x", please check out #19566

@trop
Copy link
Contributor

trop bot commented Aug 1, 2019

A maintainer has manually backported this PR to "6-0-x", please check out #19567

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

process.uptime() returns unexpected result

6 participants