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: remove function hasTextDecoder in encoding.js #23625

Closed
wants to merge 2 commits into from
Closed

src: remove function hasTextDecoder in encoding.js #23625

wants to merge 2 commits into from

Conversation

chichiwang
Copy link
Contributor

@chichiwang chichiwang commented Oct 12, 2018

Remove hasTextDecoder in /lib/internal/encoding.js. hasTextDecoder is unused. This has the benefit of increasing test coverage.

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

@nodejs-github-bot nodejs-github-bot added the encoding Issues and PRs related to the TextEncoder and TextDecoder APIs. label Oct 12, 2018
@addaleax
Copy link
Member

Copy link
Member

@ChALkeR ChALkeR left a comment

Choose a reason for hiding this comment

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

👍

@addaleax addaleax added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Oct 12, 2018
@mscdex
Copy link
Contributor

mscdex commented Oct 12, 2018

Can we also get rid of hasConverter (the function) entirely and then return the constructor directly?

@chichiwang
Copy link
Contributor Author

chichiwang commented Oct 12, 2018

@mscdex It appears that hasConverter is used as a sort of encoding validator in makeTextDecoderJS but is unused in makeTextDecoderICU. We can probably remove it from makeTextDecoderICU.

It appears we can return the constructor directly from both TextDecoder factories. I'll make the change.

@Trott
Copy link
Member

Trott commented Oct 13, 2018

@Trott
Copy link
Member

Trott commented Oct 13, 2018

@Trott
Copy link
Member

Trott commented Oct 13, 2018

@danbev
Copy link
Contributor

danbev commented Oct 16, 2018

Re-run of failing node-test-commit-linux

@Trott
Copy link
Member

Trott commented Oct 16, 2018

The test-buffer-alloc failures will (I believe) be fixed by rebasing against master, which a Resume Build should do. Let's see....

Resume Build CI: https://ci.nodejs.org/job/node-test-pull-request/17887/

@chichiwang
Copy link
Contributor Author

@Trott Thanks! There still appears to be one failure in the run. Let me know if I can do anything to help resolve the CI failures (like rebase the branch against master).

@refack
Copy link
Contributor

refack commented Oct 16, 2018

Re-resume: https://ci.nodejs.org/job/node-test-pull-request/17912/

@jasnell jasnell self-assigned this Oct 16, 2018
@jasnell
Copy link
Member

jasnell commented Oct 16, 2018

Getting this landed.

jasnell pushed a commit that referenced this pull request Oct 16, 2018
also... return TextDecoder directly from factories

PR-URL: #23625
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
@jasnell
Copy link
Member

jasnell commented Oct 16, 2018

Landed in 25dc25b

@jasnell jasnell closed this Oct 16, 2018
jasnell pushed a commit that referenced this pull request Oct 17, 2018
also... return TextDecoder directly from factories

PR-URL: #23625
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
addaleax pushed a commit that referenced this pull request Oct 20, 2018
also... return TextDecoder directly from factories

PR-URL: #23625
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
codebytere pushed a commit that referenced this pull request Dec 13, 2018
also... return TextDecoder directly from factories

PR-URL: #23625
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
MylesBorins pushed a commit that referenced this pull request Dec 26, 2018
also... return TextDecoder directly from factories

PR-URL: #23625
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
@codebytere codebytere mentioned this pull request Jan 4, 2019
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 pending requests for changes, and a CI started. encoding Issues and PRs related to the TextEncoder and TextDecoder APIs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.