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

Unified Diff: chrome/content/common.js

Issue 29350387: Issue 4353 - Remove deprecated __proto__ syntax (Closed)
Patch Set: Created Sept. 1, 2016, 11:44 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
« no previous file with comments | « no previous file | chrome/content/tests/filterClasses.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/content/common.js
diff --git a/chrome/content/common.js b/chrome/content/common.js
index 7bc1d4772f99660690927519368b2ff758450749..022aec6cce837ee303790cf954c4b6f3c1c1324e 100644
--- a/chrome/content/common.js
+++ b/chrome/content/common.js
@@ -78,9 +78,9 @@ function prepareFilterComponents(keepListeners)
};
FilterStorage.subscriptions = [];
- FilterStorage.knownSubscriptions = {__proto__: null};
- Subscription.knownSubscriptions = {__proto__: null};
- Filter.knownFilters = {__proto__: null};
+ FilterStorage.knownSubscriptions = Object.create(null);
+ Subscription.knownSubscriptions = Object.create(null);
+ Filter.knownFilters = Object.create(null);
if (!keepListeners)
{
FilterNotifierGlobal.listeners = [];
@@ -124,7 +124,7 @@ function scheduleReinit()
function preparePrefs()
{
- this._pbackup = {__proto__: null};
+ this._pbackup = Object.create(null);
for (let pref in Prefs)
{
if (Prefs.__lookupSetter__(pref))
@@ -162,7 +162,7 @@ function setupVirtualTime(processTimers)
{
processTimers(function wrapTimer(timer)
{
- let wrapper = {__proto__: timer};
+ let wrapper = Object.create(timer);
let callback = timer.callback;
wrapper.handler = function() callback.notify(wrapper);
wrapper.nextExecution = currentTime + timer.delay;
« no previous file with comments | « no previous file | chrome/content/tests/filterClasses.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld