Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Remove all AsyncListener JS code #8110

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
1 change: 0 additions & 1 deletion doc/api/all.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,3 @@
@include debugger
@include cluster
@include smalloc
@include tracing
273 changes: 0 additions & 273 deletions doc/api/tracing.markdown

This file was deleted.

4 changes: 3 additions & 1 deletion lib/child_process.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ var assert = require('assert');
var util = require('util');

var Process = process.binding('process_wrap').Process;
var WriteWrap = process.binding('stream_wrap').WriteWrap;
var uv = process.binding('uv');

var spawn_sync; // Lazy-loaded process.binding('spawn_sync')
Expand Down Expand Up @@ -473,7 +474,8 @@ function setupChannel(target, channel) {
return;
}

var req = { oncomplete: nop };
var req = new WriteWrap();
req.oncomplete = nop;
var string = JSON.stringify(message) + '\n';
var err = channel.writeUtf8String(req, string, handle);

Expand Down
5 changes: 4 additions & 1 deletion lib/dgram.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ var events = require('events');
var constants = require('constants');

var UDP = process.binding('udp_wrap').UDP;
var SendWrap = process.binding('udp_wrap').SendWrap;

var BIND_STATE_UNBOUND = 0;
var BIND_STATE_BINDING = 1;
Expand Down Expand Up @@ -317,7 +318,9 @@ Socket.prototype.send = function(buffer,
self.emit('error', ex);
}
else if (self._handle) {
var req = { buffer: buffer, length: length }; // Keep reference alive.
var req = new SendWrap();
req.buffer = buffer; // Keep reference alive.
req.length = length;
if (callback) {
req.callback = callback;
req.oncomplete = afterSend;
Expand Down
26 changes: 14 additions & 12 deletions lib/dns.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ var util = require('util');
var cares = process.binding('cares_wrap');
var uv = process.binding('uv');

var GetAddrInfoReqWrap = cares.GetAddrInfoReqWrap;
var GetNameInfoReqWrap = cares.GetNameInfoReqWrap;

var isIp = net.isIP;


Expand Down Expand Up @@ -142,12 +145,11 @@ exports.lookup = function lookup(hostname, options, callback) {
return {};
}

var req = {
callback: callback,
family: family,
hostname: hostname,
oncomplete: onlookup
};
var req = new GetAddrInfoReqWrap();
req.callback = callback;
req.family = family;
req.hostname = hostname;
req.oncomplete = onlookup;

var err = cares.getaddrinfo(req, hostname, family, hints);
if (err) {
Expand Down Expand Up @@ -178,12 +180,12 @@ exports.lookupService = function(host, port, callback) {

callback = makeAsync(callback);

var req = {
callback: callback,
host: host,
port: port,
oncomplete: onlookupservice
};
var req = new GetNameInfoReqWrap();
req.callback = callback;
req.host = host;
req.port = port;
req.oncomplete = onlookupservice;

var err = cares.getnameinfo(req, host, port);
if (err) throw errnoException(err, 'getnameinfo', host);

Expand Down
Loading