Conversation
✅ Deploy Preview for rspack canceled.
|
77807c2 to
d294b0e
Compare
CodSpeed Performance ReportMerging #9871 will not alter performanceComparing Summary
|
4b01f56 to
8076d4a
Compare
b8e6510 to
70ad35a
Compare
70ad35a to
7a03661
Compare
36838fe to
ea61c14
Compare
f22eec6 to
ea61c14
Compare
7f9b183 to
c2c9a6e
Compare
c2c9a6e to
18c740e
Compare
18c740e to
c18236d
Compare
bfa49cb to
130f1a5
Compare
130f1a5 to
09a3dd0
Compare
hardfist
reviewed
Apr 15, 2025
quininer
approved these changes
Apr 17, 2025
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
This PR introduces a smart pointer called
BindingCell.When the "napi" feature is disabled, Root uses the sys_binding module as a simple alias for Box.
When the "napi" feature is enabled, Root uses the napi_binding module:
any attempt to access the JS Object will throw an exception indicating that the Rust instance has been dropped.
napi_refto the JS Object but does not manage its lifecycle. Instead, the JS Object is associatedwith another JS object (e.g., a Compilation JS object), ensuring it is not garbage-collected during that entity’s lifecycle.
By establishing a 1:1 relationship between the Rust instance and the JS Object, we can easily retain the JS Object associated with
AssetInfoat creation, thereby preserving all user-added data on the JS Object, including any data keyed by Symbols.Checklist