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

Unified Diff: lib/contentPolicy.js

Issue 29331917: Issue 3225 - Make sure Policy.shouldAllow can be overwritten by Diagnostics extension (Closed)
Patch Set: Created Dec. 4, 2015, 2:57 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 | no next file » | 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
@@ -66,17 +66,17 @@ var Policy = exports.Policy =
* Called on module startup, initializes various exported properties.
*/
init: function()
{
// whitelisted URL schemes
for (let scheme of Prefs.whitelistschemes.toLowerCase().split(" "))
this.whitelistSchemes.add(scheme);
- Utils.addChildMessageListener("AdblockPlus:ShouldAllow", this.shouldAllow.bind(this));
+ Utils.addChildMessageListener("AdblockPlus:ShouldAllow", message => this.shouldAllow(message));
// Generate class identifier used to collapse nodes and register
// corresponding stylesheet.
let collapsedClass = "";
let offset = "a".charCodeAt(0);
for (let i = 0; i < 20; i++)
collapsedClass += String.fromCharCode(offset + Math.random() * 26);
Utils.addChildMessageListener("AdblockPlus:GetCollapsedClass", () => collapsedClass);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld