async_wrap: make uid the first argument in init

All other hooks have uid as the first argument, this makes it consistent
for all hooks.

PR-URL: https://github.com/nodejs/node/pull/4600
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
This commit is contained in:
Andreas Madsen 2016-01-09 12:27:53 +01:00 committed by Trevor Norris
parent c794869e97
commit c6c7d8b325
5 changed files with 6 additions and 6 deletions

View File

@ -40,8 +40,8 @@ inline AsyncWrap::AsyncWrap(Environment* env,
v8::HandleScope scope(env->isolate());
v8::Local<v8::Value> argv[] = {
v8::Int32::New(env->isolate(), provider),
v8::Integer::New(env->isolate(), get_uid()),
v8::Int32::New(env->isolate(), provider),
Null(env->isolate())
};

View File

@ -29,8 +29,8 @@ if (common.isAix) {
}
}
function init(id) {
keyList = keyList.filter((e) => e != pkeys[id]);
function init(id, provider) {
keyList = keyList.filter((e) => e != pkeys[provider]);
}
function noop() { }

View File

@ -10,7 +10,7 @@ let cntr = 0;
let server;
let client;
function init(type, id, parent) {
function init(id, type, parent) {
if (parent) {
cntr++;
// Cannot assert in init callback or will abort.

View File

@ -9,7 +9,7 @@ let cntr = 0;
let server;
let client;
function init(type, id, parent) {
function init(id, type, parent) {
if (parent) {
cntr++;
// Cannot assert in init callback or will abort.

View File

@ -9,7 +9,7 @@ const storage = new Map();
async_wrap.setupHooks(init, pre, post, destroy);
async_wrap.enable();
function init(provider, uid) {
function init(uid) {
storage.set(uid, {
init: true,
pre: false,