Skip to content

src: remove usage of V8 deprecated APIs in node_url.cc#11066

Closed
TimothyGu wants to merge 1 commit into
nodejs:masterfrom
TimothyGu:url-cpp-deprecated
Closed

src: remove usage of V8 deprecated APIs in node_url.cc#11066
TimothyGu wants to merge 1 commit into
nodejs:masterfrom
TimothyGu:url-cpp-deprecated

Conversation

@TimothyGu

@TimothyGu TimothyGu commented Jan 29, 2017

Copy link
Copy Markdown
Member

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

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

url

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. dont-land-on-v4.x whatwg-url Issues and PRs related to the WHATWG URL implementation. labels Jan 29, 2017
@TimothyGu TimothyGu changed the title src: remove usage of V8 deprecated API in node_url.cc src: remove usage of V8 soon-to-be-deprecated API in node_url.cc Jan 29, 2017
@TimothyGu TimothyGu changed the title src: remove usage of V8 soon-to-be-deprecated API in node_url.cc src: remove usage of V8 deprecated APIs in node_url.cc Jan 29, 2017
Comment thread src/node_url.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.

We use FromJust in the code base

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.

Fixed.

Comment thread src/node_url.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.

I'd add braces here for clarity now that it expands on two lines

@addaleax addaleax 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 suggestion

Comment thread src/node_url.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.

Can you turn this into a reinterpret_cast and rename override to something that’s not a language keyword?

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.

Turns out static_cast works but reinterpret_cast doesn't. override bit fixed.

@jasnell jasnell 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, looks like it needs a rebase

Also:

- Avoid using 'override' as variable name
- Use explicit static_cast instead of C-style cast
@TimothyGu

Copy link
Copy Markdown
Member Author

@jasnell, rebased.

@targos, @addaleax, PTAL.

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

Thanks, LGTM!

@jasnell

jasnell commented Jan 31, 2017

Copy link
Copy Markdown
Member

New CI after rebase: https://ci.nodejs.org/job/node-test-pull-request/6127/

@jasnell

jasnell commented Jan 31, 2017

Copy link
Copy Markdown
Member

Some failures in that last CI run, trying again: https://ci.nodejs.org/job/node-test-pull-request/6138/

@TimothyGu

Copy link
Copy Markdown
Member Author

Landed in c7e1be8.

@TimothyGu TimothyGu closed this Feb 1, 2017
@TimothyGu TimothyGu deleted the url-cpp-deprecated branch February 1, 2017 07:58
TimothyGu added a commit that referenced this pull request Feb 1, 2017
Also:

- Avoid using 'override' as variable name
- Use explicit static_cast instead of C-style cast

PR-URL: #11066
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Feb 2, 2017
Also:

- Avoid using 'override' as variable name
- Use explicit static_cast instead of C-style cast

PR-URL: nodejs#11066
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Feb 14, 2017
Also:

- Avoid using 'override' as variable name
- Use explicit static_cast instead of C-style cast

PR-URL: nodejs#11066
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
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++. whatwg-url Issues and PRs related to the WHATWG URL implementation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants