mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
zig: RefCount: fix assertion found by windows app verifier (#20459)
Co-authored-by: nektro <5464072+nektro@users.noreply.github.com>
This commit is contained in:
@@ -21,7 +21,6 @@ const Global = bun.Global;
|
||||
const invalid_package_id = install.invalid_package_id;
|
||||
const strings = bun.strings;
|
||||
const string = bun.string;
|
||||
const stringZ = bun.stringZ;
|
||||
const FileSystem = bun.fs.FileSystem;
|
||||
const LifecycleScriptSubprocess = install.LifecycleScriptSubprocess;
|
||||
const PackageID = install.PackageID;
|
||||
@@ -30,11 +29,9 @@ const ExtractData = install.ExtractData;
|
||||
const Task = install.Task;
|
||||
const TaskCallbackContext = install.TaskCallbackContext;
|
||||
const PatchTask = install.PatchTask;
|
||||
const NetworkTask = install.NetworkTask;
|
||||
const Package = Lockfile.Package;
|
||||
const Path = bun.path;
|
||||
const Syscall = bun.sys;
|
||||
const ThreadPool = bun.ThreadPool;
|
||||
|
||||
pub const PackageInstaller = struct {
|
||||
manager: *PackageManager,
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
const std = @import("std");
|
||||
const bun = @import("bun");
|
||||
const strings = bun.strings;
|
||||
const string = bun.string;
|
||||
const FileSystem = bun.fs.FileSystem;
|
||||
const install = bun.install;
|
||||
const PackageManager = install.PackageManager;
|
||||
|
||||
@@ -45,11 +45,9 @@ const HeaderBuilder = HTTP.HeaderBuilder;
|
||||
|
||||
const ExtractTarball = @import("./extract_tarball.zig");
|
||||
pub const Npm = @import("./npm.zig");
|
||||
const Bitset = bun.bit_set.DynamicBitSetUnmanaged;
|
||||
const Syscall = bun.sys;
|
||||
const RunCommand = @import("../cli/run_command.zig").RunCommand;
|
||||
threadlocal var initialized_store = false;
|
||||
const Futex = @import("../futex.zig");
|
||||
|
||||
pub const Lockfile = @import("./lockfile.zig");
|
||||
pub const TextLockfile = @import("./lockfile/bun.lock.zig");
|
||||
|
||||
@@ -494,6 +494,7 @@ pub fn DebugData(thread_safe: bool) type {
|
||||
assertValid(debug);
|
||||
debug.magic = undefined;
|
||||
debug.lock.lock();
|
||||
defer debug.lock.unlock();
|
||||
debug.map.clearAndFree(bun.default_allocator);
|
||||
debug.frees.clearAndFree(bun.default_allocator);
|
||||
if (debug.allocation_scope) |scope| {
|
||||
|
||||
Reference in New Issue
Block a user