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

Unified Diff: inject.preload.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 | « no previous file | lib/requestBlocker.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: inject.preload.js
===================================================================
--- a/inject.preload.js
+++ b/inject.preload.js
@@ -194,17 +194,17 @@
function WrappedWebSocket(url, ...args)
{
// Throw correct exceptions if the constructor is used improperly.
if (!(this instanceof WrappedWebSocket)) return RealWebSocket();
if (arguments.length < 1) return new RealWebSocket();
let websocket = new RealWebSocket(url, ...args);
- checkRequest("WEBSOCKET", websocket.url, blocked =>
+ checkRequest("websocket", websocket.url, blocked =>
{
if (blocked)
closeWebSocket(websocket);
});
return websocket;
}
WrappedWebSocket.prototype = RealWebSocket.prototype;
@@ -292,17 +292,17 @@
configurable: false, enumerable: false, writable: false,
value: iceServers
}
});
}
function checkUrl(peerconnection, url)
{
- checkRequest("WEBRTC", url, blocked =>
+ checkRequest("webrtc", url, blocked =>
{
if (blocked)
{
// Calling .close() throws if already closed.
try
{
closeRTCPeerConnection(peerconnection);
}
« no previous file with comments | « no previous file | lib/requestBlocker.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld