Index: webrequest.js |
=================================================================== |
--- a/webrequest.js |
+++ b/webrequest.js |
@@ -18,6 +18,7 @@ |
var FilterNotifier = require("filterNotifier").FilterNotifier; |
var RegExpFilter = require("filterClasses").RegExpFilter; |
var platform = require("info").platform; |
+var logRequest = require("devtools").logRequest; |
var onFilterChangeTimeout = null; |
function onFilterChange() |
@@ -59,14 +60,11 @@ |
if (isFrameWhitelisted(page, frame)) |
return true; |
+ var urlString = stringifyURL(url); |
var docDomain = extractHostFromFrame(frame); |
+ var thirdParty = isThirdParty(url, docDomain); |
var key = getKey(page, frame); |
- var filter = defaultMatcher.matchesAny( |
- stringifyURL(url), |
- type, docDomain, |
- isThirdParty(url, docDomain), |
- key |
- ); |
+ var filter = defaultMatcher.matchesAny(urlString, type, docDomain, thirdParty, key); |
// We can't listen to onHeadersReceived in Safari so we need to |
// check for notifications here |
@@ -77,7 +75,9 @@ |
showNotification(notificationToShow); |
} |
+ logRequest(page, urlString, type, docDomain, thirdParty, key, filter); |
FilterNotifier.triggerListeners("filter.hitCount", filter, 0, 0, page); |
+ |
return !(filter instanceof BlockingFilter); |
} |