| Index: lib/devtools.js |
| =================================================================== |
| --- a/lib/devtools.js |
| +++ b/lib/devtools.js |
| @@ -131,22 +131,26 @@ |
| * @param {?boolean} specificOnly Whether generic filters should be ignored |
| * @param {?BlockingFilter} filter The matched filter or null if there is no |
| * match |
| */ |
| exports.logRequest = function(page, url, type, docDomain, |
| thirdParty, sitekey, |
| specificOnly, filter) |
| { |
| - let panel = getActivePanel(page); |
| - if (panel) |
| + let request = {url, type, docDomain, thirdParty, sitekey, specificOnly}; |
|
Sebastian Noack
2017/04/21 08:39:53
Perhaps, we should bail if there are no panels, be
Jon Sonesen
2017/04/24 08:40:56
Acknowledged.
|
| + if (page) |
| { |
| - let request = {url, type, docDomain, thirdParty, sitekey, specificOnly}; |
| - addRecord(panel, request, filter); |
| + let panel = getActivePanel(page); |
| + if (panel) |
| + addRecord(panel, request, filter); |
| + return; |
| } |
| + for (let panelId in panels) |
|
Sebastian Noack
2017/04/21 08:39:53
Some of the code added here, and in this file in g
Jon Sonesen
2017/04/24 08:40:56
Awesome, I agree here. I am wondering though, shou
|
| + addRecord(panels[panelId], request, filter); |
|
Sebastian Noack
2017/04/21 08:39:53
getActivePanel(), called when logging for a specif
Jon Sonesen
2017/04/24 08:40:56
Acknowledged.
|
| }; |
| /** |
| * Logs active element hiding filters to the devtools panel. |
| * |
| * @param {Page} page The page the elements were hidden on |
| * @param {string[]} selectors The selectors of applied ElemHideFilters |
| * @param {string[]} filters The text of applied ElemHideEmulationFilters |