[Pkg-mozext-commits] [requestpolicy] 249/257: [ref] remove "blockedRedirects" object in browser
David Prévot
taffit at moszumanska.debian.org
Thu Jan 28 03:20:19 UTC 2016
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository requestpolicy.
commit fe976bc4d2e821c882d51a85eaea252d79367e33
Author: Martin Kimmerle <dev at 256k.de>
Date: Sat Jan 2 16:50:05 2016 +0100
[ref] remove "blockedRedirects" object in browser
---
src/content/lib/request-processor.redirects.js | 16 ----------------
src/content/ui/overlay.js | 15 ---------------
2 files changed, 31 deletions(-)
diff --git a/src/content/lib/request-processor.redirects.js b/src/content/lib/request-processor.redirects.js
index 357e7ef..2f0fce6 100644
--- a/src/content/lib/request-processor.redirects.js
+++ b/src/content/lib/request-processor.redirects.js
@@ -228,22 +228,6 @@ RequestProcessor = (function(self) {
// show the URL of the previously displayed page.
httpChannel.cancel(Cr.NS_BINDING_ABORTED);
- let browser = request.browser;
-
- if (browser !== null) {
- // `browser` is null if it could not be found. One known
- // example is a favicon request that is redirected.
-
- // TODO: do not put data into the <browser> object. Maybe use
- // Map instead?
-
- // save all blocked redirects directly in the browser element. the
- // blocked elements will be checked later when the DOM content
- // finished loading.
- browser.rpcontinued = browser.rpcontinued || {blockedRedirects: {}};
- browser.rpcontinued.blockedRedirects[originURI] = destURI;
- }
-
maybeShowRedirectNotification(request);
// We try to trace the blocked redirect back to a link click or form
diff --git a/src/content/ui/overlay.js b/src/content/ui/overlay.js
index 42a6411..684c04b 100644
--- a/src/content/ui/overlay.js
+++ b/src/content/ui/overlay.js
@@ -227,9 +227,6 @@ window.rpcontinued.overlay = (function() {
mlManager.addListener("notifyDocumentLoaded", function(message) {
let {documentURI} = message.data;
- // the <browser> element of the corresponding tab.
- let browser = message.target;
-
let blockedURIs = {};
if (Prefs.get("indicateBlockedObjects")) {
@@ -261,18 +258,6 @@ window.rpcontinued.overlay = (function() {
}
}
- if ("rpcontinued" in browser &&
- documentURI in browser.rpcontinued.blockedRedirects) {
- // bad smell: do not save blocked requests in the <browser> obj
- var dest = browser.rpcontinued.blockedRedirects[documentURI];
- Logger.warning(Logger.TYPE_HEADER_REDIRECT,
- "Showing notification for blocked redirect. To <" + dest +
- "> " + "from <" + documentURI + ">");
- self._showRedirectNotification(browser, dest);
-
- delete browser.rpcontinued.blockedRedirects[documentURI];
- }
-
// send the list of blocked URIs back to the frame script
return {blockedURIs: blockedURIs};
});
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/requestpolicy.git
More information about the Pkg-mozext-commits
mailing list