Skip to content

src: re-delete Atomics.wake - #29586

Merged
devsnek merged 1 commit into
nodejs:masterfrom
devsnek:fix/atomics-wake-deleted
Sep 18, 2019
Merged

src: re-delete Atomics.wake#29586
devsnek merged 1 commit into
nodejs:masterfrom
devsnek:fix/atomics-wake-deleted

Conversation

@devsnek

Copy link
Copy Markdown
Member

Deletion logic was running at snapshot time, and snapshots don't have global.Atomics, so this just stopped deleting Atomics.wake. This is fixed by creating a new C++ helper that is called after both Context::New and Context::FromSnapshot.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

@devsnekdevsnek added confirmed-bug Issues with confirmed bugs. semver-major PRs that contain breaking changes and should be released in the next major version. labels Sep 16, 2019
@nodejs-github-botnodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. labels Sep 16, 2019
@devsnekdevsnek added build Issues and PRs related to build files or the CI. lib / src Issues and PRs related to general changes in the lib or src directory. and removed c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. semver-major PRs that contain breaking changes and should be released in the next major version. labels Sep 16, 2019
@ljharb

Copy link
Copy Markdown
Member

node v12.5 - v12.10 all mistakenly have this method; i hope this is considered a patch, though, and not a major :-/

@jasnelljasnell left a comment

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.

I think we can consider this a patch / bug fix

@devsnek
devsnekforce-pushed the fix/atomics-wake-deleted branch from cb69c64 to 0c73abdCompareSeptember 16, 2019 22:05
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@addaleaxaddaleax left a comment

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.

LGTM if @joyeecheung is good with this, although I’m surprised that snapshots don’t also include the state of builtins…

@devsnek

devsnek commented Sep 16, 2019

Copy link
Copy Markdown
MemberAuthor

@addaleax any flagged features will not be included in snapshots, even if they're enabled by default, because they could be disabled at runtime by using V8::SetFlags.

In this case if (global.Atomics) {} was never running because global.Atomics was undefined.

@joyeecheungjoyeecheung left a comment

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.

LGTM with a nit

Comment threadsrc/api/environment.cc Outdated

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.

It looks more reasonable to do this later than InitializeContext() here since logically InitializeContext is supposed to give you a context that looks like the one created with Context::FromSnapshot

@devsnek
devsnekforce-pushed the fix/atomics-wake-deleted branch from 0c73abd to 12c21fcCompareSeptember 17, 2019 13:57
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@devsnekdevsnek added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Sep 17, 2019
@Fishrock123

Copy link
Copy Markdown
Contributor

Needs a rebase.

@devsnek
devsnekforce-pushed the fix/atomics-wake-deleted branch from 12c21fc to 32a1656CompareSeptember 17, 2019 22:52
PR-URL: nodejs#29586
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
@devsnek
devsnekforce-pushed the fix/atomics-wake-deleted branch from 32a1656 to 1ec4154CompareSeptember 18, 2019 21:10
@devsnek
devsnek merged commit 1ec4154 into nodejs:masterSep 18, 2019
@devsnek
devsnek deleted the fix/atomics-wake-deleted branch September 18, 2019 21:10
@devsnek

Copy link
Copy Markdown
MemberAuthor

landed in 1ec4154

@devsnekdevsnek removed the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Sep 18, 2019
targos pushed a commit that referenced this pull request Sep 20, 2019
PR-URL: #29586
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
@BridgeARBridgeAR mentioned this pull request Sep 24, 2019
BridgeAR pushed a commit that referenced this pull request Sep 25, 2019
PR-URL: #29586
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

buildIssues and PRs related to build files or the CI.confirmed-bugIssues with confirmed bugs.lib / srcIssues and PRs related to general changes in the lib or src directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants

@devsnek@ljharb@nodejs-github-bot@Fishrock123@jasnell@addaleax@cjihrig@joyeecheung@devnexen