Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib: implement AbortSignal.abort() #37693

Closed
wants to merge 2 commits into from

Conversation

jasnell
Copy link
Member

@jasnell jasnell commented Mar 10, 2021

Implementation of AbortSignal.abort() to create an already aborted AbortSignal

Refs: whatwg/dom#960

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. tools Issues and PRs related to the tools directory. labels Mar 10, 2021
@aduh95 aduh95 added the blocked PRs that are blocked by other issues or PRs. label Mar 10, 2021
@nodejs-github-bot

This comment has been minimized.

@jasnell jasnell force-pushed the implement-abortsignal-abort branch from cfb02a0 to 0b60272 Compare March 11, 2021 15:27
@nodejs-github-bot
Copy link
Collaborator

nodejs-github-bot commented Mar 11, 2021

Copy link
Member

@benjamingr benjamingr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, please pull in the WPTs you added :)

@@ -65,10 +69,10 @@ ObjectDefineProperty(AbortSignal.prototype, SymbolToStringTag, {

defineEventHandler(AbortSignal.prototype, 'abort');

function createAbortSignal() {
function createAbortSignal(aborted = false) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this approach rather than doing new AbortSignalesque?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new AbortSignal() is not permitted by the spec.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, right, we ended up doing this and not the "fake parameter in constructor" approach.

@jasnell jasnell removed the blocked PRs that are blocked by other issues or PRs. label Mar 15, 2021
@jasnell
Copy link
Member Author

jasnell commented Mar 15, 2021

whatwg/dom#960 has landed. This can proceed

@jasnell jasnell added abortcontroller Issues and PRs related to the AbortController API semver-minor PRs that contain new features and should be released in the next minor version. and removed needs-ci PRs that need a full CI run. labels Mar 15, 2021
Signed-off-by: James M Snell <[email protected]>
@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@benjamingr benjamingr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

jasnell added a commit that referenced this pull request Mar 15, 2021
Refs: whatwg/dom#960

PR-URL: #37693
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
jasnell added a commit that referenced this pull request Mar 15, 2021
Signed-off-by: James M Snell <[email protected]>

PR-URL: #37693
Refs: whatwg/dom#960
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
@jasnell
Copy link
Member Author

jasnell commented Mar 15, 2021

Landed in 263bf4e and 1d740ec

@jasnell jasnell closed this Mar 15, 2021
@benjamingr benjamingr added the notable-change PRs with changes that should be highlighted in changelogs. label Mar 15, 2021
@benjamingr
Copy link
Member

Added "Notable Change" since I think it's justified - if you disagree feel free to remove @jasnell

danielleadams pushed a commit that referenced this pull request Mar 16, 2021
Refs: whatwg/dom#960

PR-URL: #37693
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
danielleadams pushed a commit that referenced this pull request Mar 16, 2021
Signed-off-by: James M Snell <[email protected]>

PR-URL: #37693
Refs: whatwg/dom#960
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
danielleadams added a commit that referenced this pull request Mar 16, 2021
PR-URL: #37766

Notable changes:

* crypto:
  * add optional callback to crypto.sign and crypto.verify (Filip Skokan) #37500
  * support JWK objects in create\*Key (Filip Skokan) #37254
* deps:
  * update archs files for OpenSSL-1.1.1+quic (James M Snell) #37601
  * switch openssl to quictls/openssl (James M Snell) #37601
* doc:
  * update maintaining-openssl guide (James M Snell) #37601
* fs:
  * improve fsPromises writeFile performance (Nitzan Uziely) #37610
  * add promisified readFile benchmark (Nitzan Uziely) #37608
  * improve fsPromises readFile performance (Nitzan Uziely) #37608
* lib:
  * implement AbortSignal.abort() (James M Snell) #37693
* node-api:
  * define version 8 (Gabriel Schulhof) #37652
* test:
  * update dom/abort tests (James M Snell) #37693
  * fixup test to account for quic openssl version (James M Snell) #37601
* worker:
  * add setEnvironmentData/getEnvironmentData (James M Snell) #37486
danielleadams pushed a commit that referenced this pull request Mar 16, 2021
Refs: whatwg/dom#960

PR-URL: #37693
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
danielleadams pushed a commit that referenced this pull request Mar 16, 2021
Signed-off-by: James M Snell <[email protected]>

PR-URL: #37693
Refs: whatwg/dom#960
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
danielleadams added a commit that referenced this pull request Mar 16, 2021
PR-URL: #37766

Notable changes:

* crypto:
  * add optional callback to crypto.sign and crypto.verify (Filip Skokan) #37500
  * support JWK objects in create\*Key (Filip Skokan) #37254
* deps:
  * update archs files for OpenSSL-1.1.1+quic (James M Snell) #37601
  * switch openssl to quictls/openssl (James M Snell) #37601
* doc:
  * update maintaining-openssl guide (James M Snell) #37601
* fs:
  * improve fsPromises writeFile performance (Nitzan Uziely) #37610
  * add promisified readFile benchmark (Nitzan Uziely) #37608
  * improve fsPromises readFile performance (Nitzan Uziely) #37608
* lib:
  * implement AbortSignal.abort() (James M Snell) #37693
* node-api:
  * define version 8 (Gabriel Schulhof) #37652
* test:
  * update dom/abort tests (James M Snell) #37693
  * fixup test to account for quic openssl version (James M Snell) #37601
* worker:
  * add setEnvironmentData/getEnvironmentData (James M Snell) #37486
danielleadams added a commit that referenced this pull request Mar 16, 2021
PR-URL: #37766

Notable changes:

* crypto:
  * add optional callback to crypto.sign and crypto.verify (Filip Skokan) #37500
  * support JWK objects in create\*Key (Filip Skokan) #37254
* deps:
  * switch openssl to quictls/openssl (James M Snell) #37601
* fs:
  * improve fsPromises writeFile performance (Nitzan Uziely) #37610
  * improve fsPromises readFile performance (Nitzan Uziely) #37608
* lib:
  * implement AbortSignal.abort() (James M Snell) #37693
* node-api:
  * define version 8 (Gabriel Schulhof) #37652
* worker:
  * add setEnvironmentData/getEnvironmentData (James M Snell) #37486
danielleadams added a commit that referenced this pull request Mar 17, 2021
PR-URL: #37766

Notable changes:

* crypto:
  * add optional callback to crypto.sign and crypto.verify (Filip Skokan) #37500
  * support JWK objects in create\*Key (Filip Skokan) #37254
* deps:
  * switch openssl to quictls/openssl (James M Snell) #37601
* fs:
  * improve fsPromises writeFile performance (Nitzan Uziely) #37610
  * improve fsPromises readFile performance (Nitzan Uziely) #37608
* lib:
  * implement AbortSignal.abort() (James M Snell) #37693
* node-api:
  * define version 8 (Gabriel Schulhof) #37652
* worker:
  * add setEnvironmentData/getEnvironmentData (James M Snell) #37486
danielleadams added a commit that referenced this pull request Mar 17, 2021
PR-URL: #37766

Notable changes:

* crypto:
  * add optional callback to crypto.sign and crypto.verify (Filip Skokan) #37500
  * support JWK objects in create\*Key (Filip Skokan) #37254
* deps:
  * switch openssl to quictls/openssl (James M Snell) #37601
* fs:
  * improve fsPromises writeFile performance (Nitzan Uziely) #37610
  * improve fsPromises readFile performance (Nitzan Uziely) #37608
* lib:
  * implement AbortSignal.abort() (James M Snell) #37693
* node-api:
  * define version 8 (Gabriel Schulhof) #37652
* worker:
  * add setEnvironmentData/getEnvironmentData (James M Snell) #37486
danielleadams added a commit that referenced this pull request Mar 17, 2021
PR-URL: #37766

Notable changes:

* crypto:
  * add optional callback to crypto.sign and crypto.verify (Filip Skokan) #37500
  * support JWK objects in create\*Key (Filip Skokan) #37254
* deps:
  * update to [email protected] (Guy Bedford) #37712
  * switch openssl to quictls/openssl (James M Snell) #37601
* fs:
  * improve fsPromises writeFile performance (Nitzan Uziely) #37610
  * improve fsPromises readFile performance (Nitzan Uziely) #37608
* lib:
  * implement AbortSignal.abort() (James M Snell) #37693
* node-api:
  * define version 8 (Gabriel Schulhof) #37652
* worker:
  * add setEnvironmentData/getEnvironmentData (James M Snell) #37486
danielleadams added a commit that referenced this pull request Mar 17, 2021
PR-URL: #37766

Notable changes:

* crypto:
  * add optional callback to crypto.sign and crypto.verify (Filip Skokan) #37500
  * support JWK objects in create\*Key (Filip Skokan) #37254
* deps:
  * update to [email protected] (Guy Bedford) #37712
  * switch openssl to quictls/openssl (James M Snell) #37601
* fs:
  * improve fsPromises writeFile performance (Nitzan Uziely) #37610
  * improve fsPromises readFile performance (Nitzan Uziely) #37608
* lib:
  * implement AbortSignal.abort() (James M Snell) #37693
* node-api:
  * define version 8 (Gabriel Schulhof) #37652
* worker:
  * add setEnvironmentData/getEnvironmentData (James M Snell) #37486
targos pushed a commit to targos/node that referenced this pull request Apr 24, 2021
Refs: whatwg/dom#960

PR-URL: nodejs#37693
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
targos pushed a commit to targos/node that referenced this pull request Apr 24, 2021
Signed-off-by: James M Snell <[email protected]>

PR-URL: nodejs#37693
Refs: whatwg/dom#960
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
targos pushed a commit to targos/node that referenced this pull request Apr 26, 2021
Refs: whatwg/dom#960

PR-URL: nodejs#37693
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
targos pushed a commit to targos/node that referenced this pull request Apr 26, 2021
Signed-off-by: James M Snell <[email protected]>

PR-URL: nodejs#37693
Refs: whatwg/dom#960
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
targos pushed a commit to targos/node that referenced this pull request Apr 30, 2021
Refs: whatwg/dom#960

PR-URL: nodejs#37693
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
targos pushed a commit to targos/node that referenced this pull request Apr 30, 2021
Signed-off-by: James M Snell <[email protected]>

PR-URL: nodejs#37693
Refs: whatwg/dom#960
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
targos pushed a commit that referenced this pull request Apr 30, 2021
Refs: whatwg/dom#960

PR-URL: #37693
Backport-PR-URL: #38386
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
targos pushed a commit that referenced this pull request Apr 30, 2021
Signed-off-by: James M Snell <[email protected]>

PR-URL: #37693
Backport-PR-URL: #38386
Refs: whatwg/dom#960
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
danielleadams added a commit that referenced this pull request May 3, 2021
Notable changes:

* assert:
  * change status of legacy asserts (James M Snell) (#38113)
* doc:
  * apply style for legacy status (James M Snell) (#37784)
  * revoke deprecation of legacy url, change status to legacy (James M Snell) (#37784)
  * add legacy status to stability index (James M Snell) (#37784)
  * upgrade stability status of report API (Gireesh Punathil) (#35654)
* deps:
  * V8: cherry-pick cf71540c684c (BoHong Li) (#38051)
  * update ICU to 68.1 (Michaël Zasso) (#36187)
  * upgrade to libuv 1.41.0 (Colin Ihrig) (#37360)
* fs:
  * add promisified readFile benchmark (Nitzan Uziely) (#37608)
* http:
  * add http.ClientRequest.getRawHeaderNames() (simov) (#37660)
  * report request start and end with diagnostics\_channel (Stephen Belanger) (#34895)
* lib:
  * create diagnostics\_channel module (Stephen Belanger) (#34895)
  * implement AbortSignal.abort() (James M Snell) (#37693)
* test:
  * update dom/abort tests (James M Snell) (#37693)
* util:
  * add getSystemErrorMap() impl (eladkeyshawn) (#38101)
@danielleadams danielleadams mentioned this pull request May 3, 2021
danielleadams added a commit that referenced this pull request May 3, 2021
PR-URL: #38507

Notable changes:

* assert:
  * change status of legacy asserts (James M Snell) (#38113)
* doc:
  * apply style for legacy status (James M Snell) (#37784)
  * revoke deprecation of legacy url, change status to legacy (James M Snell) (#37784)
  * add legacy status to stability index (James M Snell) (#37784)
  * upgrade stability status of report API (Gireesh Punathil) (#35654)
* deps:
  * V8: cherry-pick cf71540c684c (BoHong Li) (#38051)
  * update ICU to 68.1 (Michaël Zasso) (#36187)
  * upgrade to libuv 1.41.0 (Colin Ihrig) (#37360)
* fs:
  * add promisified readFile benchmark (Nitzan Uziely) (#37608)
* http:
  * add http.ClientRequest.getRawHeaderNames() (simov) (#37660)
  * report request start and end with diagnostics\_channel (Stephen Belanger) (#34895)
* lib:
  * create diagnostics\_channel module (Stephen Belanger) (#34895)
  * implement AbortSignal.abort() (James M Snell) (#37693)
* test:
  * update dom/abort tests (James M Snell) (#37693)
* util:
  * add getSystemErrorMap() impl (eladkeyshawn) (#38101)
danielleadams added a commit that referenced this pull request May 3, 2021
PR-URL: #38507

Notable changes:

* assert:
  * change status of legacy asserts (James M Snell) (#38113)
* doc:
  * apply style for legacy status (James M Snell) (#37784)
  * revoke deprecation of legacy url, change status to legacy (James M Snell) (#37784)
  * add legacy status to stability index (James M Snell) (#37784)
  * upgrade stability status of report API (Gireesh Punathil) (#35654)
* deps:
  * V8: cherry-pick cf71540c684c (BoHong Li) (#38051)
  * update ICU to 68.1 (Michaël Zasso) (#36187)
  * upgrade to libuv 1.41.0 (Colin Ihrig) (#37360)
* fs:
  * add promisified readFile benchmark (Nitzan Uziely) (#37608)
* http:
  * add http.ClientRequest.getRawHeaderNames() (simov) (#37660)
  * report request start and end with diagnostics\_channel (Stephen Belanger) (#34895)
* lib:
  * create diagnostics\_channel module (Stephen Belanger) (#34895)
  * implement AbortSignal.abort() (James M Snell) (#37693)
* test:
  * update dom/abort tests (James M Snell) (#37693)
* util:
  * add getSystemErrorMap() impl (eladkeyshawn) (#38101)
danielleadams added a commit that referenced this pull request May 4, 2021
PR-URL: #38507

Notable changes:

* assert:
  * change status of legacy asserts (James M Snell) (#38113)
* doc:
  * apply style for legacy status (James M Snell) (#37784)
  * revoke deprecation of legacy url, change status to legacy (James M Snell) (#37784)
  * add legacy status to stability index (James M Snell) (#37784)
  * upgrade stability status of report API (Gireesh Punathil) (#35654)
* deps:
  * V8: cherry-pick cf71540c684c (BoHong Li) (#38051)
  * update ICU to 68.1 (Michaël Zasso) (#36187)
  * upgrade to libuv 1.41.0 (Colin Ihrig) (#37360)
* fs:
  * add promisified readFile benchmark (Nitzan Uziely) (#37608)
* http:
  * add http.ClientRequest.getRawHeaderNames() (simov) (#37660)
  * report request start and end with diagnostics\_channel (Stephen Belanger) (#34895)
* lib:
  * create diagnostics\_channel module (Stephen Belanger) (#34895)
  * implement AbortSignal.abort() (James M Snell) (#37693)
* test:
  * update dom/abort tests (James M Snell) (#37693)
* util:
  * add getSystemErrorMap() impl (eladkeyshawn) (#38101)
danielleadams added a commit that referenced this pull request May 7, 2021
PR-URL: #38507

Notable changes:

* assert:
  * change status of legacy asserts (James M Snell) (#38113)
* crypto:
  * implement randomuuid (James M Snell) (#36729)
* doc:
  * apply style for legacy status (James M Snell) (#37784)
  * revoke deprecation of legacy url, change status to legacy (James M Snell) (#37784)
  * add legacy status to stability index (James M Snell) (#37784)
  * upgrade stability status of report API (Gireesh Punathil) (#35654)
* deps:
  * V8: Backport various patches for Apple Silicon support (BoHong Li) (#38051)
  * update ICU to 68.1 (Michaël Zasso) (#36187)
  * upgrade to libuv 1.41.0 (Colin Ihrig) (#37360)
* http:
  * add http.ClientRequest.getRawHeaderNames() (simov) (#37660)
  * report request start and end with diagnostics\_channel (Stephen Belanger) (#34895)
* lib:
  * create diagnostics\_channel module (Stephen Belanger) (#34895)
  * implement AbortSignal.abort() (James M Snell) (#37693)
* test:
  * update dom/abort tests (James M Snell) (#37693)
* util:
  * add getSystemErrorMap() impl (eladkeyshawn) (#38101)
danielleadams added a commit that referenced this pull request May 8, 2021
PR-URL: #38507

Notable changes:

* crypto:
  * implement randomuuid (James M Snell) (#36729)
* doc:
  * apply style for legacy status (James M Snell) (#37784)
  * revoke deprecation of legacy url, change status to legacy (James M Snell) (#37784)
  * add legacy status to stability index (James M Snell) (#37784)
  * upgrade stability status of report API (Gireesh Punathil) (#35654)
* deps:
  * V8: Backport various patches for Apple Silicon support (BoHong Li) (#38051)
  * update ICU to 68.1 (Michaël Zasso) (#36187)
  * upgrade to libuv 1.41.0 (Colin Ihrig) (#37360)
* http:
  * add http.ClientRequest.getRawHeaderNames() (simov) (#37660)
  * report request start and end with diagnostics\_channel (Stephen Belanger) (#34895)
* lib:
  * create diagnostics\_channel module (Stephen Belanger) (#34895)
  * implement AbortSignal.abort() (James M Snell) (#37693)
* test:
  * update dom/abort tests (James M Snell) (#37693)
* util:
  * add getSystemErrorMap() impl (eladkeyshawn) (#38101)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
abortcontroller Issues and PRs related to the AbortController API notable-change PRs with changes that should be highlighted in changelogs. semver-minor PRs that contain new features and should be released in the next minor version. tools Issues and PRs related to the tools directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants