Index: lib/utils.js |
=================================================================== |
--- a/lib/utils.js |
+++ b/lib/utils.js |
@@ -534,17 +534,17 @@ let Utils = exports.Utils = |
/** |
* A cache with a fixed capacity, newer entries replace entries that have been |
* stored first. |
* @constructor |
*/ |
function Cache(/**Integer*/ size) |
{ |
this._ringBuffer = new Array(size); |
- this.data = {__proto__: null}; |
+ this.data = Object.create(null); |
} |
exports.Cache = Cache; |
Cache.prototype = |
{ |
/** |
* Ring buffer storing hash keys, allows determining which keys need to be |
* evicted. |
@@ -588,17 +588,17 @@ Cache.prototype = |
}, |
/** |
* Clears cache contents. |
*/ |
clear: function() |
{ |
this._ringBuffer = new Array(this._ringBuffer.length); |
- this.data = {__proto__: null}; |
+ this.data = Object.create(null); |
} |
} |
// Getters for common services, this should be replaced by Services.jsm in future |
XPCOMUtils.defineLazyServiceGetter(Utils, "categoryManager", "@mozilla.org/categorymanager;1", "nsICategoryManager"); |
XPCOMUtils.defineLazyServiceGetter(Utils, "ioService", "@mozilla.org/network/io-service;1", "nsIIOService"); |
XPCOMUtils.defineLazyServiceGetter(Utils, "promptService", "@mozilla.org/embedcomp/prompt-service;1", "nsIPromptService"); |