summaryrefslogtreecommitdiff
path: root/lib/internal/fs/watchers.js
diff options
context:
space:
mode:
authorRuben Bridgewater <ruben@bridgewater.de>2018-12-02 15:03:01 +0100
committerAnna Henningsen <anna@addaleax.net>2018-12-05 16:55:00 +0100
commit59257543c3db6f9ca01a91b75855934c2a913065 (patch)
treef2381b8db6f5d105a545d0452b4ec097c1810dba /lib/internal/fs/watchers.js
parentdcc82b37b631d636e0fefc8272c357ec4a7d6df2 (diff)
downloadandroid-node-v8-59257543c3db6f9ca01a91b75855934c2a913065.tar.gz
android-node-v8-59257543c3db6f9ca01a91b75855934c2a913065.tar.bz2
android-node-v8-59257543c3db6f9ca01a91b75855934c2a913065.zip
lib: use ES6 class inheritance style
PR-URL: https://github.com/nodejs/node/pull/24755 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Diffstat (limited to 'lib/internal/fs/watchers.js')
-rw-r--r--lib/internal/fs/watchers.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/internal/fs/watchers.js b/lib/internal/fs/watchers.js
index 46a520a45c..83c9b429ef 100644
--- a/lib/internal/fs/watchers.js
+++ b/lib/internal/fs/watchers.js
@@ -36,6 +36,7 @@ function StatWatcher(bigint) {
this[kUseBigint] = bigint;
}
Object.setPrototypeOf(StatWatcher.prototype, EventEmitter.prototype);
+Object.setPrototypeOf(StatWatcher, EventEmitter);
function onchange(newStatus, stats) {
const self = this[owner_symbol];
@@ -132,6 +133,7 @@ function FSWatcher() {
};
}
Object.setPrototypeOf(FSWatcher.prototype, EventEmitter.prototype);
+Object.setPrototypeOf(FSWatcher, EventEmitter);
// FIXME(joyeecheung): this method is not documented.