mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 10:58:56 +00:00
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user