worker: make MessagePort inherit from EventTarget by addaleax · Pull Request #34057 · nodejs/node

@addaleax added semver-major

PRs that contain breaking changes and should be released in the next major version.

worker

Issues and PRs related to Worker support.

eventtarget

Issues and PRs related to the EventTarget implementation.

labels

Jun 25, 2020

@nodejs-github-bot nodejs-github-bot added the c++

Issues and PRs that require attention from people who are familiar with C++.

label

Jun 25, 2020

benjamingr

devnexen

This test has not been working correctly since at least a555be2.

Since it tests internals, any replacement test might become invalid
in a similar way.
Enable `NodeEventTarget` as a base class for `MessagePort`,
by enabling special processing of events for Node.js listeners,
and removing implicit constructors/private properties so that
classes can be made subclasses of `NodeEventTarget` after they
are created.
The messaging code uses `Object.defineProperty()`, which accesses
`value` on `Object.prototype` by default, so some calls to the
getter here would actually be expected. Instead, make the list
of accessed properties more specific to the tested source map
code to avoid flakiness.

Refs: https://twitter.com/addaleax/status/1276289101671608320
Use `NodeEventTarget` to provide a mixed `EventEmitter`/`EventTarget`
API interface.

addaleax added a commit to addaleax/node that referenced this pull request

Jul 20, 2020
This test has not been working correctly since at least a555be2.

Since it tests internals, any replacement test might become invalid
in a similar way.

Refs: nodejs#34057

addaleax added a commit to addaleax/node that referenced this pull request

Jul 20, 2020
The messaging code uses `Object.defineProperty()`, which accesses
`value` on `Object.prototype` by default, so some calls to the
getter here would actually be expected. Instead, make the list
of accessed properties more specific to the tested source map
code to avoid flakiness.

Refs: https://twitter.com/addaleax/status/1276289101671608320
Refs: nodejs#34057

@addaleax

@addaleax

@addaleax addaleax marked this pull request as ready for review

July 21, 2020 18:59

ruyadorno pushed a commit that referenced this pull request

Jul 28, 2020
Use `NodeEventTarget` to provide a mixed `EventEmitter`/`EventTarget`
API interface.

PR-URL: #34057
Refs: https://twitter.com/addaleax/status/1276289101671608320
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>

ruyadorno added a commit that referenced this pull request

Jul 28, 2020
Notable changes:

dgram:
  * (SEMVER-MINOR) add IPv6 scope id suffix to received udp6 dgrams (Pekka Nikander) #14500
doc:
  * add AshCripps to collaborators (AshCripps) #34494
  * add HarshithaKP to collaborators (Harshitha K P) #34417
  * add rexagod to collaborators (Pranshu Srivastava) #34457
  * add release key for Richard Lau (Richard Lau) #34397
events:
  * (SEMVER-MINOR) expand NodeEventTarget functionality (Anna Henningsen) #34057
src:
  * (SEMVER-MINOR) allow preventing SetPromiseRejectCallback (Shelley Vohr) #34387
  * (SEMVER-MINOR) allow setting a dir for all diagnostic output (AshCripps) #33584
worker:
  * (SEMVER-MINOR) make MessagePort inherit from EventTarget (Anna Henningsen) #34057
zlib:
  * switch to lazy init for zlib streams (Andrey Pechkurov) #34048

PR-URL: #34542

ruyadorno pushed a commit that referenced this pull request

Jul 29, 2020
Use `NodeEventTarget` to provide a mixed `EventEmitter`/`EventTarget`
API interface.

PR-URL: #34057
Refs: https://twitter.com/addaleax/status/1276289101671608320
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>

ruyadorno added a commit that referenced this pull request

Jul 29, 2020
Notable changes:

deps:
  * upgrade npm to 6.14.7 (claudiahdz) #34468
dgram:
  * (SEMVER-MINOR) add IPv6 scope id suffix to received udp6 dgrams (Pekka Nikander) #14500
doc:
  * add AshCripps to collaborators (AshCripps) #34494
  * add HarshithaKP to collaborators (Harshitha K P) #34417
  * add rexagod to collaborators (Pranshu Srivastava) #34457
  * add release key for Richard Lau (Richard Lau) #34397
events:
  * (SEMVER-MINOR) expand NodeEventTarget functionality (Anna Henningsen) #34057
src:
  * (SEMVER-MINOR) allow preventing SetPromiseRejectCallback (Shelley Vohr) #34387
  * (SEMVER-MINOR) allow setting a dir for all diagnostic output (AshCripps) #33584
worker:
  * (SEMVER-MINOR) make MessagePort inherit from EventTarget (Anna Henningsen) #34057
zlib:
  * switch to lazy init for zlib streams (Andrey Pechkurov) #34048

PR-URL: #34542

MylesBorins pushed a commit that referenced this pull request

Jul 29, 2020
Notable changes:

deps:
  * upgrade npm to 6.14.7 (claudiahdz) #34468
dgram:
  * (SEMVER-MINOR) add IPv6 scope id suffix to received udp6 dgrams (Pekka Nikander) #14500
doc:
  * add AshCripps to collaborators (AshCripps) #34494
  * add HarshithaKP to collaborators (Harshitha K P) #34417
  * add rexagod to collaborators (Pranshu Srivastava) #34457
  * add release key for Richard Lau (Richard Lau) #34397
events:
  * (SEMVER-MINOR) expand NodeEventTarget functionality (Anna Henningsen) #34057
src:
  * (SEMVER-MINOR) allow preventing SetPromiseRejectCallback (Shelley Vohr) #34387
  * (SEMVER-MINOR) allow setting a dir for all diagnostic output (AshCripps) #33584
worker:
  * (SEMVER-MINOR) make MessagePort inherit from EventTarget (Anna Henningsen) #34057
zlib:
  * switch to lazy init for zlib streams (Andrey Pechkurov) #34048

PR-URL: #34542

This was referenced

Jul 29, 2020

addaleax added a commit that referenced this pull request

Sep 22, 2020
The messaging code uses `Object.defineProperty()`, which accesses
`value` on `Object.prototype` by default, so some calls to the
getter here would actually be expected. Instead, make the list
of accessed properties more specific to the tested source map
code to avoid flakiness.

Refs: https://twitter.com/addaleax/status/1276289101671608320
Refs: #34057

PR-URL: #34446
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>

addaleax added a commit that referenced this pull request

Sep 22, 2020
This test has not been working correctly since at least a555be2.

Since it tests internals, any replacement test might become invalid
in a similar way.

Refs: #34057

PR-URL: #34445
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>

addaleax added a commit that referenced this pull request

Sep 22, 2020
The messaging code uses `Object.defineProperty()`, which accesses
`value` on `Object.prototype` by default, so some calls to the
getter here would actually be expected. Instead, make the list
of accessed properties more specific to the tested source map
code to avoid flakiness.

Refs: https://twitter.com/addaleax/status/1276289101671608320
Refs: #34057

PR-URL: #34446
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>

addaleax added a commit that referenced this pull request

Sep 22, 2020
This test has not been working correctly since at least a555be2.

Since it tests internals, any replacement test might become invalid
in a similar way.

Refs: #34057

PR-URL: #34445
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>

GeorgeSapkin

addaleax added a commit to addaleax/node that referenced this pull request

Oct 27, 2020

nodejs-github-bot pushed a commit that referenced this pull request

Oct 28, 2020
Refs: #34057
Refs: #35835

PR-URL: #35839
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>

targos pushed a commit that referenced this pull request

Nov 3, 2020
Refs: #34057
Refs: #35835

PR-URL: #35839
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>

BethGriggs pushed a commit that referenced this pull request

Dec 8, 2020
Refs: #34057
Refs: #35835

PR-URL: #35839
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>

BethGriggs pushed a commit that referenced this pull request

Dec 10, 2020
Refs: #34057
Refs: #35835

PR-URL: #35839
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>

BethGriggs pushed a commit that referenced this pull request

Dec 15, 2020
Refs: #34057
Refs: #35835

PR-URL: #35839
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>