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

Unified Diff: lib/requestBlocker.js

Issue 29721716: Issue 6473 - Remove WebSocket wrapper (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Created March 13, 2018, 4:33 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
« inject.preload.js ('K') | « 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
@@ -202,26 +202,15 @@
FilterNotifier.on("subscription.disabled", arg => onFilterChange(arg, true));
FilterNotifier.on("filter.added", onFilterChange);
FilterNotifier.on("filter.removed", onFilterChange);
FilterNotifier.on("filter.disabled", arg => onFilterChange(arg, true));
FilterNotifier.on("load", onFilterChange);
port.on("request.blockedByWrapper", (msg, sender) =>
Sebastian Noack 2018/03/13 17:43:01 You might want to rename this message to "request.
Manish Jethani 2018/03/13 18:05:11 Done.
{
- // 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).
- // Edge supports neither webRequest.ResourceType nor WebSocket blocking yet:
- // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/10297376/
- if (browser.webRequest.ResourceType &&
- (msg.requestType.toUpperCase() in browser.webRequest.ResourceType))
- {
- return false;
- }
-
return ext.webRequest.onBeforeRequest._dispatch(
new URL(msg.url),
msg.requestType,
Sebastian Noack 2018/03/13 17:43:01 This can be hard-coded to "webrtc" now.
Manish Jethani 2018/03/13 18:05:11 Done.
sender.page,
sender.frame
).includes(false);
});
Sebastian Noack 2018/03/13 17:43:01 Please also remove the hard-coded "WEBSOCKET" valu
Manish Jethani 2018/03/13 18:05:11 Done.
« inject.preload.js ('K') | « inject.preload.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld