Skip to content

Conversation

@targos
Copy link
Member

@targos targos commented Aug 8, 2021

  • buffer: introduce Blob
  • test: add wpt tests for Blob
  • util: add internal createDeferredPromise()
  • buffer: add @@toStringTag to Blob
  • buffer: make Blob's slice method more spec-compliant
  • buffer: make Blob's constructor more spec-compliant
  • src: use BaseObject::kInteralFieldCount in Blob
  • buffer: avoid creating the backing store in the thread
  • src: remove more extra semis from member fns
  • test: increase coverage for Blob
@github-actions github-actions bot added lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. v14.x labels Aug 8, 2021
@targos
Copy link
Member Author

targos commented Aug 8, 2021

@targos targos added buffer Issues and PRs related to the buffer subsystem. request-ci Add this label to start a Jenkins CI on a PR. labels Aug 8, 2021
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 8, 2021
@targos
Copy link
Member Author

targos commented Aug 8, 2021

Force-pushed to reset author to @jasnell

@targos
Copy link
Member Author

targos commented Aug 12, 2021

I'll land these tomorrow if there are no objections.

jasnell and others added 10 commits August 13, 2021 10:27
The `Blob` object is an immutable data buffer. This is a first step towards alignment with the `Blob` Web API. Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: nodejs#36811 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
PR-URL: nodejs#36811 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
The pattern of resolving/rejecting a Promise from outside of its executor happens numerous times throughout the codebase (more than what is updated here in fact). This commit abstracts that logic into an internal utility function. PR-URL: nodejs#37095 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Zijian Liu <lxxyxzj@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit adds the toStringTag to the Blob class to match the behavior of Chrome and Firefox. PR-URL: nodejs#37336 Fixes: nodejs#37337 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: nodejs#37361 Fixes: nodejs#37335 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: nodejs#37361 Fixes: nodejs#37352 Fixes: nodejs#37356 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Instead of hard-coding the field count. PR-URL: nodejs#36991 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Fixes: nodejs#37030 PR-URL: nodejs#37052 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
PR-URL: nodejs#38744 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Refs: https://coverage.nodejs.org/coverage-68e6673224365120/lib/internal/blob.js.html#L132 PR-URL: nodejs#38515 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
targos pushed a commit that referenced this pull request Aug 13, 2021
The `Blob` object is an immutable data buffer. This is a first step towards alignment with the `Blob` Web API. Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: #36811 Backport-PR-URL: #39704 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
targos added a commit that referenced this pull request Aug 13, 2021
PR-URL: #36811 Backport-PR-URL: #39704 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
targos pushed a commit that referenced this pull request Aug 13, 2021
The pattern of resolving/rejecting a Promise from outside of its executor happens numerous times throughout the codebase (more than what is updated here in fact). This commit abstracts that logic into an internal utility function. PR-URL: #37095 Backport-PR-URL: #39704 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Zijian Liu <lxxyxzj@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this pull request Aug 13, 2021
This commit adds the toStringTag to the Blob class to match the behavior of Chrome and Firefox. PR-URL: #37336 Backport-PR-URL: #39704 Fixes: #37337 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
targos added a commit that referenced this pull request Aug 13, 2021
PR-URL: #37361 Backport-PR-URL: #39704 Fixes: #37335 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
targos added a commit that referenced this pull request Aug 13, 2021
PR-URL: #37361 Backport-PR-URL: #39704 Fixes: #37352 Fixes: #37356 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this pull request Aug 13, 2021
Instead of hard-coding the field count. PR-URL: #36991 Backport-PR-URL: #39704 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
targos pushed a commit that referenced this pull request Aug 13, 2021
Fixes: #37030 PR-URL: #37052 Backport-PR-URL: #39704 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
targos pushed a commit that referenced this pull request Aug 13, 2021
PR-URL: #38744 Backport-PR-URL: #39704 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
targos pushed a commit that referenced this pull request Aug 13, 2021
Refs: https://coverage.nodejs.org/coverage-68e6673224365120/lib/internal/blob.js.html#L132 PR-URL: #38515 Backport-PR-URL: #39704 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
@targos
Copy link
Member Author

targos commented Aug 13, 2021

Landed in a343956...f0b7b93

@targos targos closed this Aug 13, 2021
@targos targos deleted the blob-v14 branch August 13, 2021 15:53
MylesBorins pushed a commit that referenced this pull request Aug 31, 2021
The `Blob` object is an immutable data buffer. This is a first step towards alignment with the `Blob` Web API. Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: #36811 Backport-PR-URL: #39704 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
MylesBorins pushed a commit that referenced this pull request Aug 31, 2021
PR-URL: #36811 Backport-PR-URL: #39704 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
MylesBorins pushed a commit that referenced this pull request Aug 31, 2021
The pattern of resolving/rejecting a Promise from outside of its executor happens numerous times throughout the codebase (more than what is updated here in fact). This commit abstracts that logic into an internal utility function. PR-URL: #37095 Backport-PR-URL: #39704 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Zijian Liu <lxxyxzj@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Aug 31, 2021
This commit adds the toStringTag to the Blob class to match the behavior of Chrome and Firefox. PR-URL: #37336 Backport-PR-URL: #39704 Fixes: #37337 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Aug 31, 2021
PR-URL: #37361 Backport-PR-URL: #39704 Fixes: #37335 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Aug 31, 2021
PR-URL: #37361 Backport-PR-URL: #39704 Fixes: #37352 Fixes: #37356 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Aug 31, 2021
Instead of hard-coding the field count. PR-URL: #36991 Backport-PR-URL: #39704 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
MylesBorins pushed a commit that referenced this pull request Aug 31, 2021
Fixes: #37030 PR-URL: #37052 Backport-PR-URL: #39704 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
MylesBorins pushed a commit that referenced this pull request Aug 31, 2021
PR-URL: #38744 Backport-PR-URL: #39704 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
MylesBorins pushed a commit that referenced this pull request Aug 31, 2021
Refs: https://coverage.nodejs.org/coverage-68e6673224365120/lib/internal/blob.js.html#L132 PR-URL: #38515 Backport-PR-URL: #39704 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
foxxyz pushed a commit to foxxyz/node that referenced this pull request Oct 18, 2021
The `Blob` object is an immutable data buffer. This is a first step towards alignment with the `Blob` Web API. Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: nodejs#36811 Backport-PR-URL: nodejs#39704 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
foxxyz pushed a commit to foxxyz/node that referenced this pull request Oct 18, 2021
PR-URL: nodejs#36811 Backport-PR-URL: nodejs#39704 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
foxxyz pushed a commit to foxxyz/node that referenced this pull request Oct 18, 2021
The pattern of resolving/rejecting a Promise from outside of its executor happens numerous times throughout the codebase (more than what is updated here in fact). This commit abstracts that logic into an internal utility function. PR-URL: nodejs#37095 Backport-PR-URL: nodejs#39704 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Zijian Liu <lxxyxzj@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
foxxyz pushed a commit to foxxyz/node that referenced this pull request Oct 18, 2021
This commit adds the toStringTag to the Blob class to match the behavior of Chrome and Firefox. PR-URL: nodejs#37336 Backport-PR-URL: nodejs#39704 Fixes: nodejs#37337 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
foxxyz pushed a commit to foxxyz/node that referenced this pull request Oct 18, 2021
PR-URL: nodejs#37361 Backport-PR-URL: nodejs#39704 Fixes: nodejs#37335 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
foxxyz pushed a commit to foxxyz/node that referenced this pull request Oct 18, 2021
PR-URL: nodejs#37361 Backport-PR-URL: nodejs#39704 Fixes: nodejs#37352 Fixes: nodejs#37356 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
foxxyz pushed a commit to foxxyz/node that referenced this pull request Oct 18, 2021
Instead of hard-coding the field count. PR-URL: nodejs#36991 Backport-PR-URL: nodejs#39704 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
foxxyz pushed a commit to foxxyz/node that referenced this pull request Oct 18, 2021
Fixes: nodejs#37030 PR-URL: nodejs#37052 Backport-PR-URL: nodejs#39704 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
foxxyz pushed a commit to foxxyz/node that referenced this pull request Oct 18, 2021
PR-URL: nodejs#38744 Backport-PR-URL: nodejs#39704 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
foxxyz pushed a commit to foxxyz/node that referenced this pull request Oct 18, 2021
Refs: https://coverage.nodejs.org/coverage-68e6673224365120/lib/internal/blob.js.html#L132 PR-URL: nodejs#38515 Backport-PR-URL: nodejs#39704 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

buffer Issues and PRs related to the buffer subsystem. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run.

7 participants