diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index 94ee147fd2dc4b..64baf58867ba0e 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -607,7 +607,7 @@ The DebugContext will be removed in V8 soon and will not be available in Node ### DEP0070: async_hooks.currentId() -Type: Runtime +Type: End-of-Life `async_hooks.currentId()` was renamed to `async_hooks.executionAsyncId()` for clarity. @@ -617,7 +617,7 @@ clarity. ### DEP0071: async_hooks.triggerId() -Type: Runtime +Type: End-of-Life `async_hooks.triggerId()` was renamed to `async_hooks.triggerAsyncId()` for clarity. @@ -627,7 +627,7 @@ clarity. ### DEP0072: async_hooks.AsyncResource.triggerId() -Type: Runtime +Type: End-of-Life `async_hooks.AsyncResource.triggerId()` was renamed to `async_hooks.AsyncResource.triggerAsyncId()` for clarity. diff --git a/lib/async_hooks.js b/lib/async_hooks.js index 51039e9f36d24d..cb07938039052b 100644 --- a/lib/async_hooks.js +++ b/lib/async_hooks.js @@ -1,6 +1,5 @@ 'use strict'; -const internalUtil = require('internal/util'); const async_wrap = process.binding('async_wrap'); /* Both these arrays are used to communicate between JS and C++ with as little * overhead as possible. @@ -245,17 +244,6 @@ class AsyncResource { } -// triggerId was renamed to triggerAsyncId. This was in 8.2.0 during the -// experimental stage so the alias can be removed at any time, we are just -// being nice :) -Object.defineProperty(AsyncResource.prototype, 'triggerId', { - get: internalUtil.deprecate(function() { - return AsyncResource.prototype.triggerAsyncId; - }, 'AsyncResource.triggerId is deprecated. ' + - 'Use AsyncResource.triggerAsyncId instead.', 'DEP0072') -}); - - function runInAsyncIdScope(asyncId, cb) { // Store the async id now to make sure the stack is still good when the ids // are popped off the stack. @@ -462,23 +450,3 @@ module.exports = { emitAfter: emitAfterScript, emitDestroy: emitDestroyScript, }; - -// currentId was renamed to executionAsyncId. This was in 8.2.0 during the -// experimental stage so the alias can be removed at any time, we are just -// being nice :) -Object.defineProperty(module.exports, 'currentId', { - get: internalUtil.deprecate(function() { - return executionAsyncId; - }, 'async_hooks.currentId is deprecated. ' + - 'Use async_hooks.executionAsyncId instead.', 'DEP0070') -}); - -// triggerId was renamed to triggerAsyncId. This was in 8.2.0 during the -// experimental stage so the alias can be removed at any time, we are just -// being nice :) -Object.defineProperty(module.exports, 'triggerId', { - get: internalUtil.deprecate(function() { - return triggerAsyncId; - }, 'async_hooks.triggerId is deprecated. ' + - 'Use async_hooks.triggerAsyncId instead.', 'DEP0071') -}); diff --git a/src/async-wrap.cc b/src/async-wrap.cc index 0afaf663716ad2..f215f877e89a96 100644 --- a/src/async-wrap.cc +++ b/src/async-wrap.cc @@ -745,19 +745,11 @@ async_id AsyncHooksGetExecutionAsyncId(Isolate* isolate) { return Environment::GetCurrent(isolate)->current_async_id(); } -async_id AsyncHooksGetCurrentId(Isolate* isolate) { - return AsyncHooksGetExecutionAsyncId(isolate); -} - async_id AsyncHooksGetTriggerAsyncId(Isolate* isolate) { return Environment::GetCurrent(isolate)->trigger_id(); } -async_id AsyncHooksGetTriggerId(Isolate* isolate) { - return AsyncHooksGetTriggerAsyncId(isolate); -} - async_context EmitAsyncInit(Isolate* isolate, Local resource, diff --git a/src/node.h b/src/node.h index 88465a763476b7..b1d179bd1604bc 100644 --- a/src/node.h +++ b/src/node.h @@ -533,17 +533,9 @@ NODE_EXTERN void AddPromiseHook(v8::Isolate* isolate, * zero then no execution has been set. This will happen if the user handles * I/O from native code. */ NODE_EXTERN async_id AsyncHooksGetExecutionAsyncId(v8::Isolate* isolate); -/* legacy alias */ -NODE_EXTERN NODE_DEPRECATED("Use AsyncHooksGetExecutionAsyncId(isolate)", - async_id AsyncHooksGetCurrentId(v8::Isolate* isolate)); - /* Return same value as async_hooks.triggerAsyncId(); */ NODE_EXTERN async_id AsyncHooksGetTriggerAsyncId(v8::Isolate* isolate); -/* legacy alias */ -NODE_EXTERN NODE_DEPRECATED("Use AsyncHooksGetTriggerAsyncId(isolate)", - async_id AsyncHooksGetTriggerId(v8::Isolate* isolate)); - /* If the native API doesn't inherit from the helper class then the callbacks * must be triggered manually. This triggers the init() callback. The return @@ -643,12 +635,6 @@ class AsyncResource { return resource_.Get(isolate_); } - NODE_DEPRECATED("Use AsyncResource::get_async_id()", - async_id get_uid() const { - return get_async_id(); - } - ) - async_id get_async_id() const { return async_context_.async_id; }