Skip to content

Commit

Permalink
fixup! events: extract addAbortListener for safe internal use
Browse files Browse the repository at this point in the history
  • Loading branch information
atlowChemi committed Mar 14, 2024
1 parent 4594616 commit eb934cc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 0 additions & 1 deletion lib/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ const {
Symbol,
SymbolFor,
SymbolAsyncIterator,
SymbolDispose,
} = primordials;
const kRejection = SymbolFor('nodejs.rejection');

Expand Down
12 changes: 7 additions & 5 deletions lib/internal/events/abort_listener.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
'use strict';

const {
validateAbortSignal,
validateFunction,
validateAbortSignal,
validateFunction,
} = require('internal/validators');
const {
codes: {
codes: {
ERR_INVALID_ARG_TYPE,
},
},
} = require('internal/errors');
const { SymbolDispose } = primordials;

let queueMicrotask;
let kResistStopPropagation;

/**
* @param {AbortSignal} signal
* @param {EventListener} listener
* @param {EventListener} listener
* @returns {Disposable}
*/
function addAbortListener(signal, listener) {
Expand Down

0 comments on commit eb934cc

Please sign in to comment.