[Pkg-mozext-commits] [firetray] 31/84: fix window unregistration

David Prévot taffit at moszumanska.debian.org
Sun Jul 20 01:42:43 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository firetray.

commit 6d4c0040f79f7b2e71897ca5c016267bfa2c019b
Author: foudfou <foudil.newbie+git at gmail.com>
Date:   Sat Feb 22 23:19:19 2014 +0100

    fix window unregistration
---
 src/modules/commons.js               | 2 +-
 src/modules/winnt/FiretrayWindow.jsm | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/modules/commons.js b/src/modules/commons.js
index f03c567..cd49ad8 100644
--- a/src/modules/commons.js
+++ b/src/modules/commons.js
@@ -297,7 +297,7 @@ firetray.js = {
 
   assert: function(condition, message) {
     if (!condition) {
-      throw message || "Assertion failed";
+      throw new Error(message || "Assertion failed");
     }
   },
 
diff --git a/src/modules/winnt/FiretrayWindow.jsm b/src/modules/winnt/FiretrayWindow.jsm
index f0c8ee7..9b5a138 100644
--- a/src/modules/winnt/FiretrayWindow.jsm
+++ b/src/modules/winnt/FiretrayWindow.jsm
@@ -107,7 +107,7 @@ firetray.Window.detachWndProc = function(wid) {
     user32.SetWindowLongW(hwnd, user32.GWLP_WNDPROC,
                           ctypes.cast(procPrev, win32.LONG_PTR))
   );
-  firetray.js.assert(proc == firetray.Handler.wndProcs.get(wid),
+  firetray.js.assert(firetray.js.strEquals(proc, firetray.Handler.wndProcs.get(wid)),
                      "Wrong WndProc replaced.");
   firetray.Handler.wndProcs.remove(wid);
   firetray.Handler.wndProcsOrig.remove(wid);
@@ -173,6 +173,7 @@ firetray.Handler.unregisterWindow = function(win) {
   if (!delete firetray.Handler.windows[wid])
     throw new DeleteError();
 
+  firetray.Handler.dumpWindows();
   log.debug("window "+wid+" unregistered");
   return true;
 };

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/firetray.git



More information about the Pkg-mozext-commits mailing list