[Pkg-mozext-commits] [requestpolicy] 230/280: fix a bug
David Prévot
taffit at moszumanska.debian.org
Sat May 2 20:30:32 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository requestpolicy.
commit 0a64c37ad52be49d2f7e7b536d3c4916ea30bec8
Author: Martin Kimmerle <dev at 256k.de>
Date: Thu Mar 19 00:12:06 2015 +0100
fix a bug
`onWindowUnload` hasn't been called on shutdown
---
src/content/ui/overlay.js | 31 +++++++++++++++++++++----------
1 file changed, 21 insertions(+), 10 deletions(-)
diff --git a/src/content/ui/overlay.js b/src/content/ui/overlay.js
index 44260e3..0bb92ae 100644
--- a/src/content/ui/overlay.js
+++ b/src/content/ui/overlay.js
@@ -165,16 +165,27 @@ requestpolicy.overlay = (function() {
// rpContextMenu.setAttribute("hidden", !isEnabled);
//},
- self.onWindowUnload = function() {
- RequestProcessor.removeRequestObserver(self);
- self._unwrapAddTab();
- self._removeHistoryObserver();
- self._removeLocationObserver();
-
- if ($id("requestpolicy-requestLog").hidden === false) {
- self.toggleRequestLog();
- }
- };
+ OverlayEnvironment.addShutdownFunction(
+ Environment.LEVELS.INTERFACE,
+ function() {
+ RequestProcessor.removeRequestObserver(self);
+ self._unwrapAddTab();
+ self._removeHistoryObserver();
+ self._removeLocationObserver();
+ });
+
+ OverlayEnvironment.addShutdownFunction(
+ Environment.LEVELS.UI,
+ function() {
+ let requestLog = $id("requestpolicy-requestLog");
+
+ // If the request log is found and is opened.
+ // The XUL elements of the request log might have already
+ // been removed.
+ if (!!requestLog && requestLog.hidden === false) {
+ self.toggleRequestLog();
+ }
+ });
function addAppcontentTabSelectListener() {
// Info on detecting page load at:
--
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