summaryrefslogtreecommitdiff
path: root/lib/_tls_wrap.js
diff options
context:
space:
mode:
authorFedor Indutny <fedor@indutny.com>2015-03-05 20:27:58 -0500
committerFedor Indutny <fedor@indutny.com>2015-03-06 11:02:01 -0500
commitc09c90c1a9e74ee4f29a051daf10bc4c5d5f7755 (patch)
treeb94ecca33f11d0713518d434f9575b8f70e99ab0 /lib/_tls_wrap.js
parentdccb69a21afc759e8827a5293ee8648d3ba354b0 (diff)
downloadnode-new-c09c90c1a9e74ee4f29a051daf10bc4c5d5f7755.tar.gz
tls_wrap: do not hold persistent ref to parent
Hold non-persistent reference in JS, rather than in C++ to avoid cycles. PR-URL: https://github.com/iojs/io.js/pull/1078 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'lib/_tls_wrap.js')
-rw-r--r--lib/_tls_wrap.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/_tls_wrap.js b/lib/_tls_wrap.js
index 0d1a245728..2fd13ef83d 100644
--- a/lib/_tls_wrap.js
+++ b/lib/_tls_wrap.js
@@ -286,6 +286,7 @@ TLSSocket.prototype._wrapHandle = function(handle) {
tls.createSecureContext();
res = tls_wrap.wrap(handle, context.context, options.isServer);
res._parent = handle;
+ res._secureContext = context;
res.reading = handle.reading;
Object.defineProperty(handle, 'reading', {
get: function readingGetter() {