8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2e7ccc2 commit d731369Copy full SHA for d731369
doc/api/deprecations.md
@@ -607,7 +607,7 @@ The DebugContext will be removed in V8 soon and will not be available in Node
607
<a id="DEP0070"></a>
608
### DEP0070: async_hooks.currentId()
609
610
-Type: Runtime
+Type: End-of-Life
611
612
`async_hooks.currentId()` was renamed to `async_hooks.executionAsyncId()` for
613
clarity.
@@ -617,7 +617,7 @@ clarity.
617
<a id="DEP0071"></a>
618
### DEP0071: async_hooks.triggerId()
619
620
621
622
`async_hooks.triggerId()` was renamed to `async_hooks.triggerAsyncId()` for
623
@@ -627,7 +627,7 @@ clarity.
627
<a id="DEP0072"></a>
628
### DEP0072: async_hooks.AsyncResource.triggerId()
629
630
631
632
`async_hooks.AsyncResource.triggerId()` was renamed to
633
`async_hooks.AsyncResource.triggerAsyncId()` for clarity.
lib/async_hooks.js
@@ -1,6 +1,5 @@
1
'use strict';
2
3
-const internalUtil = require('internal/util');
4
const async_wrap = process.binding('async_wrap');
5
/* Both these arrays are used to communicate between JS and C++ with as little
6
* overhead as possible.
@@ -245,17 +244,6 @@ class AsyncResource {
245
244
}
246
247
248
-// triggerId was renamed to triggerAsyncId. This was in 8.2.0 during the
249
-// experimental stage so the alias can be removed at any time, we are just
250
-// being nice :)
251
-Object.defineProperty(AsyncResource.prototype, 'triggerId', {
252
- get: internalUtil.deprecate(function() {
253
- return AsyncResource.prototype.triggerAsyncId;
254
- }, 'AsyncResource.triggerId is deprecated. ' +
255
- 'Use AsyncResource.triggerAsyncId instead.', 'DEP0072')
256
-});
257
-
258
259
function runInAsyncIdScope(asyncId, cb) {
260
// Store the async id now to make sure the stack is still good when the ids
261
// are popped off the stack.
@@ -462,23 +450,3 @@ module.exports = {
462
450
emitAfter: emitAfterScript,
463
451
emitDestroy: emitDestroyScript,
464
452
};
465
466
-// currentId was renamed to executionAsyncId. This was in 8.2.0 during the
467
468
469
-Object.defineProperty(module.exports, 'currentId', {
470
471
- return executionAsyncId;
472
- }, 'async_hooks.currentId is deprecated. ' +
473
- 'Use async_hooks.executionAsyncId instead.', 'DEP0070')
474
475
476
477
478
479
-Object.defineProperty(module.exports, 'triggerId', {
480
481
- return triggerAsyncId;
482
- }, 'async_hooks.triggerId is deprecated. ' +
483
- 'Use async_hooks.triggerAsyncId instead.', 'DEP0071')
484
src/async-wrap.cc
@@ -745,19 +745,11 @@ async_id AsyncHooksGetExecutionAsyncId(Isolate* isolate) {
745
return Environment::GetCurrent(isolate)->current_async_id();
746
747
748
-async_id AsyncHooksGetCurrentId(Isolate* isolate) {
749
- return AsyncHooksGetExecutionAsyncId(isolate);
750
-}
751
752
753
async_id AsyncHooksGetTriggerAsyncId(Isolate* isolate) {
754
return Environment::GetCurrent(isolate)->trigger_id();
755
756
757
-async_id AsyncHooksGetTriggerId(Isolate* isolate) {
758
- return AsyncHooksGetTriggerAsyncId(isolate);
759
760
761
762
async_context EmitAsyncInit(Isolate* isolate,
763
Local<Object> resource,
src/node.h
@@ -533,17 +533,9 @@ NODE_EXTERN void AddPromiseHook(v8::Isolate* isolate,
533
* zero then no execution has been set. This will happen if the user handles
534
* I/O from native code. */
535
NODE_EXTERN async_id AsyncHooksGetExecutionAsyncId(v8::Isolate* isolate);
536
-/* legacy alias */
537
-NODE_EXTERN NODE_DEPRECATED("Use AsyncHooksGetExecutionAsyncId(isolate)",
538
- async_id AsyncHooksGetCurrentId(v8::Isolate* isolate));
539
540
541
/* Return same value as async_hooks.triggerAsyncId(); */
542
NODE_EXTERN async_id AsyncHooksGetTriggerAsyncId(v8::Isolate* isolate);
543
544
-NODE_EXTERN NODE_DEPRECATED("Use AsyncHooksGetTriggerAsyncId(isolate)",
545
- async_id AsyncHooksGetTriggerId(v8::Isolate* isolate));
546
547
548
/* If the native API doesn't inherit from the helper class then the callbacks
549
* must be triggered manually. This triggers the init() callback. The return
@@ -643,12 +635,6 @@ class AsyncResource {
643
635
return resource_.Get(isolate_);
644
636
645
637
646
- NODE_DEPRECATED("Use AsyncResource::get_async_id()",
647
- async_id get_uid() const {
648
- return get_async_id();
649
- }
650
- )
651
652
638
async_id get_async_id() const {
653
639
return async_context_.async_id;
654
640