Skip to content

fix(napi): data maybe null in custom_gc#2304

Merged
Brooooooklyn merged 2 commits intomainfrom
10-13-fix_napi_data_maybe_null_in_custom_gc
Oct 13, 2024
Merged

fix(napi): data maybe null in custom_gc#2304
Brooooooklyn merged 2 commits intomainfrom
10-13-fix_napi_data_maybe_null_in_custom_gc

Conversation

@Brooooooklyn
Copy link
Member

@Brooooooklyn Brooooooklyn commented Oct 13, 2024

Sometimes thread has not been disposed but the objects on it have been
recycled, we need to check if the data has been pointed to null before
unref it.

See #2300 for context

Sometimes thread has not been disposed but the objects on it have been
recycled, we need to check if the data has been pointed to null before
unref it.
Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @Brooooooklyn and the rest of your teammates on Graphite Graphite

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Details
Benchmark suite Current: 7697340 Previous: 52e1f6b Ratio
noop#napi-rs 86084191 ops/sec (±0.23%) 84517102 ops/sec (±1.58%) 0.98
noop#JavaScript 815438460 ops/sec (±0.28%) 816118930 ops/sec (±0.26%) 1.00
Plus number#napi-rs 23161713 ops/sec (±0.33%) 23241026 ops/sec (±0.15%) 1.00
Plus number#JavaScript 813914269 ops/sec (±0.25%) 814498837 ops/sec (±0.21%) 1.00
Create buffer#napi-rs 648848 ops/sec (±12.15%) 623578 ops/sec (±13.24%) 0.96
Create buffer#JavaScript 3584577 ops/sec (±2.35%) 3543033 ops/sec (±3.3%) 0.99
createArray#createArrayJson 53196 ops/sec (±0.47%) 53656 ops/sec (±0.39%) 1.01
createArray#create array for loop 9808 ops/sec (±0.47%) 9878 ops/sec (±0.09%) 1.01
createArray#create array with serde trait 9859 ops/sec (±0.42%) 9901 ops/sec (±0.1%) 1.00
getArrayFromJs#get array from json string 23803 ops/sec (±0.75%) 23992 ops/sec (±0.48%) 1.01
getArrayFromJs#get array from serde 13570 ops/sec (±0.37%) 13670 ops/sec (±0.46%) 1.01
getArrayFromJs#get array with for loop 16399 ops/sec (±0.49%) 16793 ops/sec (±0.36%) 1.02
Get Set property#Get Set from native#u32 558508 ops/sec (±12.15%) 603374 ops/sec (±8.09%) 1.08
Get Set property#Get Set from JavaScript#u32 537177 ops/sec (±2.39%) 538163 ops/sec (±1.95%) 1.00
Get Set property#Get Set from native#string 551431 ops/sec (±11.81%) 562008 ops/sec (±10.46%) 1.02
Get Set property#Get Set from JavaScript#string 520251 ops/sec (±1.94%) 527493 ops/sec (±1.86%) 1.01
Async task#spawn task 25630 ops/sec (±0.83%) 26183 ops/sec (±0.57%) 1.02
Async task#ThreadSafeFunction 9031 ops/sec (±1.32%) 9428 ops/sec (±0.82%) 1.04
Async task#Tokio future to Promise 32161 ops/sec (±0.76%) 32707 ops/sec (±1.19%) 1.02
Query#query * 100 3513 ops/sec (±0.61%) 3523 ops/sec (±0.41%) 1.00
Query#query * 1 26995 ops/sec (±1.39%) 27793 ops/sec (±0.78%) 1.03

This comment was automatically generated by workflow using github-action-benchmark.

@Brooooooklyn Brooooooklyn merged commit e0811d1 into main Oct 13, 2024
Copy link
Member Author

Merge activity

  • Oct 13, 11:33 AM EDT: A user merged this pull request with Graphite.

@Brooooooklyn Brooooooklyn deleted the 10-13-fix_napi_data_maybe_null_in_custom_gc branch October 13, 2024 15:33
Brooooooklyn added a commit that referenced this pull request Oct 13, 2024
* fix(napi): data maybe null in custom_gc

Sometimes thread has not been disposed but the objects on it have been
recycled, we need to check if the data has been pointed to null before
unref it.

* disable v8 compile cache on CI
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.

1 participant