| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 2e7ccc2 commit d731369
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -607,7 +607,7 @@ The DebugContext will be removed in V8 soon and will not be available in Node | |||
| 607 | 607 | <a id="DEP0070"></a> | |
| 608 | 608 | ### DEP0070: async_hooks.currentId() | |
| 609 | 609 | ||
| 610 | - Type: Runtime | ||
| 610 | + Type: End-of-Life | ||
| 611 | 611 | ||
| 612 | 612 | `async_hooks.currentId()` was renamed to `async_hooks.executionAsyncId()` for | |
| 613 | 613 | clarity. | |
@@ -617,7 +617,7 @@ clarity. | |||
| 617 | 617 | <a id="DEP0071"></a> | |
| 618 | 618 | ### DEP0071: async_hooks.triggerId() | |
| 619 | 619 | ||
| 620 | - Type: Runtime | ||
| 620 | + Type: End-of-Life | ||
| 621 | 621 | ||
| 622 | 622 | `async_hooks.triggerId()` was renamed to `async_hooks.triggerAsyncId()` for | |
| 623 | 623 | clarity. | |
@@ -627,7 +627,7 @@ clarity. | |||
| 627 | 627 | <a id="DEP0072"></a> | |
| 628 | 628 | ### DEP0072: async_hooks.AsyncResource.triggerId() | |
| 629 | 629 | ||
| 630 | - Type: Runtime | ||
| 630 | + Type: End-of-Life | ||
| 631 | 631 | ||
| 632 | 632 | `async_hooks.AsyncResource.triggerId()` was renamed to | |
| 633 | 633 | `async_hooks.AsyncResource.triggerAsyncId()` for clarity. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,5 @@ | |||
| 1 | 1 | 'use strict'; | |
| 2 | 2 | ||
| 3 | - const internalUtil = require('internal/util'); | ||
| 4 | 3 | const async_wrap = process.binding('async_wrap'); | |
| 5 | 4 | /* Both these arrays are used to communicate between JS and C++ with as little | |
| 6 | 5 | * overhead as possible. | |
@@ -245,17 +244,6 @@ class AsyncResource { | |||
| 245 | 244 | } | |
| 246 | 245 | ||
| 247 | 246 | ||
| 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 | 247 | function runInAsyncIdScope(asyncId, cb) { | |
| 260 | 248 | // Store the async id now to make sure the stack is still good when the ids | |
| 261 | 249 | // 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 | - // experimental stage so the alias can be removed at any time, we are just | ||
| 468 | - // being nice :) | ||
| 469 | - Object.defineProperty(module.exports, 'currentId', { | ||
| 470 | - get: internalUtil.deprecate(function() { | ||
| 471 | - return executionAsyncId; | ||
| 472 | - }, 'async_hooks.currentId is deprecated. ' + | ||
| 473 | - 'Use async_hooks.executionAsyncId instead.', 'DEP0070') | ||
| 474 | - }); | ||
| 475 | - | ||
| 476 | - // triggerId was renamed to triggerAsyncId. This was in 8.2.0 during the | ||
| 477 | - // experimental stage so the alias can be removed at any time, we are just | ||
| 478 | - // being nice :) | ||
| 479 | - Object.defineProperty(module.exports, 'triggerId', { | ||
| 480 | - get: internalUtil.deprecate(function() { | ||
| 481 | - return triggerAsyncId; | ||
| 482 | - }, 'async_hooks.triggerId is deprecated. ' + | ||
| 483 | - 'Use async_hooks.triggerAsyncId instead.', 'DEP0071') | ||
| 484 | - }); | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -745,19 +745,11 @@ async_id AsyncHooksGetExecutionAsyncId(Isolate* isolate) { | |||
| 745 | 745 | return Environment::GetCurrent(isolate)->current_async_id(); | |
| 746 | 746 | } | |
| 747 | 747 | ||
| 748 | - async_id AsyncHooksGetCurrentId(Isolate* isolate) { | ||
| 749 | - return AsyncHooksGetExecutionAsyncId(isolate); | ||
| 750 | - } | ||
| 751 | - | ||
| 752 | 748 | ||
| 753 | 749 | async_id AsyncHooksGetTriggerAsyncId(Isolate* isolate) { | |
| 754 | 750 | return Environment::GetCurrent(isolate)->trigger_id(); | |
| 755 | 751 | } | |
| 756 | 752 | ||
| 757 | - async_id AsyncHooksGetTriggerId(Isolate* isolate) { | ||
| 758 | - return AsyncHooksGetTriggerAsyncId(isolate); | ||
| 759 | - } | ||
| 760 | - | ||
| 761 | 753 | ||
| 762 | 754 | async_context EmitAsyncInit(Isolate* isolate, | |
| 763 | 755 | Local<Object> resource, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -533,17 +533,9 @@ NODE_EXTERN void AddPromiseHook(v8::Isolate* isolate, | |||
| 533 | 533 | * zero then no execution has been set. This will happen if the user handles | |
| 534 | 534 | * I/O from native code. */ | |
| 535 | 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 | 536 | ||
| 541 | 537 | /* Return same value as async_hooks.triggerAsyncId(); */ | |
| 542 | 538 | NODE_EXTERN async_id AsyncHooksGetTriggerAsyncId(v8::Isolate* isolate); | |
| 543 | - /* legacy alias */ | ||
| 544 | - NODE_EXTERN NODE_DEPRECATED("Use AsyncHooksGetTriggerAsyncId(isolate)", | ||
| 545 | - async_id AsyncHooksGetTriggerId(v8::Isolate* isolate)); | ||
| 546 | - | ||
| 547 | 539 | ||
| 548 | 540 | /* If the native API doesn't inherit from the helper class then the callbacks | |
| 549 | 541 | * 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 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments