aboutsummaryrefslogtreecommitdiff
path: root/src/javascript/jsc/bindings/BunStream.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/javascript/jsc/bindings/BunStream.h')
-rw-r--r--src/javascript/jsc/bindings/BunStream.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/javascript/jsc/bindings/BunStream.h b/src/javascript/jsc/bindings/BunStream.h
index 37762d689..0fdf87beb 100644
--- a/src/javascript/jsc/bindings/BunStream.h
+++ b/src/javascript/jsc/bindings/BunStream.h
@@ -23,9 +23,8 @@ class Readable : public JSC::JSNonFinalObject {
static constexpr unsigned StructureFlags = Base::StructureFlags;
- template <typename CellType, JSC::SubspaceAccess>
- static JSC::CompleteSubspace *subspaceFor(JSC::VM &vm) {
- return &vm.cellSpace;
+ template <typename CellType, SubspaceAccess> static GCClient::IsoSubspace *subspaceFor(VM &vm) {
+ return &vm.plainObjectSpace();
}
static JSC::Structure *createStructure(JSC::VM &vm, JSC::JSGlobalObject *globalObject,
@@ -36,7 +35,7 @@ class Readable : public JSC::JSNonFinalObject {
static Readable *create(JSC::VM &vm, Bun__Readable *state, JSC::Structure *structure) {
Readable *accessor =
- new (NotNull, JSC::allocateCell<Bun::Readable>(vm.heap)) Readable(vm, state, structure);
+ new (NotNull, JSC::allocateCell<Bun::Readable>(vm)) Readable(vm, state, structure);
accessor->finishCreation(vm);
return accessor;
}
@@ -57,9 +56,8 @@ class Writable : public JSC::JSNonFinalObject {
static constexpr unsigned StructureFlags = Base::StructureFlags;
- template <typename CellType, JSC::SubspaceAccess>
- static JSC::CompleteSubspace *subspaceFor(JSC::VM &vm) {
- return &vm.cellSpace;
+ template <typename CellType, SubspaceAccess> static GCClient::IsoSubspace *subspaceFor(VM &vm) {
+ return &vm.plainObjectSpace();
}
static JSC::Structure *createStructure(JSC::VM &vm, JSC::JSGlobalObject *globalObject,
@@ -69,8 +67,9 @@ class Writable : public JSC::JSNonFinalObject {
}
static Writable *create(JSC::VM &vm, Bun__Writable *state, JSC::Structure *structure) {
+
Writable *accessor =
- new (NotNull, JSC::allocateCell<Writable>(vm.heap)) Writable(vm, state, structure);
+ new (NotNull, JSC::allocateCell<Writable>(vm)) Writable(vm, state, structure);
accessor->finishCreation(vm);
return accessor;
}