Adding gc tests: fixing a memory leak with C++ URLRequest objects.

This commit is contained in:
ali.ibrahim 2016-10-17 19:02:25 +02:00
parent 9b4e9c642a
commit c198828e58
4 changed files with 95 additions and 27 deletions

View file

@ -95,7 +95,7 @@ URLRequest.prototype._emitRequestEvent = function (async, ...rest) {
URLRequest.prototype._emitResponseEvent = function (async, ...rest) {
if (async) {
process.nextTick(() => {
this.clientRequest.emit.apply(this._response, rest)
this._response.emit.apply(this._response, rest)
})
} else {
this._response.emit.apply(this._response, rest)