Repository navigation
Conversation
Release-line counterpart of #28. Preserve Identifier ownership while a node is alive and run its destructor when the parser arena is reclaimed.
This branch has not been deployed
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.
DefineFieldNodeowns anIdentifierbut inherited onlyParserArenaFreeable, so arena teardown skipped its destructor and lost the owning string reference. Registering it asParserArenaDeletablebalances that reference when the arena is destroyed. Live parser/identifier semantics and process-wide destructor policy stay unchanged. The recorded upstream searches found no matching owner fix in oven-sh/WebKit or WebKit/WebKit.The native regression checks public, private, and computed field nodes. An identifier's reference count goes 1→2→2 on the baseline and 1→2→1 with the fix;
JavaScriptCore_ParserArena.DefineFieldReleasesIdentifierpasses against the rebuilt engine. The allocation audit attributes 115 bytes across four allocations per Worker to these lost references.Integration qualification with openclaw/bun#153 rebased onto merged openclaw/bun#152 is complete. Both 1,000-Worker no-addon Linux LSan routes exit 0 using only the inherited console suppression; the separate known console remainder is 72 bytes/two allocations per global (oven-sh/bun#38395). The previously aborting addon-owned event-name case now delivers exactly one null-env callback on its creating thread under ASAN. Both platforms pass the complete 264-test N-API suite and the eight-finalizer/zero-fd fixture.
Matched 5,000-cycle OS RSS growth decreases from 9,408,512 to 6,930,432 bytes on Linux and from 16,154,624 to 11,173,888 bytes on macOS. Loaded-Worker timing improves on macOS; Linux changes are small and mixed across metrics and paired blocks, with no resolved directional change. Full numbers and the timing limitation are in openclaw/bun#153. No run was discarded or repeated to improve a result.
P2 review is scoped-clean, and this PR's exact-head engine checks are green. The parser fix is independently safe; the complete Worker-leak release also requires Bun oven-sh#153 after oven-sh#152. The development and release-line WebKit PRs target separate branches, with no ordering dependency between them. A matching engine artifact must be rebuilt and selected by Bun before advertising the complete fix. This PR remains unmerged and no artifact has been published.
Exact head:
f2c9cf507d3f81d028b5b91443f4d37c915fac50. Engine checks and ARM64 regressions are green.