Skip to content

Conversation

@Ayoub-Mabrouk
Copy link

Replace native array methods (.push, .shift) with primordials (ArrayPrototypePush, ArrayPrototypeShift) in lib/internal/v8/startup_snapshot.js for consistency and security.

This improves protection against prototype pollution and aligns with the primordials pattern used throughout the codebase.

@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Dec 29, 2025
@codecov
Copy link

codecov bot commented Dec 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.54%. Comparing base (05d6b9b) to head (63cd1b4).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #61199   +/-   ##
=======================================
  Coverage   88.53%   88.54%           
=======================================
  Files         703      703           
  Lines      208599   208604    +5     
  Branches    40229    40229           
=======================================
+ Hits       184685   184698   +13     
+ Misses      15939    15912   -27     
- Partials     7975     7994   +19     
Files with missing lines Coverage Δ
lib/internal/v8/startup_snapshot.js 95.55% <100.00%> (+0.17%) ⬆️

... and 33 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.

@avivkeller avivkeller added the needs-benchmark-ci PR that need a benchmark CI run. label Dec 29, 2025
@avivkeller
Copy link
Member

Please amend your commit to abide by the guidelines

@Ayoub-Mabrouk Ayoub-Mabrouk force-pushed the v8-use-primordials-startup-snapshot branch from 63cd1b4 to a60a853 Compare December 29, 2025 17:34
Replace native methods with primordials.
@Ayoub-Mabrouk Ayoub-Mabrouk force-pushed the v8-use-primordials-startup-snapshot branch from a60a853 to 00bb902 Compare December 29, 2025 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-benchmark-ci PR that need a benchmark CI run. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants