mirror of
https://github.com/nodejs/node.git
synced 2026-11-26 21:58:26 -05:00
async_wrap: make uid the first argument in init
All other hooks have uid as the first argument, this makes it concistent for all hooks. Ref: https://github.com/nodejs/node/pull/7048 PR-URL: #4600 Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
This commit is contained in:
1 parent
13d465bcf6
commit
e10eebffa5
5 files changed
+6
-6
No files matched your search
@@ -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())
|
||||
};
|
||||
|
||||
|
||||
@@ -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() { }
|
||||
|
||||
@@ -9,7 +9,7 @@ const providers = Object.keys(async_wrap.Providers);
|
||||
let cntr = 0;
|
||||
let client;
|
||||
|
||||
function init(type, id, parent) {
|
||||
function init(id, type, parent) {
|
||||
if (parent) {
|
||||
cntr++;
|
||||
// Cannot assert in init callback or will abort.
|
||||
|
||||
@@ -8,7 +8,7 @@ const async_wrap = process.binding('async_wrap');
|
||||
let cntr = 0;
|
||||
let client;
|
||||
|
||||
function init(type, id, parent) {
|
||||
function init(id, type, parent) {
|
||||
if (parent) {
|
||||
cntr++;
|
||||
// Cannot assert in init callback or will abort.
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user