diff options
author | Andreas Madsen <amwebdk@gmail.com> | 2017-06-14 12:39:53 +0200 |
---|---|---|
committer | Andreas Madsen <amwebdk@gmail.com> | 2017-06-14 12:39:53 +0200 |
commit | de762b71f2e10d8eb6392ad6d4325b7ffc08b7fd (patch) | |
tree | e22a8325b4f994455f0959c311c4edf8a5095d43 /test/addons/async-resource | |
parent | 448c4c62d2b413226dfdef03d6f8d243de0984a3 (diff) | |
download | android-node-v8-de762b71f2e10d8eb6392ad6d4325b7ffc08b7fd.tar.gz android-node-v8-de762b71f2e10d8eb6392ad6d4325b7ffc08b7fd.tar.bz2 android-node-v8-de762b71f2e10d8eb6392ad6d4325b7ffc08b7fd.zip |
async_hooks: rename currentId and triggerId
currentId is renamed to executionAsyncId
triggerId is renamed to triggerAsyncId
AsyncResource.triggerId is renamed to AsyncResource.triggerAsyncId
AsyncHooksGetCurrentId is renamed to AsyncHooksGetExecutionAsyncId
AsyncHooksGetTriggerId is renamed to AsyncHooksGetTriggerAsyncId
PR-URL: https://github.com/nodejs/node/pull/13490
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Diffstat (limited to 'test/addons/async-resource')
-rw-r--r-- | test/addons/async-resource/binding.cc | 3 | ||||
-rw-r--r-- | test/addons/async-resource/test.js | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/test/addons/async-resource/binding.cc b/test/addons/async-resource/binding.cc index 093adfcba6..372f7a6fa4 100644 --- a/test/addons/async-resource/binding.cc +++ b/test/addons/async-resource/binding.cc @@ -93,7 +93,8 @@ void GetResource(const FunctionCallbackInfo<Value>& args) { } void GetCurrentId(const FunctionCallbackInfo<Value>& args) { - args.GetReturnValue().Set(node::AsyncHooksGetCurrentId(args.GetIsolate())); + args.GetReturnValue().Set( + node::AsyncHooksGetExecutionAsyncId(args.GetIsolate())); } void Initialize(Local<Object> exports) { diff --git a/test/addons/async-resource/test.js b/test/addons/async-resource/test.js index 34017750ce..b52db61a95 100644 --- a/test/addons/async-resource/test.js +++ b/test/addons/async-resource/test.js @@ -14,13 +14,13 @@ let after = 0; let destroy = 0; async_hooks.createHook({ - init(id, type, triggerId, resource) { + init(id, type, triggerAsyncId, resource) { assert.strictEqual(typeof id, 'number'); assert.strictEqual(typeof resource, 'object'); assert(id > 1); if (type === 'foobär') { assert.strictEqual(resource.kObjectTag, kObjectTag); - assert.strictEqual(triggerId, expectedTriggerId); + assert.strictEqual(triggerAsyncId, expectedTriggerId); bindingUids.push(id); } }, |