Skip to content

Commit

Permalink
stream: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
rluvaton committed Aug 10, 2023
1 parent 9cfa60d commit 4bb72eb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
8 changes: 2 additions & 6 deletions lib/internal/webstreams/readablestream.js
Original file line number Diff line number Diff line change
Expand Up @@ -1019,6 +1019,7 @@ ObjectDefineProperties(ReadableStreamBYOBReader.prototype, {

class ReadableStreamDefaultController {
[kType] = 'ReadableStreamDefaultController';
[kState] = {};

constructor(skipThrowSymbol) {
if (skipThrowSymbol !== kSkipThrow) {
Expand Down Expand Up @@ -1080,12 +1081,7 @@ ObjectDefineProperties(ReadableStreamDefaultController.prototype, {
});

function createReadableStreamDefaultController() {
const controller = new ReadableStreamDefaultController(kSkipThrow);

controller[kType] = 'ReadableStreamDefaultController';
controller[kState] = {};

return controller;
return new ReadableStreamDefaultController(kSkipThrow);
}

class ReadableByteStreamController {
Expand Down
4 changes: 1 addition & 3 deletions lib/internal/webstreams/transformstream.js
Original file line number Diff line number Diff line change
Expand Up @@ -336,9 +336,7 @@ ObjectDefineProperties(TransformStreamDefaultController.prototype, {
});

function createTransformStreamDefaultController() {
const controller = new TransformStreamDefaultController(kSkipThrow);
controller[kType] = 'TransformStreamDefaultController';
return controller;
return new TransformStreamDefaultController(kSkipThrow);
}

const isTransformStream =
Expand Down
4 changes: 1 addition & 3 deletions lib/internal/webstreams/writablestream.js
Original file line number Diff line number Diff line change
Expand Up @@ -573,9 +573,7 @@ ObjectDefineProperties(WritableStreamDefaultController.prototype, {
});

function createWritableStreamDefaultController() {
const controller = new WritableStreamDefaultController(kSkipThrow);
controller[kType] = 'WritableStreamDefaultController';
return controller;
return new WritableStreamDefaultController(kSkipThrow);
}

const isWritableStream =
Expand Down

0 comments on commit 4bb72eb

Please sign in to comment.