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

Unified Diff: lib/requestBlocker.js

Issue 29445639: Noissue - Use lowercase for WebRTC and WebSocket resource types (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Uppercase resource type before check Created May 22, 2017, 5:20 p.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 | « inject.preload.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/requestBlocker.js
===================================================================
--- a/lib/requestBlocker.js
+++ b/lib/requestBlocker.js
@@ -174,17 +174,17 @@
FilterNotifier.on("filter.disabled", arg => onFilterChange(arg, true));
FilterNotifier.on("load", onFilterChange);
port.on("request.blockedByWrapper", (msg, sender) =>
{
// Chrome 58 onwards directly supports WebSocket blocking, so we can ignore
// messages from the wrapper here (see https://crbug.com/129353). Hopefully
// WebRTC will be supported soon too (see https://crbug.com/707683).
- if (msg.requestType in chrome.webRequest.ResourceType)
+ if (msg.requestType.toUpperCase() in chrome.webRequest.ResourceType)
return false;
return ext.webRequest.onBeforeRequest._dispatch(
new URL(msg.url),
msg.requestType,
sender.page,
sender.frame
).includes(false);
« no previous file with comments | « inject.preload.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld