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

Side by Side Diff: lib/whitelisting.js

Issue 29330321: Issue 3334 - Fix warnings spotted during testing before release (Closed)
Patch Set: Created Nov. 17, 2015, 4:44 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | metadata.common » ('j') | webrequest.js » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2015 Eyeo GmbH 3 * Copyright (C) 2006-2015 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 }; 71 };
72 72
73 /** 73 /**
74 * Gets the public key, previously recorded for the given page 74 * Gets the public key, previously recorded for the given page
75 * and frame, to be considered for the $sitekey filter option. 75 * and frame, to be considered for the $sitekey filter option.
76 * 76 *
77 * @param {Page} page 77 * @param {Page} page
78 * @param {Frame} frame 78 * @param {Frame} frame
79 * @return {string} 79 * @return {string}
80 */ 80 */
81 exports.getKey = function(page, frame) 81 var getKey = exports.getKey = function(page, frame)
Sebastian Noack 2015/11/17 17:02:58 This will break jsdoc. Instead use: let getKey =
kzar 2015/11/17 19:06:26 Done.
82 { 82 {
83 let urlsWithKey = pagesWithKey.get(page); 83 let urlsWithKey = pagesWithKey.get(page);
84 if (!urlsWithKey) 84 if (!urlsWithKey)
85 return null; 85 return null;
86 86
87 for (; frame != null; frame = frame.parent) 87 for (; frame != null; frame = frame.parent)
88 { 88 {
89 let key = urlsWithKey[stringifyURL(frame.url)]; 89 let key = urlsWithKey[stringifyURL(frame.url)];
90 if (key) 90 if (key)
91 return key; 91 return key;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 { 133 {
134 if (token.indexOf("_") < 0) 134 if (token.indexOf("_") < 0)
135 return; 135 return;
136 136
137 let [key, signature] = token.split("_", 2); 137 let [key, signature] = token.split("_", 2);
138 key = key.replace(/=/g, ""); 138 key = key.replace(/=/g, "");
139 139
140 if (verifyKey(key, signature, frame.url)) 140 if (verifyKey(key, signature, frame.url))
141 recordKey(page, frame.url, key); 141 recordKey(page, frame.url, key);
142 }; 142 };
OLDNEW
« no previous file with comments | « no previous file | metadata.common » ('j') | webrequest.js » ('J')

Powered by Google App Engine
This is Rietveld