Skip to content

Commit

Permalink
events: preset usingDomains to false
Browse files Browse the repository at this point in the history
The line setting this was removed in a previous commit. This
potentially breaks code in the wild using this property.

Refs: nodejs#17403 (comment)
PR-URL: nodejs#18944
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
  • Loading branch information
MylesBorins committed Feb 23, 2018
1 parent 9cb96ac commit 6657b15
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ module.exports = EventEmitter;
// Backwards-compat with node 0.10.x
EventEmitter.EventEmitter = EventEmitter;

EventEmitter.usingDomains = false;

EventEmitter.prototype._events = undefined;
EventEmitter.prototype._eventsCount = 0;
EventEmitter.prototype._maxListeners = undefined;
Expand Down
1 change: 1 addition & 0 deletions test/parallel/test-event-emitter-subclass.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ function MyEE(cb) {

const myee = new MyEE(common.mustCall());

myee.hasOwnProperty('usingDomains');

util.inherits(ErrorEE, EventEmitter);
function ErrorEE() {
Expand Down

0 comments on commit 6657b15

Please sign in to comment.