Skip to content

fix(napi): delete error reference with raw Error#2388

Merged
Brooooooklyn merged 6 commits intonapi-rs:mainfrom
underfin:napi-error
Dec 9, 2024
Merged

fix(napi): delete error reference with raw Error#2388
Brooooooklyn merged 6 commits intonapi-rs:mainfrom
underfin:napi-error

Conversation

@underfin
Copy link
Contributor

@underfin underfin commented Dec 3, 2024

The rolldown buildEnd hook argument need to JsError and also the BindingOutputs need it, here using JsError::Clone to do it, but it segment fault at napi_delete_reference. So here only delete reference for raw JsError.

@underfin underfin marked this pull request as draft December 3, 2024 09:27
@underfin underfin changed the title fix: delete error reference at drop fix: delete error reference with raw Error Dec 3, 2024
@underfin underfin marked this pull request as ready for review December 3, 2024 10:54
@Boshen
Copy link
Contributor

Boshen commented Dec 9, 2024

Can you link the rolldown PR for full context? We can't determine the root issue with just this PR.

@underfin
Copy link
Contributor Author

underfin commented Dec 9, 2024

Can you link the rolldown PR for full context? We can't determine the root issue with just this PR.

#2388 (comment), You can see it. The buildEnd argument and BindingOutputs#errors need to JsError to reflect the raw js errors.

@Brooooooklyn Brooooooklyn changed the title fix: delete error reference with raw Error fix(napi): delete error reference with raw Error Dec 9, 2024
@Brooooooklyn Brooooooklyn merged commit 5336356 into napi-rs:main Dec 9, 2024
@underfin
Copy link
Contributor Author

@Brooooooklyn Could you publish a new version for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants