Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
stream: cleanup
  • Loading branch information
rluvaton committed Aug 10, 2023
commit ede6c54f5789c43d6001870923acf8d3b6e6cee8
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