aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/bun.js')
-rw-r--r--src/bun.js/rare_data.zig1
-rw-r--r--src/bun.js/webcore/streams.zig6
2 files changed, 4 insertions, 3 deletions
diff --git a/src/bun.js/rare_data.zig b/src/bun.js/rare_data.zig
index bb52e5bea..26869c19d 100644
--- a/src/bun.js/rare_data.zig
+++ b/src/bun.js/rare_data.zig
@@ -167,6 +167,7 @@ pub fn stderr(rare: *RareData) *Blob.Store {
},
},
};
+
rare.stderr_store = store;
break :brk store;
};
diff --git a/src/bun.js/webcore/streams.zig b/src/bun.js/webcore/streams.zig
index e9c075074..eccab6fd0 100644
--- a/src/bun.js/webcore/streams.zig
+++ b/src/bun.js/webcore/streams.zig
@@ -257,7 +257,7 @@ pub const ReadableStream = struct {
};
switch (store.data) {
.bytes => {
- var reader = bun.default_allocator.create(ByteBlobLoader.Source) catch unreachable;
+ var reader = globalThis.allocator().create(ByteBlobLoader.Source) catch unreachable;
reader.* = .{
.globalThis = globalThis,
.context = undefined,
@@ -266,7 +266,7 @@ pub const ReadableStream = struct {
return reader.toJS(globalThis);
},
.file => {
- var reader = bun.default_allocator.create(FileReader.Source) catch unreachable;
+ var reader = globalThis.allocator().create(FileReader.Source) catch unreachable;
reader.* = .{
.globalThis = globalThis,
.context = .{
@@ -287,7 +287,7 @@ pub const ReadableStream = struct {
buffered_data: bun.ByteList,
) JSC.JSValue {
JSC.markBinding(@src());
- var reader = bun.default_allocator.create(FileReader.Source) catch unreachable;
+ var reader = globalThis.allocator().create(FileReader.Source) catch unreachable;
reader.* = .{
.globalThis = globalThis,
.context = .{