Skip to content

buffer: use Clamp conversion in Blob slice - #64739

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
HoonDongKang:fix-blob-slice-clamp
Jul 29, 2026
Merged

buffer: use Clamp conversion in Blob slice#64739
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
HoonDongKang:fix-blob-slice-clamp

Conversation

@HoonDongKang

@HoonDongKangHoonDongKang commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

This aligns Blob.prototype.slice() with the File API Web IDL definition:

Blob slice(optional [Clamp] longlong start,
optional [Clamp] longlong end,
optional DOMString contentType);

The start and end arguments should use Web IDL [Clamp] conversion.

This fixes the expected failures in Blob-slice.any.js for fractional start/end values.

Refs: https://www.w3.org/TR/FileAPI/#dfn-Blob

Testing

$ ./node test/wpt/test-blob.js Blob-slice.any.jsFiles: 1/1 ran, 1 passed, 0 skipped, 0 expected failures, 0 unexpected failures, 0 unexpected passesSubtests: 150 passed, 0 skipped, 0 expected failures, 0 unexpected failures, 0 unexpected passes
$ tools/test.py wpt/test-blob[00:00|% 100|+ 1|- 0]: Done

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/web-standards

@nodejs-github-botnodejs-github-bot added the needs-ci PRs that need a full CI run. label Jul 25, 2026
Align Blob.prototype.slice() with the File API Web IDL definition by
using [Clamp] conversion for the start and end arguments.
This fixes the Blob-slice.any.js WPT expected failures for fractional
start and end values.
Refs: https://www.w3.org/TR/FileAPI/#dfn-Blob
Signed-off-by: HoonDongKang <d159123@naver.com>
@HoonDongKangHoonDongKang changed the title blob: use Clamp conversion in Blob slicebuffer: use Clamp conversion in Blob sliceJul 25, 2026
@codecov

codecovBot commented Jul 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.15%. Comparing base (0618e9f) to head (6c536b1).
⚠️ Report is 25 commits behind head on main.

Additional details and impacted files
@@ Coverage Diff @@## main #64739 +/- ##
==========================================
+ Coverage 90.14% 90.15% +0.01% 
==========================================
Files 743 743 Lines 242408 242507 +99 Branches 45656 45776 +120 ==========================================
+ Hits 218520 218643 +123 + Misses 15387 15379 -8 + Partials 8501 8485 -16 
Files with missing linesCoverage Δ
lib/internal/blob.js89.86% <100.00%> (ø)

... and 35 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@panvapanva added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Jul 25, 2026
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jul 25, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@HoonDongKang

HoonDongKang commented Jul 26, 2026

Copy link
Copy Markdown
ContributorAuthor

This looks like a Jenkins infra failure:
Failed to trigger fanned build in the 2026-07-26 reliability report.
Could someone please rerun CI?

(I accidentally closed the PR, so I reopened it. 🥲)

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@daeyeondaeyeon added the commit-queue Add this label to land a pull request using GitHub Actions. label Jul 29, 2026
@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jul 29, 2026
@nodejs-github-bot
nodejs-github-bot merged commit a0dd71e into nodejs:mainJul 29, 2026
105 of 106 checks passed
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in a0dd71e

aduh95 pushed a commit that referenced this pull request Aug 3, 2026
Align Blob.prototype.slice() with the File API Web IDL definition by
using [Clamp] conversion for the start and end arguments.
This fixes the Blob-slice.any.js WPT expected failures for fractional
start and end values.
Refs: https://www.w3.org/TR/FileAPI/#dfn-Blob
Signed-off-by: HoonDongKang <d159123@naver.com>
PR-URL: #64739
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jason Zhang <xzha4350@gmail.com>
aduh95 pushed a commit that referenced this pull request Aug 4, 2026
Align Blob.prototype.slice() with the File API Web IDL definition by
using [Clamp] conversion for the start and end arguments.
This fixes the Blob-slice.any.js WPT expected failures for fractional
start and end values.
Refs: https://www.w3.org/TR/FileAPI/#dfn-Blob
Signed-off-by: HoonDongKang <d159123@naver.com>
PR-URL: #64739
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jason Zhang <xzha4350@gmail.com>
aduh95 pushed a commit that referenced this pull request Aug 5, 2026
Align Blob.prototype.slice() with the File API Web IDL definition by
using [Clamp] conversion for the start and end arguments.
This fixes the Blob-slice.any.js WPT expected failures for fractional
start and end values.
Refs: https://www.w3.org/TR/FileAPI/#dfn-Blob
Signed-off-by: HoonDongKang <d159123@naver.com>
PR-URL: #64739
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jason Zhang <xzha4350@gmail.com>
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.needs-ciPRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants

@HoonDongKang@nodejs-github-bot@panva@lpinca@jazelly@avivkeller@KhafraDev@daeyeon@Marvel616-akanki