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

Backport: assert: Fix deepEqual/deepStrictEqual on equivalent typed arrays by cjihrig · Pull Request #9776 · nodejs/node · GitHub

/ node Public

Backport: assert: Fix deepEqual/deepStrictEqual on equivalent typed arrays - #9776

Closed
cjihrig wants to merge 2 commits into
nodejs:v4.x-stagingfrom
cjihrig:8002bp
Closed

Backport: assert: Fix deepEqual/deepStrictEqual on equivalent typed arrays#9776
cjihrig wants to merge 2 commits into
nodejs:v4.x-stagingfrom
cjihrig:8002bp

Conversation

cjihrig commented Nov 23, 2016

Copy link
Copy Markdown
Contributor

This is a backport of #8002 to v4.

Note, the exact API used to implement this doesn't seem to exist in v4, so I combined new Buffer() and slice().

R= @thealphanerd @feross

The typed array's underlying ArrayBuffer is used in `Buffer.from`.
Let's respect it's .byteOffset or .byteLength (i.e. position within the
parent ArrayBuffer).

Fixes: nodejs#8001
PR-URL: nodejs#8002
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Let's test typed arrays which have a .byteOffset and .byteLength (i.e.
typed arrays that are slices of parent typed arrays).

PR-URL: nodejs#8002
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
nodejs-github-bot added assert Issues and PRs related to the assert subsystem. v4.x labels Nov 23, 2016

feross commented Nov 24, 2016

Copy link
Copy Markdown
Contributor

Note, the exact API used to implement this doesn't seem to exist in v4

Which API is that?

Copy link
Copy Markdown
Member

@feross That would be the three-argument new Buffer(arrayBuffer, offset, length) variant of the Buffer constructor

Copy link
Copy Markdown
Contributor

landed in 76245b2...c0c5608

cjihrig deleted the 8002bp branch December 20, 2016 22:13
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

assert Issues and PRs related to the assert subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants


Back | FazBrowse Home | New Git URL