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

Unified Diff: lib/contentPolicy.js

Issue 29353444: Issue 4449 - Use 'websocket' type for WebSocket connections (Closed) Base URL: https://hg.adblockplus.org/adblockplus
Patch Set: Created Sept. 20, 2016, 11:29 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 | « dependencies ('k') | metadata.gecko » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/contentPolicy.js
===================================================================
--- a/lib/contentPolicy.js
+++ b/lib/contentPolicy.js
@@ -55,27 +55,28 @@ var Policy = exports.Policy =
// Treat fetch() the same as XMLHttpRequest,
// it's essentially the same - merely a more modern API.
yield ["FETCH", "XMLHTTPREQUEST"];
// Everything else is mapped to itself
for (let contentType of ["OTHER", "SCRIPT", "IMAGE", "STYLESHEET", "OBJECT",
"SUBDOCUMENT", "DOCUMENT", "XMLHTTPREQUEST",
"OBJECT_SUBREQUEST", "FONT", "MEDIA", "PING",
- "ELEMHIDE", "POPUP", "GENERICHIDE", "GENERICBLOCK"])
+ "WEBSOCKET", "ELEMHIDE", "POPUP", "GENERICHIDE",
+ "GENERICBLOCK"])
yield [contentType, contentType];
}()),
/**
* Set of content types that aren't associated with a visual document area
* @type Set.<string>
*/
nonVisualTypes: new Set([
"SCRIPT", "STYLESHEET", "XMLHTTPREQUEST", "OBJECT_SUBREQUEST", "FONT",
- "PING", "ELEMHIDE", "POPUP", "GENERICHIDE", "GENERICBLOCK"
+ "PING", "WEBSOCKET", "ELEMHIDE", "POPUP", "GENERICHIDE", "GENERICBLOCK"
]),
/**
* Map containing all schemes that should be ignored by content policy.
* @type Set.<string>
*/
whitelistSchemes: new Set(),
« no previous file with comments | « dependencies ('k') | metadata.gecko » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld