diff --git a/modules/browser.js b/modules/browser.js index c1a63cdd..f36cb64c 100644 --- a/modules/browser.js +++ b/modules/browser.js @@ -291,6 +291,11 @@ TreeStyleTabBrowser.prototype = { { return this.isVertical ? this.counterRoleVertical : this.counterRoleHorizontal ; }, + + get isDestroying() + { + return !this.mTabBrowser || !this.mTabBrowser.mTabContainer; + }, /* utils */ @@ -4939,6 +4944,7 @@ TreeStyleTabBrowser.prototype = { var CSSTransitionEnabled = ('Transition' in aTab.style || 'MozTransition' in aTab.style); if (CSSTransitionEnabled) { aTab.__treestyletab__updateTabIndentTask = function(aTime, aBeginning, aChange, aDuration) { + if (self.isDestroying) return true; aTab.style.setProperty(self.indentCSSProp, aIndent+'px', 'important'); return true; }; @@ -4953,6 +4959,7 @@ TreeStyleTabBrowser.prototype = { var delta = aIndent - startIndent; var radian = 90 * Math.PI / 180; aTab.__treestyletab__updateTabIndentTask = function(aTime, aBeginning, aChange, aDuration) { + if (self.isDestroying) return true; var indent, finished; if (aTime >= aDuration) { delete aTab.__treestyletab__updateTabIndentTask; @@ -5521,6 +5528,7 @@ TreeStyleTabBrowser.prototype = { var self = this; var firstFrame = true; aTab.__treestyletab__updateTabCollapsedTask = function(aTime, aBeginning, aChange, aDuration) { + if (self.isDestroying) return true; if (firstFrame) { // The callback must be started before offsetAttr is changed! if (aCallbackToRunOnStartAnimation) @@ -5724,6 +5732,7 @@ TreeStyleTabBrowser.prototype = { var radian = 90 * Math.PI / 180; var self = this; this.smoothScrollTask = function(aTime, aBeginning, aChange, aDuration) { + if (self.isDestroying) return true; var scrollBoxObject = self.scrollBoxObject; if (aTime >= aDuration || this.cancelingPerformingAutoScroll) { if (!this.cancelingPerformingAutoScroll) { diff --git a/modules/lib/animationManager.js b/modules/lib/animationManager.js index 6facbdf5..e060ed8c 100644 --- a/modules/lib/animationManager.js +++ b/modules/lib/animationManager.js @@ -19,7 +19,7 @@ // restart after doing something window['piro.sakura.ne.jp'].animationManager.start(); - license: The MIT License, Copyright (c) 2009-2011 SHIMODA "Piro" Hiroshi + license: The MIT License, Copyright (c) 2009-2012 SHIMODA "Piro" Hiroshi http://github.com/piroor/fxaddonlibs/blob/master/license.txt original: http://github.com/piroor/fxaddonlibs/blob/master/animationManager.js @@ -46,7 +46,7 @@ if (typeof window == 'undefined' || } (function() { - const currentRevision = 9; + const currentRevision = 10; if (!('piro.sakura.ne.jp' in window)) window['piro.sakura.ne.jp'] = {}; @@ -245,6 +245,7 @@ if (typeof window == 'undefined' || return !finished && (time < aTask.duration); } catch(e) { + dump(e+'\n'+e.stack+'\n'); } return false; });