bare-performance 2.1.1 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CMakeLists.txt +1 -1
- package/binding.c +17 -0
- package/package.json +1 -1
- package/prebuilds/android-arm/bare-performance.bare +0 -0
- package/prebuilds/android-arm64/bare-performance.bare +0 -0
- package/prebuilds/android-ia32/bare-performance.bare +0 -0
- package/prebuilds/android-x64/bare-performance.bare +0 -0
- package/prebuilds/darwin-arm64/bare-performance.bare +0 -0
- package/prebuilds/darwin-x64/bare-performance.bare +0 -0
- package/prebuilds/ios-arm64/bare-performance.bare +0 -0
- package/prebuilds/ios-arm64-simulator/bare-performance.bare +0 -0
- package/prebuilds/ios-x64-simulator/bare-performance.bare +0 -0
- package/prebuilds/linux-arm64/bare-performance.bare +0 -0
- package/prebuilds/linux-x64/bare-performance.bare +0 -0
- package/prebuilds/win32-arm64/bare-performance.bare +0 -0
- package/prebuilds/win32-x64/bare-performance.bare +0 -0
package/CMakeLists.txt
CHANGED
|
@@ -20,7 +20,7 @@ option(HDR_HISTOGRAM_BUILD_PROGRAMS OFF)
|
|
|
20
20
|
option(HDR_HISTOGRAM_INSTALL_SHARED OFF)
|
|
21
21
|
option(HDR_HISTOGRAM_INSTALL_STATIC OFF)
|
|
22
22
|
|
|
23
|
-
fetch_package("github:HdrHistogram/HdrHistogram_c#0.
|
|
23
|
+
fetch_package("github:HdrHistogram/HdrHistogram_c#0.12.0")
|
|
24
24
|
|
|
25
25
|
add_bare_module(bare_performance)
|
|
26
26
|
|
package/binding.c
CHANGED
|
@@ -401,6 +401,12 @@ bare_performance_garbage_collection_tracking__on_new_entry(js_env_t *env, js_val
|
|
|
401
401
|
|
|
402
402
|
bare_performance_garbage_collection_entry_t *entry = (bare_performance_garbage_collection_entry_t *) data;
|
|
403
403
|
|
|
404
|
+
if (env == NULL) {
|
|
405
|
+
free(entry);
|
|
406
|
+
|
|
407
|
+
return;
|
|
408
|
+
}
|
|
409
|
+
|
|
404
410
|
js_value_t *ctx;
|
|
405
411
|
err = js_get_reference_value(env, entry->ctx, &ctx);
|
|
406
412
|
assert(err == 0);
|
|
@@ -443,7 +449,18 @@ bare_performance_garbage_collection_tracking__on_end(js_garbage_collection_type_
|
|
|
443
449
|
entry->duration = duration;
|
|
444
450
|
entry->kind = type;
|
|
445
451
|
|
|
452
|
+
err = js_acquire_threadsafe_function(gc->on_new_entry);
|
|
453
|
+
|
|
454
|
+
if (err < 0) {
|
|
455
|
+
free(entry);
|
|
456
|
+
|
|
457
|
+
return;
|
|
458
|
+
}
|
|
459
|
+
|
|
446
460
|
err = js_call_threadsafe_function(gc->on_new_entry, entry, js_threadsafe_function_nonblocking);
|
|
461
|
+
if (err < 0) free(entry);
|
|
462
|
+
|
|
463
|
+
err = js_release_threadsafe_function(gc->on_new_entry, js_threadsafe_function_release);
|
|
447
464
|
assert(err == 0);
|
|
448
465
|
}
|
|
449
466
|
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|