Skip to content

Commit

Permalink
Convert the standard properties on streams objects to prototype (#1850)
Browse files Browse the repository at this point in the history
  • Loading branch information
jasnell committed Apr 4, 2024
1 parent 9b5650b commit 7bcbc89
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/workerd/api/streams/standard.h
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ class ReadableStreamDefaultController: public jsg::Object {
kj::Maybe<ValueQueue::ConsumerImpl::StateListener&> stateListener);

JSG_RESOURCE_TYPE(ReadableStreamDefaultController) {
JSG_READONLY_INSTANCE_PROPERTY(desiredSize, getDesiredSize);
JSG_READONLY_PROTOTYPE_PROPERTY(desiredSize, getDesiredSize);
JSG_METHOD(close);
JSG_METHOD(enqueue);
JSG_METHOD(error);
Expand Down Expand Up @@ -483,13 +483,13 @@ class ReadableStreamBYOBRequest: public jsg::Object {
void respondWithNewView(jsg::Lock& js, jsg::BufferSource view);

JSG_RESOURCE_TYPE(ReadableStreamBYOBRequest) {
JSG_READONLY_INSTANCE_PROPERTY(view, getView);
JSG_READONLY_PROTOTYPE_PROPERTY(view, getView);
JSG_METHOD(respond);
JSG_METHOD(respondWithNewView);

// atLeast is an Workers-specific extension used to support the
// readAtLeast API.
JSG_READONLY_INSTANCE_PROPERTY(atLeast, getAtLeast);
JSG_READONLY_PROTOTYPE_PROPERTY(atLeast, getAtLeast);
}

bool isPartiallyFulfilled();
Expand Down Expand Up @@ -549,8 +549,8 @@ class ReadableByteStreamController: public jsg::Object {
kj::Maybe<ByteQueue::ConsumerImpl::StateListener&> stateListener);

JSG_RESOURCE_TYPE(ReadableByteStreamController) {
JSG_READONLY_INSTANCE_PROPERTY(byobRequest, getByobRequest);
JSG_READONLY_INSTANCE_PROPERTY(desiredSize, getDesiredSize);
JSG_READONLY_PROTOTYPE_PROPERTY(byobRequest, getByobRequest);
JSG_READONLY_PROTOTYPE_PROPERTY(desiredSize, getDesiredSize);
JSG_METHOD(close);
JSG_METHOD(enqueue);
JSG_METHOD(error);
Expand Down Expand Up @@ -606,7 +606,7 @@ class WritableStreamDefaultController: public jsg::Object {
jsg::Promise<void> write(jsg::Lock& js, v8::Local<v8::Value> value);

JSG_RESOURCE_TYPE(WritableStreamDefaultController) {
JSG_READONLY_INSTANCE_PROPERTY(signal, getSignal);
JSG_READONLY_PROTOTYPE_PROPERTY(signal, getSignal);
JSG_METHOD(error);
}

Expand Down

0 comments on commit 7bcbc89

Please sign in to comment.