fix(ext/node): implement node:v8 heap APIs#32483
Merged
bartlomieju merged 2 commits intomainfrom Mar 5, 2026
Merged
Conversation
Implements several missing `node:v8` APIs: - `v8.getHeapSpaceStatistics()` - returns per-space heap statistics - `v8.getHeapCodeStatistics()` - real implementation using v8 146.3.0 - `v8.getHeapSnapshot()` - returns a Readable stream of heap snapshot JSON - `v8.writeHeapSnapshot(filename?, options?)` - writes heap snapshot to file Also bumps the v8 crate from 146.1.0 to 146.3.0, converts `ext/node/polyfills/v8.ts` to `v8.js`, and enables node compat tests `test-heapdump.js`, `test-v8-getheapsnapshot-twice.js`, and `test-v8-stats.js`. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
devsnek
approved these changes
Mar 5, 2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
node:v8 heap APIs
littledivy
approved these changes
Mar 5, 2026
bartlomieju
added a commit
to bartlomieju/deno
that referenced
this pull request
Mar 5, 2026
Implements `v8.getHeapSpaceStatistics()`, `v8.getHeapCodeStatistics()`, `v8.getHeapSnapshot()`, and `v8.writeHeapSnapshot()` from the `node:v8` module Enabled node compat tests: `test-heapdump.js`, `test-v8-getheapsnapshot-twice.js`, `test-v8-stats.js` --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
v8.getHeapSpaceStatistics(),v8.getHeapCodeStatistics(),v8.getHeapSnapshot(), andv8.writeHeapSnapshot()from thenode:v8modulev8crate from 146.1.0 to 146.3.0 (includesHeapCodeStatisticsAPI from rusty_v8 PR Implement import-maps #1921)ext/node/polyfills/v8.tstov8.jstest-heapdump.js,test-v8-getheapsnapshot-twice.js,test-v8-stats.jsFactored out from #32457 (coverage APIs will follow in a separate PR).