Get Next.js Pages Router to work (#6095)

* hell

* make it so bun-debug-src

* teag

* wild

* yippee

* fas

* fix async hooks assertions

* yap

* yeah that's wild

* aa

* a

* increase time allowed

* so trivial
This commit is contained in:
dave caruso
2023-09-28 03:53:24 -07:00
committed by GitHub
parent e60b3607c1
commit 387f1260c9
61 changed files with 1430 additions and 540 deletions

View File

@@ -855,17 +855,17 @@ pub const SliceWithUnderlyingString = struct {
underlying: String,
pub fn toThreadSafe(this: *SliceWithUnderlyingString) void {
std.debug.assert(this.underlying.tag == .WTFStringImpl);
if (this.underlying.tag == .WTFStringImpl) {
var orig = this.underlying.value.WTFStringImpl;
this.underlying.toThreadSafe();
if (this.underlying.value.WTFStringImpl != orig) {
orig.deref();
var orig = this.underlying.value.WTFStringImpl;
this.underlying.toThreadSafe();
if (this.underlying.value.WTFStringImpl != orig) {
orig.deref();
if (this.utf8.allocator.get()) |allocator| {
if (String.isWTFAllocator(allocator)) {
this.utf8.deinit();
this.utf8 = this.underlying.toUTF8(bun.default_allocator);
if (this.utf8.allocator.get()) |allocator| {
if (String.isWTFAllocator(allocator)) {
this.utf8.deinit();
this.utf8 = this.underlying.toUTF8(bun.default_allocator);
}
}
}
}