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-present eyeo GmbH | 3 * Copyright (C) 2006-present 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
126 framesOfTabs.set(tabId, frames); | 126 framesOfTabs.set(tabId, frames); |
127 } | 127 } |
128 | 128 |
129 let frame = frames.get(frameId); | 129 let frame = frames.get(frameId); |
130 if (!frame) | 130 if (!frame) |
131 { | 131 { |
132 frame = {}; | 132 frame = {}; |
133 frames.set(frameId, frame); | 133 frames.set(frameId, frame); |
134 } | 134 } |
135 | 135 |
136 frame.state = {}; | |
kzar
2018/12/19 10:22:00
Nit: How about `Object.create(null)`?
Manish Jethani
2018/12/19 13:03:54
Done.
| |
137 | |
136 return frame; | 138 return frame; |
137 } | 139 } |
138 | 140 |
139 function updatePageFrameStructure(frameId, tabId, url, parentFrameId) | 141 function updatePageFrameStructure(frameId, tabId, url, parentFrameId) |
140 { | 142 { |
141 if (frameId == 0) | 143 if (frameId == 0) |
142 { | 144 { |
143 let page = new Page({id: tabId, url}); | 145 let page = new Page({id: tabId, url}); |
144 | 146 |
145 removeFromAllPageMaps(tabId); | 147 removeFromAllPageMaps(tabId); |
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
517 return frames.get(0) || null; | 519 return frames.get(0) || null; |
518 } | 520 } |
519 }; | 521 }; |
520 } | 522 } |
521 | 523 |
522 return ext.onMessage._dispatch( | 524 return ext.onMessage._dispatch( |
523 message, sender, sendResponse | 525 message, sender, sendResponse |
524 ).includes(true); | 526 ).includes(true); |
525 }); | 527 }); |
526 } | 528 } |
OLD | NEW |