fix(napi): data maybe null in custom_gc#2304
Merged
Brooooooklyn merged 2 commits intomainfrom Oct 13, 2024
Merged
Conversation
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.
Member
Author
|
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @Brooooooklyn and the rest of your teammates on |
Contributor
There was a problem hiding this comment.
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.
Member
Author
Merge activity
|
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
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.

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