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

Unified Diff: lib/devtools.js

Issue 29739603: Issue 6544 - Prevent requests sent by Chrome or Adblock Plus from being blocked (Closed)
Patch Set: Streamlined request logging Created April 5, 2018, 5:39 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | lib/requestBlocker.js » ('j') | lib/requestBlocker.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/devtools.js
===================================================================
--- a/lib/devtools.js
+++ b/lib/devtools.js
@@ -134,13 +134,15 @@
thirdParty, sitekey,
specificOnly, filter)
{
- if (panels.size == 0)
kzar 2018/04/05 10:56:37 How come you removed this check? I agreed with it,
Sebastian Noack 2018/04/05 17:38:59 Why bother checking the size if we would only do o
- return;
-
- let request = {url, type, docDomain, thirdParty, sitekey, specificOnly};
- for (let [tabId, panel] of panels)
- if ((tabIds.length == 0 || tabIds.includes(tabId)) && isActivePanel(panel))
+ for (let tabId of tabIds)
+ {
+ let panel = getActivePanel(tabId);
+ if (panel)
+ {
+ let request = {url, type, docDomain, thirdParty, sitekey, specificOnly};
kzar 2018/04/05 10:56:37 How come we're now assigning request inside the lo
Sebastian Noack 2018/04/05 17:38:59 Most of the time we have only one tabId which most
kzar 2018/04/06 14:48:10 Sure, that's why we had the extra check above whic
Sebastian Noack 2018/04/06 17:55:46 The object was still created redundantly if there
kzar 2018/04/09 11:08:43 Well I guess we disagree on this but whatever, I w
addRecord(panel, request, filter);
+ }
+ }
Sebastian Noack 2018/04/05 05:42:45 I figured now where we don't log requests out of c
Sebastian Noack 2018/04/05 06:03:58 For reference, the case of `tabIds.length == 0` ri
};
/**
« no previous file with comments | « no previous file | lib/requestBlocker.js » ('j') | lib/requestBlocker.js » ('J')

Powered by Google App Engine
This is Rietveld