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

src: re-delete Atomics.wake #29586

Merged
merged 1 commit into from
Sep 18, 2019
Merged

Conversation

devsnek
Copy link
Member

@devsnek devsnek commented Sep 16, 2019

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

@devsnek devsnek 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-bot nodejs-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
@devsnek devsnek 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
Member

ljharb commented Sep 16, 2019

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

Copy link
Member

@jasnell jasnell left a comment

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

@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@addaleax addaleax left a comment

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
Copy link
Member Author

devsnek commented Sep 16, 2019

@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.

Copy link
Member

@joyeecheung joyeecheung left a comment

Choose a reason for hiding this comment

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

LGTM with a nit

@@ -354,12 +354,44 @@ Local<Context> NewContext(Isolate* isolate,
auto context = Context::New(isolate, nullptr, object_template);
if (context.IsEmpty()) return context;

InitializeContextRuntime(context);
Copy link
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

@nodejs-github-bot
Copy link
Collaborator

@devsnek devsnek 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
Contributor

Needs a rebase.

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 devsnek merged commit 1ec4154 into nodejs:master Sep 18, 2019
@devsnek devsnek deleted the fix/atomics-wake-deleted branch September 18, 2019 21:10
@devsnek
Copy link
Member Author

devsnek commented Sep 18, 2019

landed in 1ec4154

@devsnek devsnek 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>
@BridgeAR BridgeAR 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 free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues and PRs related to build files or the CI. confirmed-bug Issues with confirmed bugs. lib / src Issues 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