Left: | ||
Right: |
OLD | NEW |
---|---|
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-2017 eyeo GmbH | 3 * Copyright (C) 2006-2017 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 17 matching lines...) Expand all Loading... | |
28 PageMap.prototype = { | 28 PageMap.prototype = { |
29 _delete(id) | 29 _delete(id) |
30 { | 30 { |
31 this._map.delete(id); | 31 this._map.delete(id); |
32 | 32 |
33 if (this._map.size == 0) | 33 if (this._map.size == 0) |
34 nonEmptyPageMaps.delete(this); | 34 nonEmptyPageMaps.delete(this); |
35 }, | 35 }, |
36 keys() | 36 keys() |
37 { | 37 { |
38 return this._map.keys(); | 38 return Array.from(this._map.keys()).map(ext.getPage); |
kzar
2017/05/23 11:47:59
I wonder if you could do `return Array.prototype.m
Sebastian Noack
2017/05/23 12:16:54
Please don't. Array generics are non-standard and
Manish Jethani
2017/05/23 12:32:27
I think Dave meant Array.prototype.map rather than
Sebastian Noack
2017/05/23 15:09:18
Sorry, you are right, I mixed things up, calling a
kzar
2017/05/23 16:15:04
Acknowledged.
| |
39 }, | 39 }, |
40 get(page) | 40 get(page) |
41 { | 41 { |
42 return this._map.get(page.id); | 42 return this._map.get(page.id); |
43 }, | 43 }, |
44 set(page, value) | 44 set(page, value) |
45 { | 45 { |
46 this._map.set(page.id, value); | 46 this._map.set(page.id, value); |
47 nonEmptyPageMaps.add(this); | 47 nonEmptyPageMaps.add(this); |
48 }, | 48 }, |
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
730 ext.windows = { | 730 ext.windows = { |
731 create(createData, callback) | 731 create(createData, callback) |
732 { | 732 { |
733 chrome.windows.create(createData, createdWindow => | 733 chrome.windows.create(createData, createdWindow => |
734 { | 734 { |
735 afterTabLoaded(callback)(createdWindow.tabs[0]); | 735 afterTabLoaded(callback)(createdWindow.tabs[0]); |
736 }); | 736 }); |
737 } | 737 } |
738 }; | 738 }; |
739 }()); | 739 }()); |
OLD | NEW |