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

src: remove calls to deprecated v8 functions (BooleanValue) by ryzokuken · Pull Request #22075 · nodejs/node · GitHub

/ node Public

src: remove calls to deprecated v8 functions (BooleanValue) - #22075

Closed
ryzokuken wants to merge 2 commits into
nodejs:masterfrom
ryzokuken:v8-deprecation-4
Closed

src: remove calls to deprecated v8 functions (BooleanValue)#22075
ryzokuken wants to merge 2 commits into
nodejs:masterfrom
ryzokuken:v8-deprecation-4

Conversation

Copy link
Copy Markdown
Contributor

Remove all calls to deprecated v8 functions (here:
Value::BooleanValue) inside the code (src directory only).

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

@addaleax @hashseed a quick one.

Copy link
Copy Markdown
Collaborator

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 Aug 1, 2018

addaleax left a comment
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

LGTM, although it’s probably easier to just use ->IsTrue(), and I don’t think that would count as a breaking change ;) (edit: at least if we do the coercion in JS first)

Copy link
Copy Markdown
Contributor Author

@addaleax Maybe<bool>::IsTrue is a thing? I didn't know. Also, wouldn't that somehow hurt what we're doing here, as we don't exactly want the same condition to execute? We want it to return to JS-Land if Nothing was returned.

Again, I might be very wrong, but let's look into this.

addaleax commented Aug 2, 2018

Copy link
Copy Markdown
Member

@ryzokuken value->IsTrue() is a thing, and if we can reasonably expect that value is a boolean already, it’s equivalent to value->BooleanValue(context).ToLocalChecked().

For setAutoPadding, we don’t do any typechecking, but we could make that simplification by using !!ap instead of ap in the JS layer.

For getStringWidth, I’m not sure – they appear unused anyway, beyond a test which accesses internal functions directly (?).

For setNoDelay, we already convert to boolean, so args[0]->IsTrue() is okay to use.

Copy link
Copy Markdown
Contributor

ping @ryzokuken, looks like this PR needs a rebase :)

Copy link
Copy Markdown
Contributor Author

@maclover7 Will do over the weekend, thanks.

targos commented Aug 26, 2018

Copy link
Copy Markdown
Member

Ping @ryzokuken

targos commented Aug 26, 2018

Copy link
Copy Markdown
Member

Btw there are two other instances of BooleanValue in src, if you also want to change those:

ryzokuken and others added 2 commits August 29, 2018 15:08
Remove all calls to deprecated v8 functions (here:
Value::BooleanValue) inside the code (src directory only).

targos commented Aug 29, 2018

Copy link
Copy Markdown
Member

I fixed the conflicts and handled the remaining cases.
@addaleax @jasnell @ryzokuken PTAL.

CI: https://ci.nodejs.org/job/node-test-pull-request/16854/

Copy link
Copy Markdown
Contributor Author

Cannot approve it myself, but LG.

targos commented Aug 31, 2018

Copy link
Copy Markdown
Member

CI is green. Can we have at least 1 LG for my additions?

targos commented Sep 1, 2018

Copy link
Copy Markdown
Member

@addaleax pretty please?

addaleax commented Sep 1, 2018

Copy link
Copy Markdown
Member

@targos Sorry, missed the pings – yes, this still LGTM :)

targos pushed a commit to targos/node that referenced this pull request Sep 1, 2018
Remove all calls to deprecated v8 functions (here:
Value::BooleanValue) inside the code (src directory only).

PR-URL: nodejs#22075
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>

targos commented Sep 1, 2018

Copy link
Copy Markdown
Member

Thank you 😃
Landed in 59e5a39

targos closed this Sep 1, 2018

Copy link
Copy Markdown
Contributor Author

Thanks again, @targos. You're the real MVP.

targos pushed a commit that referenced this pull request Sep 2, 2018
Remove all calls to deprecated v8 functions (here:
Value::BooleanValue) inside the code (src directory only).

PR-URL: #22075
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this pull request Sep 3, 2018
Remove all calls to deprecated v8 functions (here:
Value::BooleanValue) inside the code (src directory only).

PR-URL: #22075
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this pull request Sep 6, 2018
Remove all calls to deprecated v8 functions (here:
Value::BooleanValue) inside the code (src directory only).

PR-URL: #22075
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
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

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants


Back | FazBrowse Home | New Git URL