Skip to content

Commit

Permalink
Fully revert #255 as not released yet in core.
Browse files Browse the repository at this point in the history
  • Loading branch information
mcollina committed Mar 14, 2017
1 parent b062fe0 commit 06814dc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 31 deletions.
22 changes: 0 additions & 22 deletions build/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,25 +200,6 @@ const headRegexp = /(^module.exports = \w+;?)/m
/^function onCorkedFinish[\s\S]+?\r?\n\}/m,
''
]
, addConstructors = [
headRegexp,
`$1\n\n
// It seems a linked list but it is not
// there will be only 2 of these for each stream
function CorkedRequest(state) {
this.next = null;
this.entry = null;
this.finish = onCorkedFinish.bind(undefined, this, state);
}\n\n`
]
, useWriteReq = [
/state\.lastBufferedRequest = \{.+?\}/g,
`state.lastBufferedRequest = new WriteReq(chunk, encoding, cb)`
]
, useCorkedRequest = [
/var corkReq = [\s\S]+?(.+?)\.corkedRequestsFree = corkReq/g,
`$1.corkedRequestsFree = new CorkedRequest($1)`
]

module.exports['_stream_duplex.js'] = [
requireReplacement
Expand Down Expand Up @@ -300,9 +281,6 @@ module.exports['_stream_writable.js'] = [
, removeOnWriteBind
, removeCorkedFinishBind
, removeOnCorkedFinish
, addConstructors
, useWriteReq
, useCorkedRequest
]
module.exports['internal/streams/BufferList.js'] = [
bufferShimFix
Expand Down
10 changes: 1 addition & 9 deletions lib/_stream_writable.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,6 @@

module.exports = Writable;

// It seems a linked list but it is not
// there will be only 2 of these for each stream
function CorkedRequest(state) {
this.next = null;
this.entry = null;
this.finish = onCorkedFinish.bind(undefined, this, state);
}

/*<replacement>*/
var processNextTick = require('process-nextick-args');
/*</replacement>*/
Expand Down Expand Up @@ -556,4 +548,4 @@ function CorkedRequest(state) {
state.corkedRequestsFree = _this;
}
};
}
}

0 comments on commit 06814dc

Please sign in to comment.