Skip to content
Closed
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
lib: rename mixin StreamBase to StreamSharedMethods
  • Loading branch information
aks- committed Mar 23, 2018
commit 0144de48bf2963b60adc3af653fd7d2c4308af4e
6 changes: 3 additions & 3 deletions lib/internal/http2/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ const {
const {
kCreateWriteWrap,
kWriteGeneric,
StreamBase
} = require('internal/stream_base');
StreamSharedMethods
} = require('internal/stream_shared_methods');

const { ShutdownWrap, WriteWrap } = process.binding('stream_wrap');
const { constants, nameForErrorCode } = binding;
Expand Down Expand Up @@ -1887,7 +1887,7 @@ class Http2Stream extends Duplex {
}
}
}
Object.assign(Http2Stream.prototype, StreamBase);
Object.assign(Http2Stream.prototype, StreamSharedMethods);

function processHeaders(headers) {
assertIsObject(headers, 'headers');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function _handleWriteReq(req, handle, data, encoding) {
}
}

const StreamBase = {
const StreamSharedMethods = {
[kCreateWriteWrap](req, handle, oncomplete) {
req.handle = handle;
req.oncomplete = oncomplete;
Expand Down Expand Up @@ -78,5 +78,5 @@ module.exports = {
kCreateWriteWrap,
kWritevGeneric,
kWriteGeneric,
StreamBase
StreamSharedMethods
};
6 changes: 3 additions & 3 deletions lib/net.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ const {
kCreateWriteWrap,
kWritevGeneric,
kWriteGeneric,
StreamBase
} = require('internal/stream_base');
StreamSharedMethods
} = require('internal/stream_shared_methods');
const errors = require('internal/errors');
const {
ERR_INVALID_ADDRESS_FAMILY,
Expand Down Expand Up @@ -314,7 +314,7 @@ function Socket(options) {
this[BYTES_READ] = 0;
}
util.inherits(Socket, stream.Duplex);
Object.assign(Socket.prototype, StreamBase);
Object.assign(Socket.prototype, StreamSharedMethods);

// Refresh existing timeouts.
Socket.prototype._unrefTimer = function _unrefTimer() {
Expand Down
2 changes: 1 addition & 1 deletion node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
'lib/internal/v8_prof_polyfill.js',
'lib/internal/v8_prof_processor.js',
'lib/internal/vm/Module.js',
'lib/internal/stream_base.js',
'lib/internal/stream_shared_methods.js',
'lib/internal/streams/lazy_transform.js',
'lib/internal/streams/async_iterator.js',
'lib/internal/streams/BufferList.js',
Expand Down