feat: signal handling on windows (#9129)

* start some signal handling

* ok

* work on this from friday

* ok

* ref stuff

* threadsafety

* fix the buikld

* alright

* ok

* fix posix compilation error

* header fix

* revisions

---------

Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
Co-authored-by: Zack Radisic <zack@theradisic.com>
This commit is contained in:
dave caruso
2024-03-04 15:37:08 -08:00
committed by GitHub
parent fa08ac34c9
commit 472a0b482d
15 changed files with 323 additions and 166 deletions

View File

@@ -733,8 +733,10 @@ pub const String = extern struct {
}
pub inline fn utf8(self: String) []const u8 {
if (comptime bun.Environment.allow_assert)
if (comptime bun.Environment.allow_assert) {
std.debug.assert(self.tag == .ZigString or self.tag == .StaticZigString);
std.debug.assert(self.canBeUTF8());
}
return self.value.ZigString.slice();
}