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

Side by Side Diff: qunit/common.js

Issue 5721433737003008: Issue 1985 - Replaced __proto__ with Object.create() and Object.getPrototypeOf() (Closed)
Patch Set: Created Feb. 11, 2015, 11:51 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « options.js ('k') | safari/ext/background.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2015 Eyeo GmbH 3 * Copyright (C) 2006-2015 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 10 matching lines...) Expand all
21 importAll("matcher", this); 21 importAll("matcher", this);
22 importAll("filterStorage", this); 22 importAll("filterStorage", this);
23 importAll("filterNotifier", this); 23 importAll("filterNotifier", this);
24 importAll("elemHide", this); 24 importAll("elemHide", this);
25 importAll("prefs", this); 25 importAll("prefs", this);
26 importAll("utils", this); 26 importAll("utils", this);
27 27
28 function prepareFilterComponents(keepListeners) 28 function prepareFilterComponents(keepListeners)
29 { 29 {
30 FilterStorage.subscriptions = []; 30 FilterStorage.subscriptions = [];
31 FilterStorage.knownSubscriptions = {__proto__: null}; 31 FilterStorage.knownSubscriptions = Object.create(null);
32 Subscription.knownSubscriptions = {__proto__: null}; 32 Subscription.knownSubscriptions = Object.create(null);
33 Filter.knownFilters = {__proto__: null}; 33 Filter.knownFilters = Object.create(null);
34 34
35 defaultMatcher.clear(); 35 defaultMatcher.clear();
36 ElemHide.clear(); 36 ElemHide.clear();
37 } 37 }
38 38
39 function restoreFilterComponents() 39 function restoreFilterComponents()
40 { 40 {
41 } 41 }
42 42
43 function preparePrefs() 43 function preparePrefs()
44 { 44 {
45 this._pbackup = {__proto__: null}; 45 this._pbackup = Object.create(null);
46 for (var pref in Prefs) 46 for (var pref in Prefs)
47 if (Prefs.__lookupSetter__(pref)) 47 if (Prefs.__lookupSetter__(pref))
48 this._pbackup[pref] = Prefs[pref]; 48 this._pbackup[pref] = Prefs[pref];
49 Prefs.enabled = true; 49 Prefs.enabled = true;
50 } 50 }
51 51
52 function restorePrefs() 52 function restorePrefs()
53 { 53 {
54 for (var pref in this._pbackup) 54 for (var pref in this._pbackup)
55 Prefs[pref] = this._pbackup[pref]; 55 Prefs[pref] = this._pbackup[pref];
56 } 56 }
57 57
58 function executeFirstRunActions() 58 function executeFirstRunActions()
59 { 59 {
60 } 60 }
OLDNEW
« no previous file with comments | « options.js ('k') | safari/ext/background.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld