Skip to content

Conversation

@chichiwang
Copy link
Contributor

@chichiwangchichiwang 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-botnodejs-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

@ChALkeRChALkeR left a comment

Choose a reason for hiding this comment

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

👍

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

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

@chichiwang
Copy link
ContributorAuthor

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

@Trott
Copy link
Member

@danbev
Copy link
Contributor

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

@Trott
Copy link
Member

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
ContributorAuthor

@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

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

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

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 <[email protected]> Reviewed-By: Сковорода Никита Андреевич <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
@jasnell
Copy link
Member

Landed in 25dc25b

@jasnelljasnell 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 <[email protected]> Reviewed-By: Сковорода Никита Андреевич <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
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 <[email protected]> Reviewed-By: Сковорода Никита Андреевич <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
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 <[email protected]> Reviewed-By: Сковорода Никита Андреевич <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
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 <[email protected]> Reviewed-By: Сковорода Никита Андреевич <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
@codebyterecodebytere mentioned this pull request Jan 4, 2019
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.encodingIssues and PRs related to the TextEncoder and TextDecoder APIs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

12 participants

@chichiwang@addaleax@mscdex@Trott@danbev@refack@jasnell@ChALkeR@thefourtheye@cjihrig@codebytere@nodejs-github-bot