FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

src: use Isolate::TryGetCurrent where appropriate by addaleax · Pull Request #39954 · nodejs/node · GitHub

/ node Public

src: use Isolate::TryGetCurrent where appropriate - #39954

Closed
addaleax wants to merge 2 commits into
nodejs:masterfrom
addaleax:trygetcurrent
Closed

src: use Isolate::TryGetCurrent where appropriate#39954
addaleax wants to merge 2 commits into
nodejs:masterfrom
addaleax:trygetcurrent

Conversation

Copy link
Copy Markdown
Member

In two places, we call Isolate::GetCurrent() even though that is
technically invalid usage of the function.
Now that V8 exposes Isolate::TryGetCurrent(), we can do this
in a proper way.

In two places, we call `Isolate::GetCurrent()` even though that is
technically invalid usage of the function.
Now that V8 exposes `Isolate::TryGetCurrent()`, we can do this
in a proper way.
nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. labels Aug 31, 2021

danbev commented Aug 31, 2021

Copy link
Copy Markdown
Contributor

We should be able to revert 1fc4d43 after this commit. I can open a pull request after this one has landed, or if you like you can include the revert in this pr.

Copy link
Copy Markdown
Member Author

@danbev Sure, done!

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Still LGTM

targos added the request-ci Add this label to start a Jenkins CI on a PR. label Sep 1, 2021
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 1, 2021

This comment has been minimized.

Copy link
Copy Markdown
Collaborator

RaisinTen added the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label Sep 5, 2021
Comment thread src/util.h
// Tells whether the per-process V8::Initialize() is called and
// if it is safe to call v8::Isolate::GetCurrent().
// if it is safe to call v8::Isolate::TryGetCurrent().
extern bool v8_initialized;

legendecas Sep 5, 2021
edited
Loading

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Do we still need this as it claiming that it tells "if it is safe to call v8::Isolate::GetCurrent"?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Yeah … I don’t know why, but v8::Isolate::TryGetCurrent() is not something you can call without V8 being initialized first.

targos added the commit-queue Add this label to land a pull request using GitHub Actions. label Sep 8, 2021
github-actions Bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Sep 8, 2021

github-actions Bot commented Sep 8, 2021

Copy link
Copy Markdown
Contributor

Landed in 9f6fed7...9f7412a

github-actions Bot closed this Sep 8, 2021
nodejs-github-bot pushed a commit that referenced this pull request Sep 8, 2021
In two places, we call `Isolate::GetCurrent()` even though that is
technically invalid usage of the function.
Now that V8 exposes `Isolate::TryGetCurrent()`, we can do this
in a proper way.

PR-URL: #39954
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
nodejs-github-bot pushed a commit that referenced this pull request Sep 8, 2021
This reverts commit 1fc4d43.

PR-URL: #39954
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
BethGriggs pushed a commit that referenced this pull request Sep 21, 2021
In two places, we call `Isolate::GetCurrent()` even though that is
technically invalid usage of the function.
Now that V8 exposes `Isolate::TryGetCurrent()`, we can do this
in a proper way.

PR-URL: #39954
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
BethGriggs pushed a commit that referenced this pull request Sep 21, 2021
This reverts commit 1fc4d43.

PR-URL: #39954
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
BethGriggs mentioned this pull request Sep 21, 2021
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants


Back | FazBrowse Home | New Git URL