Commit b4f58983 authored by Fedor Indutny's avatar Fedor Indutny
Browse files

net: ensure Write/ShutdownWrap references handle

`StreamBase::AfterWrite` is passing handle as an argument to the
`afterWrite` function in net.js. Thus GC should not collect the handle
and the request separately and assume that they are tied together.

With this commit - request will always outlive the StreamBase instance,
helping us survive the GC pass.

Same applies to the ShutdownWrap instances, they should never be
collected after the StreamBase instance.

Fix: https://github.com/iojs/io.js/pull/1580
PR-URL: https://github.com/iojs/io.js/pull/1590


Reviewed-By: default avatarBen Noordhuis <info@bnoordhuis.nl>
parent 2a3a1909
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment