Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/filterNotifier.js

Issue 29350382: Issue 4353 - Remove deprecated __proto__ syntax (Closed)
Patch Set: Missed a file... Created Sept. 1, 2016, 11:52 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: lib/filterNotifier.js
diff --git a/lib/filterNotifier.js b/lib/filterNotifier.js
index 8e24ff70e7307173ad5e929ee5d12dddc451100b..624b2bf48d3c0fa5e8008a5690800b471fa846ab 100644
--- a/lib/filterNotifier.js
+++ b/lib/filterNotifier.js
@@ -21,6 +21,7 @@
*/
let {EventEmitter} = require("events");
+let {desc} = require("coreUtils");
const CATCH_ALL = "__all";
@@ -28,10 +29,7 @@ const CATCH_ALL = "__all";
* This class allows registering and triggering listeners for filter events.
* @class
*/
-exports.FilterNotifier =
-{
- __proto__: new EventEmitter(),
-
+exports.FilterNotifier = Object.create(new EventEmitter(), desc({
/**
* Adds a listener
*
@@ -71,4 +69,4 @@ exports.FilterNotifier =
this.emit(action, item, param1, param2, param3);
this.emit(CATCH_ALL, action, item, param1, param2, param3);
}
-};
+}));
« lib/coreUtils.js ('K') | « lib/filterClasses.js ('k') | lib/subscriptionClasses.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld