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

Side by Side Diff: chrome/content/ui/sidebar.js

Issue 5636077285015552: Issue 656 - Replace some __proto__ with Object.create (Closed)
Patch Set: Created June 23, 2014, 8:46 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 | « chrome/content/ui/sendReport.js ('k') | lib/elemHide.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 <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2014 Eyeo GmbH 3 * Copyright (C) 2006-2014 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 991 matching lines...) Expand 10 before | Expand all | Expand 10 after
1002 1002
1003 // 1003 //
1004 // Custom properties and methods 1004 // Custom properties and methods
1005 // 1005 //
1006 1006
1007 boxObject: null, 1007 boxObject: null,
1008 atoms: null, 1008 atoms: null,
1009 filter: "", 1009 filter: "",
1010 data: null, 1010 data: null,
1011 allData: [], 1011 allData: [],
1012 dataMap: {__proto__: null}, 1012 dataMap: Object.create(null),
1013 sortColumn: null, 1013 sortColumn: null,
1014 sortProc: null, 1014 sortProc: null,
1015 resortTimeout: null, 1015 resortTimeout: null,
1016 itemsDummy: null, 1016 itemsDummy: null,
1017 whitelistDummy: null, 1017 whitelistDummy: null,
1018 itemsDummyTooltip: null, 1018 itemsDummyTooltip: null,
1019 whitelistDummyTooltip: null, 1019 whitelistDummyTooltip: null,
1020 itemToSelect: null, 1020 itemToSelect: null,
1021 1021
1022 sortProcs: { 1022 sortProcs: {
1023 address: sortByAddress, 1023 address: sortByAddress,
1024 addressDesc: sortByAddressDesc, 1024 addressDesc: sortByAddressDesc,
1025 type: createSortWithFallback(compareType, sortByAddress, false), 1025 type: createSortWithFallback(compareType, sortByAddress, false),
1026 typeDesc: createSortWithFallback(compareType, sortByAddress, true), 1026 typeDesc: createSortWithFallback(compareType, sortByAddress, true),
1027 filter: createSortWithFallback(compareFilter, sortByAddress, false), 1027 filter: createSortWithFallback(compareFilter, sortByAddress, false),
1028 filterDesc: createSortWithFallback(compareFilter, sortByAddress, true), 1028 filterDesc: createSortWithFallback(compareFilter, sortByAddress, true),
1029 state: createSortWithFallback(compareState, sortByAddress, false), 1029 state: createSortWithFallback(compareState, sortByAddress, false),
1030 stateDesc: createSortWithFallback(compareState, sortByAddress, true), 1030 stateDesc: createSortWithFallback(compareState, sortByAddress, true),
1031 size: createSortWithFallback(compareSize, sortByAddress, false), 1031 size: createSortWithFallback(compareSize, sortByAddress, false),
1032 sizeDesc: createSortWithFallback(compareSize, sortByAddress, true), 1032 sizeDesc: createSortWithFallback(compareSize, sortByAddress, true),
1033 docDomain: createSortWithFallback(compareDocDomain, sortByAddress, false), 1033 docDomain: createSortWithFallback(compareDocDomain, sortByAddress, false),
1034 docDomainDesc: createSortWithFallback(compareDocDomain, sortByAddress, true) , 1034 docDomainDesc: createSortWithFallback(compareDocDomain, sortByAddress, true) ,
1035 filterSource: createSortWithFallback(compareFilterSource, sortByAddress, fal se), 1035 filterSource: createSortWithFallback(compareFilterSource, sortByAddress, fal se),
1036 filterSourceDesc: createSortWithFallback(compareFilterSource, sortByAddress, true) 1036 filterSourceDesc: createSortWithFallback(compareFilterSource, sortByAddress, true)
1037 }, 1037 },
1038 clearData: function(data) { 1038 clearData: function(data) {
1039 var oldRows = this.rowCount; 1039 var oldRows = this.rowCount;
1040 this.allData = []; 1040 this.allData = [];
1041 this.dataMap = {__proto__: null}; 1041 this.dataMap = Object.create(null);
1042 this.refilter(); 1042 this.refilter();
1043 1043
1044 this.boxObject.rowCountChanged(0, -oldRows); 1044 this.boxObject.rowCountChanged(0, -oldRows);
1045 this.boxObject.rowCountChanged(0, this.rowCount); 1045 this.boxObject.rowCountChanged(0, this.rowCount);
1046 }, 1046 },
1047 1047
1048 addItem: function(/**Node*/ node, /**RequestEntry*/ item, /**Boolean*/ scanCom plete) 1048 addItem: function(/**Node*/ node, /**RequestEntry*/ item, /**Boolean*/ scanCom plete)
1049 { 1049 {
1050 // Merge duplicate entries 1050 // Merge duplicate entries
1051 let key = item.location + " " + item.type + " " + item.docDomain; 1051 let key = item.location + " " + item.type + " " + item.docDomain;
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
1237 return {tooltip: this.itemsDummyTooltip}; 1237 return {tooltip: this.itemsDummyTooltip};
1238 }, 1238 },
1239 1239
1240 invalidateItem: function(item) 1240 invalidateItem: function(item)
1241 { 1241 {
1242 let row = this.data.indexOf(item); 1242 let row = this.data.indexOf(item);
1243 if (row >= 0) 1243 if (row >= 0)
1244 this.boxObject.invalidateRow(row); 1244 this.boxObject.invalidateRow(row);
1245 } 1245 }
1246 } 1246 }
OLDNEW
« no previous file with comments | « chrome/content/ui/sendReport.js ('k') | lib/elemHide.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld