Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f86c737

Browse files
committedMar 14, 2024··
fixup! events: extract addAbortListener for safe internal use
1 parent 4594616 commit f86c737

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed
 

‎lib/events.js

-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ const {
4848
Symbol,
4949
SymbolFor,
5050
SymbolAsyncIterator,
51-
SymbolDispose,
5251
} = primordials;
5352
const kRejection = SymbolFor('nodejs.rejection');
5453

‎lib/internal/events/abort_listener.js

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
1+
'use struct';
12

23
const {
3-
validateAbortSignal,
4-
validateFunction,
4+
validateAbortSignal,
5+
validateFunction,
56
} = require('internal/validators');
67
const {
7-
codes: {
8-
ERR_INVALID_ARG_TYPE,
9-
},
8+
codes: {
9+
ERR_INVALID_ARG_TYPE,
10+
},
1011
} = require('internal/errors');
12+
const { SymbolDispose } = primordials;
1113

1214
let queueMicrotask;
1315
let kResistStopPropagation;
1416

1517
/**
1618
* @param {AbortSignal} signal
17-
* @param {EventListener} listener
19+
* @param {EventListener} listener
1820
* @returns {Disposable}
1921
*/
2022
function addAbortListener(signal, listener) {

0 commit comments

Comments
 (0)
Please sign in to comment.