Skip to content

util: remove unreachable defensive coding - #36744

Merged
Trott merged 1 commit into
nodejs:masterfrom
Trott:not-dead
Jan 5, 2021
Merged

util: remove unreachable defensive coding#36744
Trott merged 1 commit into
nodejs:masterfrom
Trott:not-dead

Conversation

@Trott

@TrottTrott commented Jan 2, 2021

Copy link
Copy Markdown
Member

Now that we are using primordials in the first part of
isIdenticalTypedArrayType(), the defensive coding to get the correct
result (when Symbol.toStringTag is manipulated) is no longer reachable
or necessary. Remove the code.

Refs: https://coverage.nodejs.org/coverage-873d21cdc1266273/lib/internal/util/comparisons.js.html#L135

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

@nodejs-github-botnodejs-github-bot added the util Issues and PRs related to the built-in util module. label Jan 2, 2021
@Trott
Trott requested a review from BridgeARJanuary 2, 2021 19:05
Comment threadlib/internal/util/comparisons.js Outdated
@TrottTrott added the request-ci Add this label to start a Jenkins CI on a PR. label Jan 3, 2021
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 3, 2021
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Now that we are using primordials in the first part of
isIdenticalTypedArrayType(), the defensive coding to get the correct
result (when Symbol.toStringTag is manipulated) is no longer reachable
or necessary. Remove the code.
Refs: https://coverage.nodejs.org/coverage-873d21cdc1266273/lib/internal/util/comparisons.js.html#L135
PR-URL: nodejs#36744
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@Trott
Trott merged commit ca86e34 into nodejs:masterJan 5, 2021
@Trott

Trott commented Jan 5, 2021

Copy link
Copy Markdown
MemberAuthor

Landed in ca86e34

@Trott
Trott deleted the not-dead branch January 5, 2021 05:00
danielleadams pushed a commit that referenced this pull request Jan 12, 2021
Now that we are using primordials in the first part of
isIdenticalTypedArrayType(), the defensive coding to get the correct
result (when Symbol.toStringTag is manipulated) is no longer reachable
or necessary. Remove the code.
Refs: https://coverage.nodejs.org/coverage-873d21cdc1266273/lib/internal/util/comparisons.js.html#L135
PR-URL: #36744
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@danielleadamsdanielleadams mentioned this pull request Jan 12, 2021
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

utilIssues and PRs related to the built-in util module.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants

@Trott@nodejs-github-bot@jasnell@cjihrig@BridgeAR@Lxxyx@aduh95@targos