Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Remove gc tracing from streams queue entry #720

Merged
merged 1 commit into from
Jun 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions src/workerd/api/streams/queue.c++
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@ ValueQueue::QueueEntry ValueQueue::QueueEntry::clone(jsg::Lock& js) {
return QueueEntry { .entry = entry->clone(js) };
}

void ValueQueue::QueueEntry::visitForGc(jsg::GcVisitor& visitor) {
if (entry) visitor.visit(*entry);
}

#pragma endregion ValueQueue::QueueEntry

#pragma region ValueQueue::Consumer
Expand Down Expand Up @@ -186,9 +182,10 @@ void ValueQueue::handleRead(
return;
}
KJ_CASE_ONEOF(entry, QueueEntry) {
request.resolve(js, entry.entry->getValue(js));
state.queueTotalSize -= entry.entry->getSize();
auto freed = kj::mv(entry);
state.buffer.pop_front();
request.resolve(js, freed.entry->getValue(js));
state.queueTotalSize -= freed.entry->getSize();
return;
}
}
Expand Down Expand Up @@ -329,8 +326,6 @@ ByteQueue::QueueEntry ByteQueue::QueueEntry::clone(jsg::Lock& js) {
};
}

void ByteQueue::QueueEntry::visitForGc(jsg::GcVisitor& visitor) {}

#pragma endregion ByteQueue::QueueEntry

#pragma region ByteQueue::Consumer
Expand Down
9 changes: 0 additions & 9 deletions src/workerd/api/streams/queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -480,11 +480,6 @@ class ConsumerImpl final {
visitor.visit(errored);
}
KJ_CASE_ONEOF(ready, Ready) {
for (auto& entry : ready.buffer) {
KJ_IF_MAYBE(e, entry.template tryGet<QueueEntry>()) {
visitor.visit(*e);
}
}
for (auto& req : ready.readRequests) {
visitor.visit(req.resolver);
}
Expand Down Expand Up @@ -616,8 +611,6 @@ class ValueQueue final {
struct QueueEntry {
kj::Own<Entry> entry;
QueueEntry clone(jsg::Lock& js);

void visitForGc(jsg::GcVisitor& visitor);
};

class Consumer final {
Expand Down Expand Up @@ -809,8 +802,6 @@ class ByteQueue final {
size_t offset;

QueueEntry clone(jsg::Lock& js);

void visitForGc(jsg::GcVisitor& visitor);
};

class Consumer {
Expand Down